RAM Region

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

RAM Region

950 次查看
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by nkarakotas on Mon Dec 19 01:00:11 MST 2011
Hi,

In my application im not using the USB and I would like to use the 16K available in the RamAHB32 region. How do I define this in code red? Do I need to make my own linker scripts? I have read the enhance manged link scripts page but not sure yet how to define a new region. Any examples will be appreciated.

Regards,
Nick
0 项奖励
回复
2 回复数

937 次查看
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by nkarakotas on Mon Dec 19 07:05:49 MST 2011
Hi,

I tried that but I was receiving an error when starting debug and I thought I was doing something wrong. It turned out that something else was at fault and not the defines I used.
0 项奖励
回复

937 次查看
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by Ex-Zero on Mon Dec 19 04:37:36 MST 2011
#1 If you create a new LPCXpresso C project the managed linker script is reserving MCU SRAM sections for you

#2 Section macros are included if you select 'Enable CRP in target image'.

#3 Now you can switch your data section as described in :

http://support.code-red-tech.com/CodeRedWiki/EnhancedManagedLinkScripts

 __BSS(RAM2)  unsigned char array[128];        //128 byte array
 __DATA(RAM2) unsigned char text1[5] ={'T','e','s','t','1'};  //string
#4 Your map file will show you where this data are placed now :rolleyes:

#5 Note: If you don't find this data in your map file, your linker didn't include them because they aren't used (and therefore optimised out)  :eek:
0 项奖励
回复