Problem with ‘--gc-sections’ at link time
I am building with 4.7 2013q1 a project for STM32F4.
I have this array in flash defined in stm32f4_discovery.c
const uint32_t BUTTON_CLK[BUTTONn] = {USER_BUTTON_
If I enable removal of unused sections BUTTON_CLK[0] result = 0xFFFFFFFF
If I disable removal of unused sections BUTTON_CLK[0] result = 1
I tried to print removed section using --print-gc-sections
but none section belongs to stm32f4_discovery
Dulcis in fundo
This error disappears if the call to function SystemInit() is commented out and
sections of system_stm32f4xx.c (where is defined SystemInit() ) are not removed.
IMHO this could be a linker bug but naturally I am not sure of this so
if someone can give me some good advice on what to check I will grate.
I can upload my project if someone is interested in to deeper check.
Ciao
Marco
Question information
- Language:
- English Edit question
- Status:
- Solved
- Assignee:
- No assignee Edit question
- Solved by:
- Marco Piovesan
- Solved:
- Last query:
- Last reply: