Hi,
I'm working on EEPROM emulation on Nucleo stm32F401.
I changed the C program and the linker script according to requirements.
In C:
const char eepromBank[0x8000] attribute((section(".eeprom"), used)) = {0};
and in NUCLEO_F401RE.ld script:
MEMORY
{
VECTOR (rx) : ORIGIN = 0x8000000, LENGTH = 16K
EEPROM (rx) : ORIGIN = 0x8004000, LENGTH = 32K
FLASH (rx) : ORIGIN = 0x0800C000, LENGTH = 464K
/* CCM (rwx) : ORIGIN = 0x10000000, LENGTH = 64K */
RAM (rwx) : ORIGIN = 0x20000194, LENGTH = 96k - 0x194
}
.isr_vector :
{
. = ALIGN(4);
KEEP(*(.isr_vector)) /* Startup code */
- (.text.*Handler)
. = ALIGN(4);
} >VECTOR
.eeprom :
{
Unfortunately, after these changes the program was not properly being linked (no isr_vector at the beginning of executable file).
After a long search I found a solution (http://tiny.pl/qvcpx). In file 'startup_STM32F40x.s' I had to change the declaration
".section .isr_vector" to ".section .isr_vector,"a",%progbits".
Who can make such a change in the mbed library (in repository)?
Hi,
I'm working on EEPROM emulation on Nucleo stm32F401. I changed the C program and the linker script according to requirements.
In C: const char eepromBank[0x8000] attribute((section(".eeprom"), used)) = {0};
and in NUCLEO_F401RE.ld script:
MEMORY { VECTOR (rx) : ORIGIN = 0x8000000, LENGTH = 16K EEPROM (rx) : ORIGIN = 0x8004000, LENGTH = 32K FLASH (rx) : ORIGIN = 0x0800C000, LENGTH = 464K /* CCM (rwx) : ORIGIN = 0x10000000, LENGTH = 64K */ RAM (rwx) : ORIGIN = 0x20000194, LENGTH = 96k - 0x194 }
.isr_vector : { . = ALIGN(4); KEEP(*(.isr_vector)) /* Startup code */
.eeprom : {
Unfortunately, after these changes the program was not properly being linked (no isr_vector at the beginning of executable file). After a long search I found a solution (http://tiny.pl/qvcpx). In file 'startup_STM32F40x.s' I had to change the declaration ".section .isr_vector" to ".section .isr_vector,"a",%progbits".
Who can make such a change in the mbed library (in repository)?