Content originally posted in LPCWare by lifejoker on Thu May 15 02:11:51 MST 2014
hi,bavarian,thanks so much about your reply.
Refer to the example and what you said, I changed the configuration about my .icf file as blow:
/*###ICF### Section handled by ICF editor, don't touch! ****/
/*-Editor annotation file-*/
/* IcfEditorFile="$TOOLKIT_DIR$\config\ide\IcfEditor\cortex_v1_0.xml" */
/*-Specials-*/
define symbol __ICFEDIT_intvec_start__ = 0x1A000000;
/*-Memory Regions-*/
define symbol __ICFEDIT_region_ROM_start__ = 0x1A000114;
define symbol __ICFEDIT_region_ROM_end__ = 0x1A07FFFF;
define symbol __ICFEDIT_region_RAM_start__ = 0x28000100;
define symbol __ICFEDIT_region_RAM_end__ = 0x29FFFFFF;
define symbol __ICFEDIT_region_IRAM_start__ = 0x10080000;
define symbol __ICFEDIT_region_IRAM_end__ = 0x10089FFF;
/*-Sizes-*/
define symbol __ICFEDIT_size_cstack__ = 0x800;
define symbol __ICFEDIT_size_heap__ = 0x5000;
/**** End of ICF editor section. ###ICF###*/
/********** Flash BankB Region **********/
define symbol __ICFEDIT_region_ROM_BANKB_start__ = 0x1B000000;
define symbol __ICFEDIT_region_ROM_BANKB_end__ = 0x1B07FFFF;
/********** Local SRAM Region **********/
define symbol LOCAL_SRAM_start__ = 0x10080000;
define symbol LOCAL_SRAM_end__ = 0x10089FFF;
/********** AHB SRAM Region 1 **********/
define symbol AHB_SRAM1_start__ = 0x20000000;
define symbol AHB_SRAM1_end__ = 0x20007FFF;
/********** AHB SRAM Region 2 **********/
define symbol AHB_SRAM2_start__ = 0x20008000;
define symbol AHB_SRAM2_end__ = 0x2000BFFF;
/********* ETB/AHB SRAM Region *********/
define symbol ETB_SRAM_start__ = 0x2000C000;
define symbol ETB_SRAM_end__ = 0x2000FFFF;
/********* CRP REGION *********/
define symbol __CRP_start__ = 0x1A0002FC;
define symbol __CRP_end__ = 0x1A0002FF;
/********* EEPROM REGION *********/
define symbol __EE_start__ = 0x20040000;
define symbol __EE_end__ = 0x20044000;
/********* EMC SDRAM Region *********/
/* 32Mbyte SDRAM at DYCS0 */
/* 0x100 are taken away at the beginning for the interrupt vectors */
define symbol EMC_SDRAM0_start__ = 0x28000100;
define symbol EMC_SDRAM0_end__ = 0x29FFFFFF;
/*define symbol SDRAM_vectors_start = 0x28000000;
export symbol SDRAM_vectors_start;*/
define memory mem with size = 4G;
define region ROM_region = mem:[from __ICFEDIT_region_ROM_start__ to __ICFEDIT_region_ROM_end__] - mem:[from __CRP_start__ to __CRP_end__];
define region ROM_BANKB_region = mem:[from __ICFEDIT_region_ROM_BANKB_start__ to __ICFEDIT_region_ROM_BANKB_end__];
define region RAM_region = mem:[from __ICFEDIT_region_RAM_start__ to __ICFEDIT_region_RAM_end__];
define region IRAM_region = mem:[from __ICFEDIT_region_IRAM_start__ to __ICFEDIT_region_IRAM_end__];
define region LOCAL_SRAM_region = mem:[from LOCAL_SRAM_start__ to LOCAL_SRAM_end__];
/*define region PD_LOCAL_SRAM_region = mem:[from PD_LOCAL_SRAM_start__ to PD_LOCAL_SRAM_end__];*/
define region AHB_SRAM1_region = mem:[from AHB_SRAM1_start__ to AHB_SRAM1_end__];
define region AHB_SRAM2_region = mem:[from AHB_SRAM2_start__ to AHB_SRAM2_end__];
define region ETB_SRAM_region = mem:[from ETB_SRAM_start__ to ETB_SRAM_end__];
define region CRP_region = mem:[from __CRP_start__ to __CRP_end__];
define region EEPROM_region = mem:[from __EE_start__ to __EE_end__];
define region SDRAM_region = mem:[from EMC_SDRAM0_start__ to EMC_SDRAM0_end__];
define block CSTACK with alignment = 8, size = __ICFEDIT_size_cstack__ { };
define block HEAP with alignment = 8, size = __ICFEDIT_size_heap__ { };
/*initialize by copy { readwrite };*/
initialize by copy { readonly, readwrite };
do not initialize { section .noinit };
do not initialize { section .eeprom };
place at address mem:__ICFEDIT_intvec_start__ { section .intvec };
/*place at address mem:SDRAM_vectors_start { section .vectors_SDRAM };*/
place in LOCAL_SRAM_region { section .local_sram };
place in PD_LOCAL_SRAM_region { section .pd_local_sram };
place at end of AHB_SRAM1_region { section .shared_data};
place in AHB_SRAM1_region { section .ahb_sram1 };
place in AHB_SRAM2_region { section .ahb_sram2 };
place in ETB_SRAM_region { section .etb_sram };
place in EEPROM_region { section .eeprom };
place in SDRAM_region { section .emc_sdram };
place at start of ROM_BANKB_region { section .M0_CODE };
place in CRP_region { section .crp };
place in ROM_region { readonly };
place in RAM_region { readwrite};
place in IRAM_region { block CSTACK, block HEAP };
and also changed the __vector_table[ ] llike what you did in project IAR_LPC4300_SDRAM_CONFIG.
I had one problem when I debug, in function SystemSetupClocking() , when I tired to use Chip_Clock_GetBaseClocktHz() to get CLK_BASE_MX clock, i found the base clock is power off.
I didnot what happened. do you have any idea what happened?
Looking forward to your reply.
Thanks so much .