FreeRTOS port for ARM M4, no FPU, no MPU

dcrocker wrote on Wednesday, March 28, 2018:

Does any one have version 10.0 port files for an ARM Cortex M4 without floating point or MPU? The files in the version 10 distribution include M4F and M4_MPU but not plain M4. There is a version in Atmel Software Framework for the SAM4S chip that I need to target, but it’s for FreeRTOS version 7.

Alternatively, can someone tell me which bits of the M4F port files I need to strip out to support a M4 without FPU? The application needs to support M4F processors too, so adding conditionals to the M4F port files might be an attractive solution.

btw the application is open source 3D printer control firmware, see https://github.com/dc42/RepRapFirmware.

Thanks in advance - David

rtel wrote on Wednesday, March 28, 2018:

If you have a Cortex-M4 with floating point then use the port files in
FreeRTOS/source/portable/[compiler]/ARM_CM4F

If you have a Cortex-M4 without a floating point unit, or a Cortex-M3,
then use the port files in FreeRTOS/source/portable/[compiler]/ARM_CM3

dcrocker wrote on Wednesday, March 28, 2018:

Thanks, I didn’t know that the M4 without FP was compatible with M3 as far as FreeRTOS is concerned.

Dear Richard and SAM4S-Users,
I want to move our project from v9.0 (using the IAR/CM3 port) to most current 10 (202012.00) AND we are using the SAM4S which is a Cortex-M4 with MPU but w/o FP.

Is your 2018 response:
If you have a Cortex-M4 without a floating point unit, or a Cortex-M3,
then use the port files in FreeRTOS/source/portable/[compiler]/ARM_CM3
still valid?

This then includes the fact that use of the MPU in this specific CPU is not supported.
Is this correct or is it worth to try the v10.4.3 IAR/CM4F_MPU but "remove all the FP dependencies … " [i.e. “__ARMVFP__”] ?

Kind regards, Stephan

Do you want to use the MPU? If no, then yes the information is still valid you should just use the CM3 port.

YES:) I want to use the MPU!
Meanwhile I checked that “ARMVFP” is used only as a “warning” message, not not elsewhere…
So I could use the M4F_MPU and remove the “ARMVFP” section - shouldn’t I?
Best, Stephan

Why not use the ARM_CM3_MPU port if you don’t want the FPU supported?

a simple answer:
there is no ARM_CM3_MPU in .\FreeRTOSv202012.00\FreeRTOS\Source\portable\IAR
:slight_smile:
Best, Stephan

Ah, ok. I was looking at the GCC directory. Would suggest diff’ing the two GCC versions to see what needs to be done. For the most part, it is removing lines of code, although take care in the context switch code where the push and pop multiple instructions use slightly different registers.