FreeRTOS Support Archive
The FreeRTOS support forum is used to obtain active support directly from Real
Time Engineers Ltd. In return for using our top quality software and services for
free, we request you play fair and do your bit to help others too! Sign up
to receive notifications of new support topics then help where you can.
This is a read only archive of threads posted to the FreeRTOS support forum.
The archive is updated every week, so will not always contain the very latest posts.
Use these archive pages to search previous posts. Use the Live FreeRTOS Forum
link to reply to a post, or start a new support thread.
[FreeRTOS Home] [Live FreeRTOS Forum] [FAQ] [Archive Top] [June 2015 Threads]
I just upgraded to the MSP430 IAR Embedded Workbench v6.30.2. I am getting some new compiler warnings that I am wondering about. Could anyone give me some feedback on whether they are potentially real problems that should be addressed.
Here are the warnings which occur at any reference to the portRESTORE_CONTEXT macro:
Warning[413]: A NOP needs to be added before setting GIE, as required by the architecture C:FreeRTOSV8.2.1FreeRTOSSourceportableIARMSP430Xportext.s43 133
Warning[411]: A NOP needs to be added after clearing GIE, as required by the architecture C:FreeRTOSV8.2.1FreeRTOSSourceportableIARMSP430Xportext.s43 133
Warning[410]: A NOP needs to be added after setting GIE if the next instruction clears GIE, as required by the architecture C:FreeRTOSV8.2.1FreeRTOSSourceportableIARMSP430Xportext.s43 133
If the portRESTORE_CONTEXT macro is updated with a NOP before and after the "pop.w sr" as shown below, the warnings will not be generated:
portRESTORE_CONTEXT macro
mov_x &pxCurrentTCB, r12
mov_x @r12, sp
pop_x r15
mov.w r15, &usCriticalNesting
popm_x #12, r15
nop
pop.w sr
nop
reta
endm
There are also several other compiler warnings that have been generated in previous IAR compiler versions. Does anyone know of real problems that may be caused by these? Here are the warnings:
Warning[Pa082]: undefined behavior: the order of volatile accesses is undefined in this statement C:FreeRTOSV8.2.1FreeRTOSSourcetasks.c 3050
Warning[Pa082]: undefined behavior: the order of volatile accesses is undefined in this statement C:FreeRTOSV8.2.1FreeRTOSSourcetasks.c 3055
Warning[Pa082]: undefined behavior: the order of volatile accesses is undefined in this statement C:FreeRTOSV8.2.1FreeRTOSSourcetasks.c 3848
Warning[Pa082]: undefined behavior: the order of volatile accesses is undefined in this statement C:FreeRTOSV8.2.1FreeRTOSSourcetasks.c 3963
Warning[Pa082]: undefined behavior: the order of volatile accesses is undefined in this statement C:FreeRTOSV8.2.1FreeRTOSSourcetasks.c 3996
Warning[Pa082]: undefined behavior: the order of volatile accesses is undefined in this statement C:FreeRTOSV8.2.1FreeRTOSSourcetasks.c 4088
Thanks,
Greg Dunn
I think the nops have already been added to the main line code. Have a look at the following link and see if you think it is correct:
http://sourceforge.net/p/freertos/code/HEAD/tree/trunk/FreeRTOS/Source/portable/IAR/MSP430X/portext.s43
Ref the Pa082 warnings - those warnings should be turned off in the port layer. The warnings are actually absolutely correct, however because of the code structure they bad thing the warning is warning about cannot actually happen. Unfortunately the warnings cannot be removed by updating the code because doing so generates warnings in more compilers than having the code as is does.
Regards.
Copyright (C) Amazon Web Services, Inc. or its affiliates. All rights reserved.