mbed SDK support for uVision MDK, Code Red, GCC

25 Oct 2011

Hi,

We have an alpha of a multi-toolchain version of the mbed C/C++ libraries SDK, enabling it to be used and be compatible across a number of toolchains.

I'd be interested to hear from anyone who is or would like to be using the mbed libraries with Keil uVision MDK, Code Red or GCC (code sourcery) who'd also be willing to dedicate some time for some testing of this alpha. Please just reply here or message me if you'd be willing to help out.

Simon

25 Oct 2011

Hi Simon, I am interested. Any news about delivering libraries in source code?

Massimo

26 Oct 2011

Please count me in too.

26 Oct 2011

i would be interested in trying them.

26 Oct 2011

I would be interested in trying as well.

26 Oct 2011

Hi Simon,

I' m interested too ( but will focus on visual studio )

26 Oct 2011

Hi Simon, i would like to test under Code Red GCC,

Peter

26 Oct 2011

Hey Simon,

Be glad to do some Alpha Testing. I have a finished project to use and some free time for testing. Will be using either Code Red or GCC (code sourcery) or both.

Doug

26 Oct 2011

Hi Simon,

I would like to try them. I will try to use it with XCode.

Stephan

27 Oct 2011

Sourcery here... I've got both Sourcery G++ Lite 2011.03-42 and Sourcery G++ 2011.09-58. Would love to see the libraries work with 2011.09-58, the gcc4mbed doesn't (can, with a lot of difficulty, make it produce a .bin, but it doesn't do anything).

Love to hop in the testing.

27 Oct 2011

me2

27 Oct 2011

mbed is all about the libraries. If one wants code reuse, and given the libraries are not bug-fee, and often they need modifications, one needs good code written to the ANSI standards (at least C99?) to be devoid of compiler-specific code (at least 99.9% so anyway).

mbed didn't start with that concept. It could move that way though.

29 Oct 2011

me 2 , for Keil !

I have noticed this export to keil option ... in compiler beta mode .

I try to export an mbed project in compiler beta mode to keil format , I get the uvision project files , but when I try to open the uvproj in Keil , I get "cannot read project file xyz.... " error , twice . Do I have to install the above mentioned SDK in Keil UV4 ?

<edit- fixed > well , as a good friend , more experienced with Keil ,suggested , I removed the two first blank lines of project.uvproj contents. Now Keil uvision shows one error window , but compiles fine ! Thanks Thanassis .

28 Oct 2011

For me keil!

29 Oct 2011

Just remove the 2 first empty lines in the .uvproj project Keil file and you can load the file. You still get an error message, but the project is loaded.

29 Oct 2011

Ah, you found the beta! We haven't quite finished testing, so hadn't advertised it was there yet :) give us a day or two next week and we should be good to go with the beta.

Thanks for the interest/offer of testing!

Simon

02 Nov 2011

Hi,

For anyone who discovered and is playing with export on the beta, uVision export should be working now. We'll be finishing off some of the support this week based on some great feedback we've already received, so it should be fully functional by the end of the week and pushed live by the end of the month assuming all testing goes well.

