You are on page 1of 9

Embedded Firmware Design and

Development
Embedded Firmware Design Approaches

 The Super Loop Based Approach


• This approach is adopted for applications that
are not time critical and where the response
time is not so important.
• It is very similar to conventional procedural
programming where the code is executed task
by task.
 Firmware execution flow will be
 Since the tasks are running inside an infinite
loop , the only way to come out of the loop is
either a hardware reset or an interrupt
assertion.
 This approach is simple and straight forward
without any OS related overheads.
 Drawbacks
 Any failure in any part of a single task may
affect the total system.
 Lack of real timliness.
The Embedded OS Based Approach
 This approach contains operating systems ,
which can be either a GPOS or a RTOS to host
the user written application firmware.
 The GPOS based design is very similar to
conventional PC based application
development.
 RTOs based approach is employed in embedded
products demanding real-time response.
Embedded Firmware Development
Languages
 Assembly Language based Development
 Assembly language programming is the task of writing
processor specific machine code in mnemonic form
,converting the mnemonics into actual instructions(machine
language) and associated data using an assembler.
 Each line of an assembly language is split into four fields as
given below
LABEL OPCODE OPERANDS ; COMMENTS

optional mandatory
• Opcodes
– reserved symbols that correspond to LC-3 instructions
– listed in Appendix A
• ex: ADD, AND, LD, LDR, …
• Operands
– registers -- specified by Rn, where n is the register number
– numbers -- indicated by # (decimal) or x (hex)
– label -- symbolic name of memory location
– separated by comma
– number, order, and type correspond to instruction format
• ex:
ADD R1,R1,R3
ADD R1,R1,#3
LD R6,NUMBER
BRz LOOP
• Label
– placed at the beginning of the line
– assigns a symbolic name to the address corresponding to line
• ex:
LOOP ADD R1,R1,#-1
BRp LOOP
• Comment
– anything after a semicolon is a comment
– ignored by assembler
– used by humans to document/understand programs
– tips for useful comments:
• avoid restating the obvious, as “decrement R1”
• provide additional insight, as in “accumulate product in R6”
• use comments to separate pieces of program

You might also like