Bug in startup file for Nucleo STM32f401?

27 Oct 2014

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 : {

  • (.eeprom) } >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)?

28 Oct 2014

Hi,

use github mbed repository please https://github.com/mbedmicro/mbed where you can send a pull request. I noticed most of nucleos does not have define vector section as progbits, but some do.

Regards,
0xc0170