weird(?) rom section origin in stm32f103cb.ld

Hello dear RIOT developers,

we came across the following spec in the linker script cpu/stm32f1/ldscripts/stm32f103cb.ld:

    rom (rx) : ORIGIN = 0x08005000, LENGTH = 128K-0x5000

Is there a specific reason why the ISR vector table is placed at address 0x08005000 instead of 0x08000000 as usual? I found that at least for my board[1], the address 0x08000000 works while 0x08005000 does not.

[1]    (For some reason, we have decided to use CPU = stm32f1 and    CPU_MODEL = stm32f103cb hence the mentioned linker script is used.)

Grüße Olaf

“As usual” = as in the other related cpu specs, say, stm32f103c8.ld or stm32f103rb.ld. Has anyone ever actually tried the cb variant? I don’t even understand how it could work; those vectors need to be at 0x08000000.

Grüße, Carsten


took me some minutes to remember, but the reason is quite simple, though stupid: the stm32f103rb was imported while porting the spark-core board. Now the spark-core is does some hacky things (i.e. some custom bootloader stuff), so it expects the ISR table at addr

Hauke Petersen <> writes:

This should of course not be reflected in the default linkerscript for the stm32f103rb... Here is a fix [1].

Great, thank you!

Grüße Olaf