/*------------------------------------------------------------------------------*/
.icf
/*-Specials-*/
define symbol __ICFEDIT_intvec_start__ = 0x08000000;
/*-Memory Regions-*/
define symbol __ICFEDIT_region_ROM_start__ = 0x08000000;
define symbol __ICFEDIT_region_ROM_end__ = 0x0800FFFF;
define symbol __ICFEDIT_region_RAM_start__ = 0x20000240;
define symbol __ICFEDIT_region_RAM_end__ = 0x20016FFF;
/*-Sizes-*/
define symbol __ICFEDIT_size_cstack__ = 0x400;
define symbol __ICFEDIT_size_heap__ = 0x200;
/**** End of ICF editor section. ###ICF###*/
/* Rom에서 원하는 함수나 고정값을 넣을 영역 */
define symbol __ICFEDIT_Fixed_region_ROM_start__ = 0x08010000;
define symbol __ICFEDIT_Fixed_region_ROM_end__ = 0x0801FFFF;
/* Ram에서 원하는 변수를 넣을 영역 */
define symbol __ICFEDIT_Fixed_region_SRAM_start__ = 0x20000000;
define symbol __ICFEDIT_Fixed_region_SRAM_end__ = 0x200001FF;
define memory mem with size = 4G;
define region ROM_region = mem:[from __ICFEDIT_region_ROM_start__ to __ICFEDIT_region_ROM_end__];
define region Fixed_ROM_region = mem:[from __ICFEDIT_Fixed_region_ROM_start__ to __ICFEDIT_Fixed_region_ROM_end__];
define region Fixed_SRAM_region = mem:[from __ICFEDIT_Fixed_region_SRAM_start__ to __ICFEDIT_Fixed_region_SRAM_end__];
define region RAM_region = mem:[from __ICFEDIT_region_RAM_start__ to __ICFEDIT_region_RAM_end__];
place in Fixed_ROM_region {readonly object Fixed_ROM.o};
place in Fixed_SRAM_region {readwrite section .Fixed_Sram };
initialize by copy { readwrite };
do not initialize { section .noinit };
initialize by copy { section .Fixed_Sram };
/*------------------------------------------------------------------------------*/
Fixed_ROM.c
/*------------------------------------------------------------------------------*/
int FixedData(int a, int b)
{
return (a+b);
}
/*------------------------------------------------------------------------------*/
Fixed_SRAM.c
/*------------------------------------------------------------------------------*/
#pragma section =".Fixed_Sram"
#pragma default_variable_attributes = @ ".Fixed_Sram"
uint32_t FixedSRAMData[10];
/* Stop placing data in section Fixed_SRAM_region */
#pragma default_variable_attributes =
/*------------------------------------------------------------------------------*/
'초보의 아웅다웅 설계하기 > STM32' 카테고리의 다른 글
error C1189: #error : MFC does not support WINVER less than 0x0501. (0) | 2018.07.18 |
---|---|
Buzzer Melody (0) | 2018.07.16 |
STM32L432 Read Protection 버그인가? (0) | 2018.06.28 |
STM32L4xx에서 Brownout, ReadOut Protection 설정 (0) | 2018.06.26 |
STM32L4 ADC Low Layer Driver (1) | 2018.05.30 |