Port Cortex-M4F to Cortex-M0

Asked by Andrew Neil

I have a project on a Cortex-M4F; it uses the floating-point hardware, and CMSIS libraries.

How easy is it likely to be to port to a Cortex-M0 - is it simply a matter of changing the compiler switch(es) to use soft FP?

I realise, of course, that there will be a performance hit.

Question information

Language:
English Edit question
Status:
Answered
For:
GNU Arm Embedded Toolchain Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Andre Vieira (andre-simoesdiasvieira) said :
#1

Hi Andrew,

If you compile for Cortex-M0 using '-mcpu=cortex-m0' you will not need to set the -mfloat-abi option as this will by default be 'soft', though if you were using '-mfloat-abi=hard/softfp' you should obviously remove that from your compilation command line. Apart from that and making sure you change your CMSIS libraries to use the Cortex-M0 appropriate CMSIS, I suspect from a compiler point of view you shouldnt need to make any more changes.

Other things you might want to think about apart from speed is the size of your application, different boards come with different memory sizes and so on, and whether your application addresses any memory mapped registers to control board specific things like LEDS or sensors.

Revision history for this message
Andrew Neil (u-upuntu-s) said :
#2

OK - thanks for that.

I'm familiar with "general" porting - my big doubt was whether the FP "porting" was just a matter of compiler switches or not.

Can you help with this problem?

Provide an answer of your own, or ask Andrew Neil for more information if necessary.

To post a message you must log in.