Note: you also need to be using a beta version of the library to make this work (see http://mbed.org/handbook/m0-beta). Proper details of how to make this work by the end of the week.

Hope you find it useful!

Simon

02 Nov 2011

Hi Simon

For Visual Studio to work (also see http://mbed.org/forum/mbed/post/13912/) you should at least add the following:

In system_lpc17xx.h add:

#ifdef GCCFIXUPS
  typedef unsigned long int uint32_t; 
  #define __INLINE
#endif

and in core_cm3.h:

#ifdef GCCFIXUPS
   void __DSB() {
  	//Dummy 
   }
#endif

to silence the missing INLINE preprocessor command and the DSB . (I used GCCFIXUPS to enable these fixes only for VS2010)

I'm now compiling a much larger project then previously and there are more things to fix (for instance missing method from the ARM compiler like: heapstats(), heapvalid(), current_pc() and current_sp() but these are very app specific). I'll have to look into these (so more in a couple of days)

Btw adding VS support would also be anhanced if you could add a skeleton vcxproj project file. wvd_vegt

08 Nov 2011

Decided to go looking and found the beta stuff. :)

Assuming GCC_CS is the CodeSourcery chain. GCC_CR is probably CodeRed, LOTS of errors with Sourcery. GCC_ARM has a missing library failure. I didn't bother with ARM or uARM.

Using GCC_CS supplied .ld script, I'm getting this error:

C:\ARMbeta\projects\oled>make
arm-none-eabi-g++ -mcpu=cortex-m3 -mthumb -O2 -Wl,-Map=OLED.map,--cref,--gc-sections,--no-wchar-size-warning -T../../build/mbed/mbed/LPC1768 /LPC1768.ld     ./SSD1305.o ./main.o  ../../build/mbed/mbed/LPC1768/libmbed.a ../../build/mbed/mbed/LPC1768/libcapi.a  -o OLED.elf
../../build/mbed/mbed/LPC1768/LPC1768.ld:213: undefined symbol `__cs3_interrupt_vector_cortex_m' referenced in expression
collect2: ld returned 1 exit status
cs-make: *** [OLED.elf] Error 1

So... ripped the external and usage out to see what would happen and got this...

C:\ARMbeta\projects\oled>make
arm-none-eabi-g++ -mcpu=cortex-m3 -mthumb -O2 -Wl,-Map=OLED.map,--cref,--gc-sections,--no-wchar-size-warning -T../../build/mbed/mbed/LPC1768/LPC1768.ld     ./SSD1305.o ./main.o  ../../build/mbed/mbed/LPC1768/libmbed.a ../../build/mbed/mbed/LPC1768/libcapi.a  -o OLED.elf
../../build/mbed/mbed/LPC1768/LPC1768.ld:213: undefined symbol `__cs3_reset_cortex_m' referenced in expression
collect2: ld returned 1 exit status
cs-make: *** [OLED.elf] Error 1

So, reran with both sets removed from ld, just to see what would happen, and here's the list...

C:\ARMbeta\projects\oled>make
arm-none-eabi-g++ -mcpu=cortex-m3 -mthumb -O2 -Wl,-Map=OLED.map,--cref,--gc-sections,--no-wchar-size-warning -T../../build/mbed/mbed/LPC1768/LPC1768.ld     ./SSD1305.o ./main.o  ../../build/mbed/mbed/LPC1768/libmbed.a ../../build/mbed/mbed/LPC1768/libcapi.a  -o OLED.elf
c:/armbeta/arm-2011.03/bin/../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/bin/ld.exe: warning: cannot find entry symbol __cs3_reset_cortex_m; defaulting to 00000000
../../build/mbed/mbed/LPC1768/libmbed.a(Serial.o): In function `mbed::Serial::setup_interrupt(mbed::Serial::IrqType)':
Serial.cpp:(.text+0x20a): undefined reference to `NVIC_SetVector'
Serial.cpp:(.text+0x216): undefined reference to `NVIC_SetVector'
Serial.cpp:(.text+0x222): undefined reference to `NVIC_SetVector'
Serial.cpp:(.text+0x22e): undefined reference to `NVIC_SetVector'
../../build/mbed/mbed/LPC1768/libcapi.a(i2c_api.o): In function `i2c_frequency':
i2c_api.c:(.text+0xf8): undefined reference to `SystemCoreClock'
../../build/mbed/mbed/LPC1768/libcapi.a(serial_api.o): In function `serial_baud':
serial_api.c:(.text+0x1fc): undefined reference to `SystemCoreClock'
../../build/mbed/mbed/LPC1768/libcapi.a(timer_api.o): In function `timer_frequency':
timer_api.c:(.text+0x14): undefined reference to `SystemCoreClock'
c:/armbeta/arm-2011.03/bin/../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/lib/thumb2\libc.a(lib_a-abort.o): In function `abort':
abort.c:(.text+0xa): undefined reference to `_exit'
c:/armbeta/arm-2011.03/bin/../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/lib/thumb2\libc.a(lib_a-sbrkr.o): In function `_sbrk_r':
sbrkr.c:(.text+0x12): undefined reference to `_sbrk'
c:/armbeta/arm-2011.03/bin/../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/lib/thumb2\libc.a(lib_a-signalr.o): In function `_kill_r':
signalr.c:(.text+0x14): undefined reference to `_kill'
c:/armbeta/arm-2011.03/bin/../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/lib/thumb2\libc.a(lib_a-signalr.o): In function `_getpid_r':
signalr.c:(.text+0x2c): undefined reference to `_getpid'
c:/armbeta/arm-2011.03/bin/../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/lib/thumb2\libc.a(lib_a-isattyr.o): In function `_isatty_r':
isattyr.c:(.text+0x12): undefined reference to `_isatty'
collect2: ld returned 1 exit status
cs-make: *** [OLED.elf] Error 1

Using arm-2011.03 from CodeSourcery, stole the makefile from gcc4mbed and just removed all references to gcc4mbed and put in the beta stuff. Compiles fine on both online compiler and gcc4mbed offline compiler. Anyone get around these yet?

08 Nov 2011

Felyza Wishbringer wrote:

Using arm-2011.03 from CodeSourcery, stole the makefile from gcc4mbed and just removed all references to gcc4mbed and put in the beta stuff. Compiles fine on both online compiler and gcc4mbed offline compiler. Anyone get around these yet?

You should use the Makefile that gets exported along with the program sources and libs from the beta version of the online compiler. The gcc4mbed makefiles aren't compatible with these new libraries.

08 Nov 2011

Was using the new libs, as per makefiles, I didn't export a project, just threw source at new library in working offline compiler. Will try to straighten it out tomorrow. :)

08 Nov 2011

In that case, you might want to wait for Simon to push out the instructions before proceeding. It sounds like they are trying to fix some issues and complete some more testing before letting us all play with it.

11 Nov 2011

Still a few more bugfixes to push to the beta server, but getting there :) Emilio will have more for you start of next week as soon as it gets pushed...

14 Nov 2011

Emilio just posted the latest beta support for uVision, Code Red and GCC.

Details now in the handbook:

Please tell us how you get on!

Simon