Problme with CORTEX_R4_RM48_TMS570_CCS5 on TI Hercules RM48L950 HDK

Hi. I have tried using FreeRTOS 2 ways. First way. using ‘CORTEXR4RM48TMS570CCS5′ 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: rtsv7R4Tlev3D16eabi.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: rtsv7R4Alev3D16eabi.lib(Arm mode) There are 6 errors as follows when I build it.. unresolved symbol vPortSWI, first referenced in sysintvecs.obj unresolved symbol vApplicationTickHook, first referenced in ostasks.obj unresolved symbol vApplicationStackOverflowHook, first referenced in ostasks.obj unresolved symbol vApplicatioinmallocFailedHook, first referenced in osheap.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. If you need more information. Please tell me.. Regards. I want use

Problme with CORTEX_R4_RM48_TMS570_CCS5 on TI Hercules RM48L950 HDK

Do you know which line the error: “”[E0004} Operand must be a” in ‘portasm.asm'” is referring to? Regards.

Problme with CORTEX_R4_RM48_TMS570_CCS5 on TI Hercules RM48L950 HDK

Error occured at line 169, 183, 189, 199, 209, 219, 236, when it refered ‘portRESTORECONTEXT’ or ‘portSAVECONTEXT’. Thanks

Problme with CORTEX_R4_RM48_TMS570_CCS5 on TI Hercules RM48L950 HDK

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 portRESTORECONTEXT definition within the same portASM.asm assembler file. Can you replace one of the calls to the portRESTORECONTEXT 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. Regards.

Problme with CORTEX_R4_RM48_TMS570_CCS5 on TI Hercules RM48L950 HDK

You maybe confused portRESTORECONTEXT and portRESOTRESAVE. 67 to 116 line is portRESOTRESAVE. So I replaced portRESTORESAVE 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 Regards.

Problme with CORTEX_R4_RM48_TMS570_CCS5 on TI Hercules RM48L950 HDK

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: In portSAVE_CONTEXT replace the lines: BEQ PC+3 FSTMDBD LR!, {D0-D15} FMRX R1, FPSCR STMFD LR!, {R1} with FSTMDBDNE LR!, {D0-D15} FMRXNE R1, FPSCR STMFDNE LR!, {R1} Likewise in port RESTORE_CONTEXT replace the lines (note I have removed the comment): BEQ PC+3 LDMFD LR!, {R0} FLDMIAD LR!, {D0-D15} FMXR FPSCR, R0 with LDMFDNE LR!, {R0} FLDMIADNE LR!, {D0-D15} FMXRNE FPSCR, R0 Please ensure to report back your findings even if this fixes your problem. Regards, Richard Barry.

Problme with CORTEX_R4_RM48_TMS570_CCS5 on TI Hercules RM48L950 HDK

Wow. It’s a really cool. Errors are disappeared. But there are some new warnings.. [W0005] A conditional VMRS. is it OK? Thank you so much! Regards.

Problme with CORTEX_R4_RM48_TMS570_CCS5 on TI Hercules RM48L950 HDK

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. Regards, Richard Barry.

Problme with CORTEX_R4_RM48_TMS570_CCS5 on TI Hercules RM48L950 HDK

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! Regards.

Problme with CORTEX_R4_RM48_TMS570_CCS5 on TI Hercules RM48L950 HDK

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 BEQ PC+3 with BEQ $+16 Does that compile and run ok? Regards, Richard Barry.

Problme with CORTEX_R4_RM48_TMS570_CCS5 on TI Hercules RM48L950 HDK

Hi. I tried it what you suggest. VMRS error is disappeared. Thank you! Regards.

Problme with CORTEX_R4_RM48_TMS570_CCS5 on TI Hercules RM48L950 HDK

I have some questions related with this issue. 1) 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? 2) How can you resolve it? Unfortunately, I don’t know assembly codes.. so I cannot understand what you did for this error. Please explain it Thanks Regards.

Problme with CORTEX_R4_RM48_TMS570_CCS5 on TI Hercules RM48L950 HDK

1) What is the reason of 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.
2) 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”. Regards.