Hi.
I have tried using FreeRTOS 2 ways.
First way. using ‘CORTEX_R4_RM48_TMS570_CCS5’ in FreeRTOS8.0 on HDK(RM48L950, TI).
Second way. I make a new project with HALCoGen(RM48L950ZWT_FREERTOS) and change OS files, because those files already exist are version 7.4. So I make a project and change to 8.0 files.
But there are some errors in those ways…
Situation 1.
CCS(Code Composer Studio) 5.5
compiler version: TI v5.1.1
Runtime support library: rtsv7R4_T_le_v3D16_eabi.lib(Thumb mode)
There are 7 same errors when I build that project.
“[E0004} Operand must be a” in ‘portasm.asm’
Situation 2.
CCS(Code Composer Studio) 5.5
compiler version: TI v4.9.7
Runtime support library: rtsv7R4_A_le_v3D16_eabi.lib(Arm mode)
There are 6 errors as follows when I build it…
unresolved symbol vPortSWI, first referenced in sys_intvecs.obj
unresolved symbol vApplicationTickHook, first referenced in os_tasks.obj
unresolved symbol vApplicationStackOverflowHook, first referenced in os_tasks.obj
unresolved symbol vApplicatioinmallocFailedHook, first referenced in os_heap.obj
unresolved symbol vApplicationIdleHook, first referenced in os_tasks.obj
unresolved symbol __clz, first referenced in os_tasks.obj
How can I resolve this problem…
Those problems are exist both 2 ways. A difference of those situation is compiler and Runtime Library.
Those lines are macros, which themselves contain multiple lines of assembler code. I suspect the problem is related to a compiler version difference, and we need to determine which lines within those macros are causing the problem. Unfortunately I have just switched computers and don’t have CCS installed yet to look.
You will see the portRESTORE_CONTEXT definition within the same portASM.asm assembler file. Can you replace one of the calls to the portRESTORE_CONTEXT macros with the code from the macros definition (so comment out the call to portRESTORE_CONTEXT in one place and paste in the code from and including lines 67 to 116 - line numbers taken from an unmodified V8.0.1 version of the file). Once you have done that try compiling again and this time the line numbers will tell us the offending instructions.
You maybe confused portRESTORE_CONTEXT and portRESOTRE_SAVE.
67 to 116 line is portRESOTRE_SAVE.
So I replaced portRESTORE_SAVE to 67 ~ 116 line and portRESTORE_CONTEXT to 125~160.
That result is…
Error occurred at line 104(context), 140(save).
Those lines are same, BEQ PC+3
Ok - so this does look like this is a problem introduced by a compiler update. If it was GCC it would be easy to fix with a relative label, but I’m not sure if CCS has that capability, so lets try removing the branch altogether and instead use condition codes on the instructions. Please try the following:
I’m not sure about the warning. Is it on the lines we just changed?
The VMRS instruction is not used directly in the assembly code, but it is possible that FSTMD (which is used) is a pseudo instruction for VMRS. However, it is valid to put a condition code on a VMRS instruction too - so I’m not sure why it is generating a warning.
Does the code actually run without error?
I will have to look at it in more detail as to why it thinks it merits a warning.
Yes. it is on the lines we changed. But only 3 which is portSAVE_CONTEXT.
So I replaced it by previous method. warning occure at ‘FMRXNE R1, FPSCR’
They are just warning. So it maybe operate. But another error occured when it was resolved.
I will try resolve it. And I’ll comeback to this forum if i cannot solve it…
Really thanks!
A little more digging reveals the instruction is valid. The compiler is warning that some ARM cores have a bug that makes the instruction unreliable. I have no idea if TI chips are effected or not, but best to avoid the instruction I think.
Think again…
Try this. Please revert the changes you made, so you are back with the original code (sorry to mess you around!) and this time replace the
What is the reason of this error?
I downloaded this DEMO on FreeRTOS website, and just build it. not fixed.
Demo has wrong code or my system environment(CCS, compiler, etc.) has problem?
How can you resolve it?
Unfortunately, I don’t know assembly codes… so I cannot understand what you did for this error.
A change in the way the compiler handles assembly language since the demo was created.
I downloaded this DEMO on FreeRTOS website, and just build it. not fixed.
That is because discussing it in the forum and finding a solution does not retrospectively fix code that has already been released.
How can you resolve it?
At the risk of repeating exactly what is said in this post above: Find the file FreeRTOS/Source/portable/CCS/ARM_Cortex-R4/portasm.s, find the two occurrences of the line “BEQ PC+3” and replace with the line “BEQ $+16”.