2022-11-27 02:08 AM
I have a big project i wrote on stm32F030R8 board, which has M0 processor.
However I wat to move the project to another board with M3 processor, Does my code will work ? Or because this is a new board with a diffrent processor, I will need to amendment the code?
Thanks in advance
Solved! Go to Solution.
2022-11-27 06:50 AM
All the code dealing with the peripherals will need to be changed/adapted to address what's bolted to the core.
Going between Cortex-Mx parts will be a matter of recompilation, and linking of appropriate libraries.
Assembler code will need to change based on the instruction set implemented. The direction you suggest should be fine, the issue would be that CM0 is a smaller subset of what the CM3, CM4, etc support.
Expect to have to do some porting work.
Expect to have to go over the pins and ensure the plumbing to the peripherals used.
Code migration with HAL isn't unduly painful
2022-11-27 04:52 AM
If you ask your builded bin or source directly reply = NO
But if you write project properly and some parts is generated MX you can migrate...
2022-11-27 05:09 AM
Even if cortex M0 instruction set is a M3 subset, memory mapping, interrupt table, peripheral IP version may not make a binary compatible solution.
2022-11-27 06:50 AM
All the code dealing with the peripherals will need to be changed/adapted to address what's bolted to the core.
Going between Cortex-Mx parts will be a matter of recompilation, and linking of appropriate libraries.
Assembler code will need to change based on the instruction set implemented. The direction you suggest should be fine, the issue would be that CM0 is a smaller subset of what the CM3, CM4, etc support.
Expect to have to do some porting work.
Expect to have to go over the pins and ensure the plumbing to the peripherals used.
Code migration with HAL isn't unduly painful