0% found this document useful (0 votes)
58 views3 pages

Cortex M55 FreeRTOS Porting

The document provides guidance on porting FreeRTOS from ARM Cortex-M4 to Cortex-M55, focusing on modifying the linker script, startup file, compiler flags, and FreeRTOS port. It emphasizes the need to update memory regions in the linker script, check for specific startup files, and ensure compatibility with hardware peripherals. Additionally, it suggests recompiling and debugging the project after making the necessary changes.

Uploaded by

Abhradeep
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
58 views3 pages

Cortex M55 FreeRTOS Porting

The document provides guidance on porting FreeRTOS from ARM Cortex-M4 to Cortex-M55, focusing on modifying the linker script, startup file, compiler flags, and FreeRTOS port. It emphasizes the need to update memory regions in the linker script, check for specific startup files, and ensure compatibility with hardware peripherals. Additionally, it suggests recompiling and debugging the project after making the necessary changes.

Uploaded by

Abhradeep
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 3

Cortex M55 FreeRTOS Porting

So the FreeRTOS that I was working on previously had ARM


Cortex M4 on which the RTOS was working ... in which file
can I see the linking also if I hd to change it to ARM Cortex
M55 how would I do it?

In FreeRTOS, the linking and memory layout are typically handled by the linker script and
startup code. Here’s how you can locate and modify these files:

1. Finding the Linker Script


The linker script is usually named *.ld (GCC) or *.icf (IAR).

In your case (Cortex-M4 with GCC), look for a file like:


bash

FreeRTOS/portable/GCC/ARM_CM4F/linker_script.ld

or in your BSP (Board Support Package) directory:

bash

Your_Project/Board_Support/linker_script.ld

If using ARM Compiler, the script might be named *.sct .

2. Changing from Cortex-M4 to Cortex-M55


The steps to migrate FreeRTOS from Cortex-M4 to Cortex-M55:

(A) Modify the Linker Script ( .ld or .sct )

Update the memory regions to match the new chip.

Example:
ld

1/3
MEMORY
{
FLASH (rx) : ORIGIN = 0x08000000, LENGTH = 512K
RAM (rwx) : ORIGIN = 0x20000000, LENGTH = 256K
}

Cortex-M55 might have different Flash and RAM mapping, so refer to its datasheet.

(B) Update the Startup File ( startup_xxx.s )

The startup file ( startup_<chip>.s ) contains vector table and initialization code.

Check if there's a specific startup_M55.s available.

If you modify an M4 startup file, update the vector table and system initialization.

(C) Change CPU Architecture in Compiler Flags

In Makefile/CMake:

make

-mcpu=cortex-m4 -mfpu=fpv4-sp-d16 -mfloat-abi=hard

Change to:

make

-mcpu=cortex-m55 -mfloat-abi=hard

If using ARM Compiler:


make

--cpu=Cortex-M4

Change to:

make

--cpu=Cortex-M55

(D) Update FreeRTOS Port

FreeRTOS has specific ports for different ARM Cortex cores.

2/3
Check FreeRTOS/portable/GCC/ARM_CM55/ for a port, or adapt ARM_CM4F .

(E) Check Hardware Peripherals and CMSIS

The SystemInit() function in system_<chip>.c might need modification.

Update CMSIS headers to match Cortex-M55.

3. Testing and Debugging


Recompile the project and flash it to the Cortex-M55 target.

Debug using GDB/OpenOCD or your IDE's debugger.

If the system crashes, check vector table alignment and clock configuration.

Would you like help with a specific step, such as modifying the linker script?

3/3

You might also like