FreeRTOS port for ARM Cortex-R5F with GHS compiler

rammohankn wrote on Wednesday, April 06, 2016:

Has anybody tried porting FreeRTOS for ARM Cortex-R5F with GHS ARM Compilers ?

rtel wrote on Wednesday, April 06, 2016:

I’m not aware of any I’m afraid, but it is just another compiler, so I can’t imagine it would be too much different to the other compilers supported. Normally it will only be the assembler syntax, and perhaps some function qualifiers, that will differ between compilers.

rammohankn wrote on Thursday, April 07, 2016:

Starting everything from scratch would obviously consume time, was wondering if any one has already tried ARM-Cortex R5F with GHS

westmorelandeng wrote on Thursday, April 07, 2016:

Hello Rammohan,

I am not sure you’d have to start from scratch - there are some ports with other compilers for the R4F - I would start with those. There is also some code in the user contributed code on the web-site that could be worth looking at.

Like mentioned before - the usual ‘worst’ issues when a similar port exists are:

pragmas
assembly directives (and sometimes differences in assembler syntax - speaking of ARM here)
stack frame(s) - how are certain args pushed/popped - there could be some differences here - and also what are the architectural differences between the R4F and R5F. You’d have to include those; if any.

The specific files to look at are (usually) in portable\your-compiler\port.c, portASM.asm, and portmacro.h.

You should start with one of the ports and give it a try - probably won’t be too bad or take too long.

Regards,
John W.

rammohankn wrote on Thursday, April 07, 2016:

Yes I was looking at R4F ports, which will be my starting point.

rtel wrote on Thursday, April 07, 2016:

I would recommend looking at the files in the
\FreeRTOS\Source\portable\GCC\ARM_CR5 directory.

The port.c file there should require very few changed:

__attribute__(( used )) is used in a couple of placed to prevent the 
linker removing symbols that are used in the asm code.

__asm volatile () is also used.  __asm is supported by most compilers, 
but you might need to remove the 'volatile'.

The portASM.S file in that directory will no doubt need some translating
to use the GH syntax, but the asm instructions themselves can remain.