打印

LPC2478 RAM合并问题请教

[复制链接]
1194|0
手机看帖
扫描二维码
随时随地手机跟帖
跳转到指定楼层
楼主
saddam|  楼主 | 2014-6-19 11:54 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式

各位有没有用LPC2478或者这个系列的片子的?LPC2478有98kB RAM其中CPU用的64kB,以太网用的16kB,DMA用的16kB,
现在我64kB的RAM不够用了,想把以太网或者DMA的RAM给CPU用,我用的IAR,根据IAR开发指导中的描述修改了一下,但是程序跑起来问题很多,大家有谁这么干过的给指导一下啊!

红色的是我改的部分

*###ICF### Section handled by ICF editor, don't touch! ****/
/*-Editor annotation file-*/
/* IcfEditorFile="$TOOLKIT_DIR$\config\ide\IcfEditor\a_v1_0.xml" */
/*-Specials-*/
define symbol __ICFEDIT_intvec_start__ = 0x00000000;
/*-Memory Regions-*/
define symbol __ICFEDIT_region_ROM_start__ = 0x00000044;
define symbol __ICFEDIT_region_ROM_end__   = 0x0007FFFF;
define symbol __ICFEDIT_region_RAM_start__ = 0x40000040;
define symbol __ICFEDIT_region_RAM_end__   = 0x4000FFFF;
/*-Sizes-*/
define symbol __ICFEDIT_size_cstack__   = 0x500;
define symbol __ICFEDIT_size_svcstack__ = 0x100;
define symbol __ICFEDIT_size_irqstack__ = 0x100;
define symbol __ICFEDIT_size_fiqstack__ = 0x40;
define symbol __ICFEDIT_size_undstack__ = 0x10;
define symbol __ICFEDIT_size_abtstack__ = 0x10;
define symbol __ICFEDIT_size_heap__     = 0x4000;
/**** End of ICF editor section. ###ICF###*/

define symbol __region_EMAC_DMA_RAM_start__ = 0x7FE00000;
define symbol __region_EMAC_DMA_RAM_end__   = 0x7FE03FFF;

define memory mem with size = 4G;
define region ROM_region        = mem:[from __ICFEDIT_region_ROM_start__            to __ICFEDIT_region_ROM_end__];
define region RAM_region        = mem:[from __ICFEDIT_region_RAM_start__            to __ICFEDIT_region_RAM_end__]
                                 |mem:[from __region_EMAC_DMA_RAM_start__  to __region_EMAC_DMA_RAM_end__];


define symbol __region_USB_DMA_RAM_start__  = 0x7FD00000;
define symbol __region_USB_DMA_RAM_end__    = 0x7FD03FFF;
define region USB_DMA_RAM_region= mem:[from __region_USB_DMA_RAM_start__    to __region_USB_DMA_RAM_end__];

define symbol __region_SDRAM_RAM_start__ = 0xA0000000;
define symbol __region_SDRAM_RAM_end__   = 0xA1FFFFFF;
define region SDRAM_region= mem:[from __region_SDRAM_RAM_start__  to __region_SDRAM_RAM_end__];

define block CSTACK    with alignment = 8, size = __ICFEDIT_size_cstack__   { };
define block SVC_STACK with alignment = 8, size = __ICFEDIT_size_svcstack__ { };
define block IRQ_STACK with alignment = 8, size = __ICFEDIT_size_irqstack__ { };
define block FIQ_STACK with alignment = 8, size = __ICFEDIT_size_fiqstack__ { };
define block UND_STACK with alignment = 8, size = __ICFEDIT_size_undstack__ { };
define block ABT_STACK with alignment = 8, size = __ICFEDIT_size_abtstack__ { };
define block HEAP      with alignment = 8, size = __ICFEDIT_size_heap__     { };

initialize by copy { readwrite };
do not initialize  { section .noinit };
do not initialize  { section USB_DMA_RAM };

place at address mem:__ICFEDIT_intvec_start__ { readonly section .intvec };

place in ROM_region   { readonly };
place in RAM_region   { readwrite section .bss,readwrite section .iar.dynexit,
                        readwrite section .data,block CSTACK, block SVC_STACK, block IRQ_STACK, block FIQ_STACK,
                        block UND_STACK, block ABT_STACK,};
place in USB_DMA_RAM_region
                      {block HEAP};
place in SDRAM_region { readwrite data section SDRAM };
define exported symbol SDRAM_BASE_ADDR = __region_SDRAM_RAM_start__;

相关帖子

发新帖 我要提问
您需要登录后才可以回帖 登录 | 注册

本版积分规则

4

主题

28

帖子

1

粉丝