I defined some constants in the specified area of flash,And can be successfully defined to the specified flash area,But when I downloaded and debugged, there was a phenomenon that flash could not be downloaded。
const volatile uint16_t Filter_parameter [512] __attribute __((section(“ FLASH_PAGE_1”)))= {200,4,250,4,0,10,3,0,0,0,0,0,0,0,0,0,150, 4,250,4,0,0,0,0,0,0,0,0,0,0,0,0};
MemoryMap.xml:
<!DOCTYPE Board_Memory_Definition_File>
<root name =“ MM32L062NT”>
<MemorySegment name =“ EEPROM1” start =“ 0x08006000” size =“ 0x00000400” access =“ ReadOnly” />
<MemorySegment name =“ FLASH” start =“ 0x08000000” size =“ 0x00010000” access =“ ReadOnly” />
<MemorySegment name =“ RAM” start =“ 0x20000000” size =“ 0x00004000” access =“Read/Write” />
</ root>
flash_placement.xml:
<MemorySegment name="EEPROM1" >
<ProgramSection name="FLASH_PAGE_1" load="Yes" />
But when I define constant data as follows, the debug download is normal。
const volatile uint16_t Filter_parameter [512] __attribute __((section(“.rodata”)))= {200,4,250,4,0,10,3,0,0,0,0,0,0,0,0,0,150, 4,250,4,0,0,0,0,0,0,0,0,0,0,0,0};
Is there a problem with the method I use?THKS
const volatile uint16_t Filter_parameter [512] __attribute __((section(“ FLASH_PAGE_1”)))= {200,4,250,4,0,10,3,0,0,0,0,0,0,0,0,0,150, 4,250,4,0,0,0,0,0,0,0,0,0,0,0,0};
MemoryMap.xml:
<!DOCTYPE Board_Memory_Definition_File>
<root name =“ MM32L062NT”>
<MemorySegment name =“ EEPROM1” start =“ 0x08006000” size =“ 0x00000400” access =“ ReadOnly” />
<MemorySegment name =“ FLASH” start =“ 0x08000000” size =“ 0x00010000” access =“ ReadOnly” />
<MemorySegment name =“ RAM” start =“ 0x20000000” size =“ 0x00004000” access =“Read/Write” />
</ root>
flash_placement.xml:
<MemorySegment name="EEPROM1" >
<ProgramSection name="FLASH_PAGE_1" load="Yes" />
But when I define constant data as follows, the debug download is normal。
const volatile uint16_t Filter_parameter [512] __attribute __((section(“.rodata”)))= {200,4,250,4,0,10,3,0,0,0,0,0,0,0,0,0,150, 4,250,4,0,0,0,0,0,0,0,0,0,0,0,0};
Is there a problem with the method I use?THKS