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

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

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

1,666 次查看
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?
标签 (1)
0 项奖励
回复
3 回复数

1,653 次查看
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 项奖励
回复

1,653 次查看
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 项奖励
回复

1,654 次查看
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 项奖励
回复