nxpUSBlib with CodeSourcery G++ (or GNU Arm Embedded)?

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

nxpUSBlib with CodeSourcery G++ (or GNU Arm Embedded)?

830 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by mozmck on Fri Jan 27 15:03:34 MST 2012
I'm trying to use the nxpUSBlib with CodeSourcery G++, and have run across stuff that appears to be specific to the CodeRed LPCXpresso compiler.  In particular there is a __DATA(USBRAM_SECTION) macro that part of the CodeRed stuff and looks like it depends on special named RAM sections in a CodeRed created linker script.

Is anyone using this library with CodeSourcery?  Is the __DATA(USBRAM_SECTION) necessary?
Labels (1)
0 Kudos
3 Replies

817 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by tuong on Tue Feb 14 19:38:48 MST 2012
Then you can do like this:

#if defined(__GNUC__)&&(!defined(__CODE_RED))
#undef__DATA(x)
#define __DATA(x)// your USB RAM section symbol ex: __attribute__((section("usbram"))) 
#endif
0 Kudos

817 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by mozmck on Thu Feb 09 15:51:32 MST 2012
That is correct for USBRAM_SECTION, but the __DATA macro is defined in a file called cr_section_macros.h that only comes with the CodeRed compiler/IDE as far as I can tell.
0 Kudos

818 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by hoan on Tue Jan 31 12:11:35 MST 2012
USBRAM_SECTION is defined in HAL_LPC17xx.h as RAM2 or HAL_LPC... whatever processor you are using.  For LPC17xx, it is the 2nd 32K sram section often refered as AHB ram.  You need to define it in the linker script or change it.  
0 Kudos