set
06
2010

Compiler for Nuttx

I was following this thread on Nuttx maillist on recommended compiler to build Nuttx RTOS. As a matter of practicality I guess that many users use CodeSourcery arm-none-linux-gnueabi but today I decided test the code generated for Cortex-M3 (LPC1768) using the toolchain from Buildroot. As Greg Nutt said (text adapted):

They were configured using OABI [old arm ABI], but I prefer them because (1) they are not EABI and reliably link code with -O3 or -Os, making it up to half the size, and (2) include nuttx “built in” — they really should be called arm-nuttx-gcc tools.

Here my stats (defconfig):

$ arm-none-eabi-size nutt
text         data   bss       dec        hex      filename
71000     324    2248   73572   11f64   nuttx

$ arm-elf-size nuttx
text         data    bss      dec         hex     filename
56172     330    2248   58750    e57e   nuttx

The final .bin has an delta of 16K. As I’m using one parallel JTAG (flash rates @ 0.2 KiB/S) this means almost 1 minute reduction in each flash write_image. If you check Make.defs note that MAXOPTIMIZATION for CodeSourcery isn’t using optimize for size option (-Os). As explained on config/<board>/README.txt it doesn’t work with this kind of optimization level [tested with 2009q1].

tags: , , ,
posted in embarcado by Tiago Maluta

Follow comments via the RSS Feed | Deixe um comentário | Trackback URL

1 Comment to "Compiler for Nuttx"

  1. Installing Buildroot toolchain for Nuttx | coding wrote:

    [...] Compiler for Nuttx [...]

Leave Your Comment