
316 Embedded systems design
.L12: # label is replaced by compiler
lwarx 5,rO,r3 # argument is forced to
register
cmpl crO,r5,0
bne .L12
stwcx. r4,rO,r3
bne .L12
Downloading
Having modified libraries, linked modules together and
so on, the question arises of how to get the code down to the
target board. There are several methods available to do this.
Serial lines
Programs can be downloaded into a target board using
a serial comms port and usually an onboard debugger. The first
stage is to convert the executable program file into an ASCII
format which can easily be transmitted to the target. This is
done either by setting a switch on the linker to generate a