CodeRed for mbed

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

CodeRed for mbed

551 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by swmspam on Thu Feb 16 08:40:47 MST 2012
I searched the forum for mbed and discovered a few references of using the mbed without the online compiler.

Can an offline compiler - such as the CodeRed - be used with the mbed? The limitations of the online compiler is the singular deterrent to using the mbed in field trials and pre-production units.
0 Kudos
4 Replies

445 Views
JojoS
Contributor II

maybe the online compiler is using smaller standard libs, that makes a big difference. You can try to change the linker file and use the nano libs instead:

/* GROUP(libgcc.a libc.a libstdc++.a libm.a libcr_newlib_nohost.a crti.o crtn.o crtbegin.o crtend.o) */
GROUP(libgcc.a libc_nano.a libstdc++_nano.a libm.a libcr_newlib_nohost.a crti.o crtn.o crtbegin.o crtend.o)

0 Kudos

445 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by Rob65 on Thu Feb 16 11:22:16 MST 2012
I tried this with the LPCXpresso tools.
I had a small program with 1 PWM outputs which resulted in a 15 kB .bin file on the mBed online compiler and 67 kB on the LPCXpresso tools (actually the debug build is 66.8 kB and the release build 66.7 kB :eek:)

The standard led blinking that you get for free in every new program on mBed is 3.7 kB on the mBed compiler and 59 kB on LPCXpresso.

There must be something very wrong with either the tool settings or the libraries. I'd love to use C++ for my application but > 50 kB overhead is just too much - my current MCU is an lpc1754 with 128 kB Flash.

Regards,

Rob
0 Kudos

445 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by whitecoe on Thu Feb 16 09:25:20 MST 2012

Quote: swmspam
Can an offline compiler - such as the CodeRed - be used with the mbed? The limitations of the online compiler is the singular deterrent to using the mbed in field trials and pre-production units.



See "Support for Multiple Toolchains" at:

http://mbed.org/handbook/mbed-SDK

HTH!
0 Kudos

445 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by Ex-Zero on Thu Feb 16 09:17:48 MST 2012

Quote:
Can an offline compiler - such as the CodeRed - be used with the mbed?

Of course, create a bin file and 'Save the program binary file to your mbed Microcontroller Disk,'

as described here:

http://mbed.org/handbook/Downloading-a-program

That's all :)
0 Kudos