You are viewing an older revision! See the latest version

Exporting to GCC ARM Embedded

GNU Tools for ARM Embedded Processors is one of the external offline toolchains supported by the mbed platform.

For a complete overview of the "export" feature, please refer to our general: Exporting to offline toolchains.

To export your mbed program for use with the GNU Tools for ARM Embedded Processors, right-click the program in your program workspace. From the dialog, you can select the "Export To" as "GCC (ARM Embedded)", and the target microcontroller you wish to export for.

/media/uploads/emilmont/gcc_arm.png

When you choose export, a zip file containing all the files you need for the GNU Tools for ARM Embedded Processors will be generated. Unzip it and you are ready to launch make:

GCC_ARM

my_program$ ls
main.cpp  Makefile  mbed  mbed.lib

my_program$ make
arm-none-eabi-g++ -c -Os -fno-common -fmessage-length=0 -Wall -fno-exceptions -mcpu=cortex-m3 -mthumb -ffunction-sect
ions -fdata-sections  -DTARGET_LPC1768 -DTOOLCHAIN_GCC_CS -DNDEBUG -std=gnu++98 -I./mbed -I./mbed/LPC1768 -I./mbed/LPC1768/GCC_ARM  -o main.o main.c
pp
arm-none-eabi-gcc -mcpu=cortex-m3 -mthumb -Wl,--gc-sections -Tmbed/LPC1768/GCC_ARM/LPC1768.ld -L./mbed -L./mbed/LPC17
68 -L./mbed/LPC1768/GCC_ARM  -o my_program.elf main.o mbed/LPC1768/GCC_ARM/startup_LPC17xx.o mbed/LPC1768/GCC_ARM/core_cm3.o mbed/LPC1768/GCC_ARM/sy
stem_LPC17xx.o mbed/LPC1768/GCC_ARM/cmsis_nvic.o -lmbed -lcapi -lstdc++ -lsupc++ -lm -lc -lgcc
arm-none-eabi-objcopy -O binary my_program.elf my_program.bin

my_program$ ls
main.cpp  main.o  Makefile  mbed  mbed.lib  my_program.bin  my_program.elf

The binary file (".bin") is ready to be flashed on the mbed.


All wikipages