We consider the problem of mapping a set of control components to executable code. The standard approach to this problem involves mapping control blocks to periodic tasks, and then, generate a schedule using real-time scheduling techniques. The schedule is platform-dependent, and its execution requires real-time operating system support. We propose an alternative approach to generate code as a sequence of control blocks in a platform-independent manner. Our solution relies on assigning relative complexity and relative importance measures to control components, and is an adaptation of classical scheduling algorithms such as earliest-deadline-first. We show the benefits of our approach via simulation experiments on two sets of case studies.