Electronic – How to update MCU application

keilnucleostm32stm32cubemx

I'm currently developing with Keil µvision5 and STM32CubeMX on a Nucléo Board L053R8 (LQP64). Now I would like to transfer my program to my prototype board which has a STM32F051K6T8 (LQP32).

Do I have to re-code it ? Or can I just import my file?

I have tried to create a new project and import file one by one but it still link with my old project.

Do I have to change the Include and Source file?

Best Answer

You have asked somewhat absurd question.

Do I have to re-code it ?

Of course! Start off by reading datasheet and listing what peripherals you used in your project. Although L0 is probably low power variant of F0, but you cannot guarantee everything is the same. For example, L0 operates at 32 MHz (maximum) but F0 can be clocked to 48 MHz and it doesn't seem to have "factory tested" USB hardware like L0.

Next thing to do is adapt your code. They both are Cortex M0 so the instruction set is the same and as I said before, change the code to suit the peripheral changes.