Document number
204911
Version
Rev. K
Issue date
2016-10-11
Sirius Breadboard User Manual
www.aacmicrotec.com
Page
15
of
106
2. When gdb has opened successfully, connect to the hardware through the
OpenOCD server using the gdb command
target remote localhost:50001
3. To start an executable program in hardware, first specify it's name using the gdb
command file. Make sure the application is in ELF format.
file
path/to/binary_to_execute
4. Now it needs to be uploaded onto the target RAM
load
5. In the gdb prompt, type
c
to start to run the application
3.6. Programming an application (boot image) to system flash
This chapter describes how to program the NAND flash memory with a selected boot image.
To achieve this, the boot image binary is bundled together with the NAND flash
programming application during the latter's compilation and then uploaded to target just as
an ordinary application is started through gdb. The maximum allowed size for the boot
image for this release is 16 Mbyte. The nandflash_program application can be found in the
BSP, see also instructions below.
The below instructions assume that the toolchain is in the PATH, see section 3.3 for how to
accomplish this.
1. Compile the boot image binary according to the rules for that program.
2. Then make sure that this is in a binary-only format and not ELF. This can otherwise
be accomplished with the help of the gcc tools included in the toolchain. Note that
X
is to be replaced according to what your application has been compiled against.
Either
elf
for a bare-metal application or
rtems4.11
for the RTEMS variant.
or1k-aac-X-objcopy -O binary boot_image.elf boot_image.bin
3. See chapter 3.4 for installing the BSP and enter
cd path/to/bsp/aac-or1k-xxx-x-bsp/src/nandflash_program/src
4. Now, compile the nandflash-program application, bundling it together with the boot image
binary.
make nandflash-program.elf PROGRAMMINGFILE=/path/to/boot_image.bin
5. Load the
nandflash-program.elf
onto the target RAM with the help of gdb and
execute it. Follow the instructions on screen and when it's ready, reboot the board
by resetting or power cycling.