Port for Atmel SAM4SD32C

sircorono wrote on Tuesday, August 22, 2017:

Hi
I’m working for the first time with FreeRTOS using a testboard from Atmel (ATSAM4S-XPRO) with the ARM processor SAM4SD32C (Atmel Studio 7.0, FreeRTOS 9.0)
http://www.microchip.com/DevelopmentTools/ProductDetails.aspx?PartNO=ATSAM4S-XPRO

I’ve added the FreeRTOS framework but I don’t know which port I have to use. I tried different ones, but all gave an error. My guess was to use the GCC->ARM_CM4_MPU. Then there are compiler errors:
http://imgur.com/jMaVOk8

When I switch from Thumb mode to ARM mode, there are other errors:
http://imgur.com/hroRLnN

Both modes don’t work! Do I need a different port? Or is FreeRTOS not working with this controller?

Thanks!
Sebastian

rtel wrote on Tuesday, August 22, 2017:

Hi
I’m working for the first time with FreeRTOS using a testboard from
Atmel (ATSAM4S-XPRO) with the ARM processor SAM4SD32C (Atmel Studio 7.0,
FreeRTOS 9.0)
http://www.microchip.com/DevelopmentTools/ProductDetails.aspx?PartNO=ATSAM4S-XPRO

If that part has a floating point unit then use the port layer in
FreeRTOS/Source/portable/GCC/ARM_CM4F, otherwise use the port layer in
FreeRTOS/Source/portable/GCC/ARM_CM3 (even though it is an M4 part).

When I switch from Thumb mode to ARM mode, there are other errors:
http://imgur.com/hroRLnN

That part does not have an ARM mode, just THUMB2.

sircorono wrote on Wednesday, August 23, 2017:

Hi
According to this page, the controller has a FPU:
http://www.microchip.com/wwwproducts/en/ATSAM4SD32C

However, the ARM_CM4F port does not work:
http://imgur.com/iPWuD3T

But the ARM_CM3 works, thanks for the help. I didn’t try this because I have a Cortex M4.

Sebastian

rtel wrote on Wednesday, August 23, 2017:

From the screenshot you provided I can see that you are not using the
correct compiler settings. If you tell the compiler you don’t have a
floating point unit then it will not allow floating point instructions.
Double check the compiler settings to ensure you both specify that
hardware floating point is present, and which hardware floating point
unit the device has - these must be on the command line sent to the
compiler.

sircorono wrote on Thursday, August 24, 2017:

Hi

Found it here:
http://www.atmel.com/Images/Atmel-42144-SAM4E-FPU-and-CMSIS-DSP-Library_AP-Note_AT03157.pdf

-mfpu=fpv4-sp-d16 -mfloat-abi=softfp was missing.

Thanks for the help.