Hello,
I use SES 4.52a and SEGGER Linker in my project.
I use MemoryMap.xml file to define Memory Segment :
And I use .icf file to define section.
In this exemple, if I build, the alignement=512 instruction is ignored by the linker. The real size of vectors is 404 bytes and the linker place the code directly after the vector and not after the the alignement instruction.
vector : 0x0801000 to 0x08010193 instead of 0x0801000 to 0x08010200.
If I use the keep instruction, she is also ignored by the linker.
The .map file shows an alignment of 2 or 4 but never beyond.
This problem is found in the following case too.
Have you ever encountered this problem ?
Thank you for you reply
I use SES 4.52a and SEGGER Linker in my project.
I use MemoryMap.xml file to define Memory Segment :
Source Code
- <MemorySegment name="APP_Code_region_ROM" start="0x08010000" size="0x70000" alignment="16" access="ReadOnly" />
- <MemorySegment name="APP_region_RAM1" start="0x20001000" size="0x1F000" access="Read/Write" />
- <MemorySegment name="APP_region_RAM2" start="0x20020000" size="0x8000" access="Read/Write" />
In this exemple, if I build, the alignement=512 instruction is ignored by the linker. The real size of vectors is 404 bytes and the linker place the code directly after the vector and not after the the alignement instruction.
vector : 0x0801000 to 0x08010193 instead of 0x0801000 to 0x08010200.
If I use the keep instruction, she is also ignored by the linker.
The .map file shows an alignment of 2 or 4 but never beyond.
This problem is found in the following case too.
Source Code
- place in FLASH with fixed order, alignment=16 { section .init, section .init.*, // Init code section
- section .init_rodata, section .init_rodata.*, // Init read-only section
- section .text, section .text.*, // Code section
- section .rodata, section .rodata.*, // Read-only data section
- section .segger.*, // Auto-generated initialization
- block exidx, // ARM exception unwinding block
- block ctors, // Constructors block
- block dtors // Destructors block
- };
Have you ever encountered this problem ?
Thank you for you reply
Hardware and Software Developer.