cancel
Showing results for 
Search instead for 
Did you mean: 

portability between different Cortex-M processors

YShko.1
Associate II

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

1 ACCEPTED SOLUTION

Accepted Solutions

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

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..

View solution in original post

3 REPLIES 3
MM..1
Chief III

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...

S.Ma
Principal

Even if cortex M0 instruction set is a M3 subset, memory mapping, interrupt table, peripheral IP version may not make a binary compatible solution.

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

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..