cancel
Showing results for 
Search instead for 
Did you mean: 

Switching a code base from stm32l010RB to stm32L010K4

rsoc
Associate III

Hi,

I am currently trying to switch my code base from the RB version of the L010 family to the K4 version. I am doing this because the dev board I prototyped on was for the RB variant. I am building with arm (Keil).

I am running into some issues in this switch, and want to confirm if I am missing any steps:

  • switch the startup scripts
  • change the chip target in the compiler and flash programming algorithm
  • change preprocessor define from xB to x4 in the compiler settings

When did these steps, the code builds and programs fine, but nothing executes. It looks like stuff is trying to execute from the wrong memory points (the stack pointer is at some crazy point in memory based on the assembly block of keil). Does anyone have insight into what I am missing? I feel like its obvious...

Thank you!

1 REPLY 1

> the stack pointer is at some crazy point in memory

Observe the stack pointer just after reset, i.e. stop at the very first instruction of the reset routine. Observe the first entry in vector table, i.e. at 0x0800'0000 - that's the value which should be loaded into SP.

JW