Adding support for mbed build & export to LPCXpresso

A 40 Pin Dip packaged development board enabling you to create internet connected products

Adding support for mbed build & export to LPCXpresso

Postby donster2k » Wed Aug 06, 2014 7:58 pm

Hi There,
I'm in the process of adding support to mbed for building and exporting of WifiDipcortex projects to LPCExpresso.

So, what I hope should happen, is that once this is complete, it should be possible to export WifiDipcortex projects (such as the kitchen sink demo) to LPCXpresso from the online compiler. It should also be possible to use the offline mbed tools and the compiler provided by LPCXpresso to build the mbed SDK and projects for WifiDipcortex projects.

I think I have everything done, other than having a valid startup_LPC13Uxx.cpp file that is supported by the mbed build.
According to the mbed website:
The Silicon Vendor is providing the files for the startup, system initialization, the structures and addressed of the peripherals registers, for a given DEVICE:

startup_DEVICE.s
system_DEVICE.c
system_DEVICE.h
DEVICE.h


Do you have any idea how I would go about getting these files?

I've tried using the cr_startup_lpc13u.c from the kitchen sink demo, but get the following:
Code: Select all
$ python workspace_tools/make.py -m LPC1347 -t GCC_CR -p 0
Building project BASIC (LPC1347, GCC_CR)
Compile: main.cpp
Compile: test_env.cpp
Link: basic
[ERROR] c:/nxp/lpcxpresso_7.3.0_186/lpcxpresso/tools/bin/../lib/gcc/arm-none-eabi/4.8.4/../../../../arm-none-eabi/bin/ld.exe: warning: cannot find entry symbol Reset_Handler; defaulting to 00000000
f:\mbed\build\mbed\TARGET_LPC1347\TOOLCHAIN_GCC_CR\cr_startup_lpc13u.o: In function `ResetISR':
cr_startup_lpc13u.c:(.after_vectors+0x88): undefined reference to `__data_section_table'
cr_startup_lpc13u.c:(.after_vectors+0x8c): undefined reference to `__data_section_table_end'
cr_startup_lpc13u.c:(.after_vectors+0x90): undefined reference to `__bss_section_table_end'
f:\mbed\build\mbed\TARGET_LPC1347\TOOLCHAIN_GCC_CR\cr_startup_lpc13u.o:(.isr_vector+0x0): undefined reference to `_vStackTop'
c:/nxp/lpcxpresso_7.3.0_186/lpcxpresso/tools/bin/../lib/gcc/arm-none-eabi/4.8.4/../../../../arm-none-eabi/lib/armv7-m\libc.a(lib_a-sbrkr.o): In function `_sbrk_r': sbrkr.c:(.text._sbrk_r+0xc): undefined reference to `_sbrk'
collect2.exe: error: ld returned 1 exit status


BR,
Donal
donster2k
 
Posts: 7
Joined: Tue Mar 18, 2014 9:25 pm

Re: Adding support for mbed build & export to LPCXpresso

Postby Carl-SolderSplash » Thu Aug 07, 2014 1:38 pm

Hi,

Good work so far,

You will find your files in the CMSIS zip files in lpcxpresso.

\lpcxpresso\Examples\NXP\LPC1000\LPC13xx_12bitADC\LPC13Uxx_LatestCMSIS_Libraries.zip

i'm not sure about the .s file is that a library file?
User avatar
Carl-SolderSplash
Site Admin
 
Posts: 223
Joined: Sun Mar 17, 2013 11:15 pm

Re: Adding support for mbed build & export to LPCXpresso

Postby donster2k » Thu Aug 07, 2014 10:46 pm

Hi Carl,
Cheers for the info.
I managed to get the SDK & some test programs compiling using the LPCXpresso IDE for the LPC1347. I took the system file from LPC13Uxx_LatestCMSIS_Libraries.zip, and had to take the startup file from C:\nxp\LPCXpresso_7.3.0_186\lpcxpresso\Wizards\System\NXP\LPC13Uxx\Common
The linker scripts are auto-generated when you create a new project, so I had to copy them out of a new project into the SDK.
Only problem is, I can drag & drop the bin files onto the board using the 'CRP Disabled' interface, but the applications don't appear to run. Any ideas on how to best approach this?

Also, the PinName enum for the LEDs is wrong in the mbed SDK for your LPC1347 boards. LED1 should be P0_1 and LED2 should be P1_22.

BR,
Donal
donster2k
 
Posts: 7
Joined: Tue Mar 18, 2014 9:25 pm

Re: Adding support for mbed build & export to LPCXpresso

Postby Carl-SolderSplash » Sun Aug 10, 2014 8:34 pm

Are you using windows? if so boot loading via mass storage should work. Other OS's copy to the fake mass storage device differently so require the use of other tools.

It sounds like you have a hard fault, an LPC Link2 jtag would be useful you can then find the reason. I did try porting mbed to lpcxpresso a while ago but with an older version the compiler has since been updated and optomised so you may have more luck.

My attempt is here : https://github.com/SolderSplashLabs/Dipcortex-mbed
User avatar
Carl-SolderSplash
Site Admin
 
Posts: 223
Joined: Sun Mar 17, 2013 11:15 pm


Return to WiFi DipCortex

Who is online

Users browsing this forum: No registered users and 5 guests

cron