Trouble updating to 8.2.2

amcolex wrote on Friday, September 11, 2015:

I’m trying to update my FreeRTOS code base from 8.1.2 to 8.2.2 and am having issues.

After replacing all of the source/portable files + FreeRTOSconfig.h, i get the following complication error:

C:\Users\alexp\git\gimball_firmware\Flyability_Common\Libraries\FreeRTOS\inc/portmacro.h:221:32: error: ‘configMAX_SYSCALL_INTERRUPT_PRIORITY’ undeclared (first use in this function)
:"=r" (ulNewBASEPRI) : “i” ( configMAX_SYSCALL_INTERRUPT_PRIORITY )

I’m currently running on a STM32F407 with GCC (Eclipse)

I’ve posted a picture of the folder structure:

rtel wrote on Friday, September 11, 2015:

After replacing all of the source/portable files

Did you only replace the FreeRTOS/source/portable files, or did you also replace the files in FreeRTOS/source? You should check all the FreeRTOS files you are using have a consistent version number.

Regards.

amcolex wrote on Friday, September 11, 2015:

I also replaced the source files (Every file in the screenshot is at 8.2.2)

rtel wrote on Friday, September 11, 2015:

I presume you have configMAX_SYSCALL_INTERRUPT_PRIORITY defined in your FreeRTOSConfig.h header file? You said you changed the FreeRTOSConfig.h file too - that should not have been necessary, as that should be part of your application, not part of the FreeRTOS source tree (it tailors a common FreeRTOS code base to a particular application).

Inside portmacro.h, if you select configMAX_SYSCALL_INTERRUPT_PRIORITY then select “Open Declaration” from the pop up menu - where does it take you?

Regards.

amcolex wrote on Friday, September 11, 2015:

I’ve tried both actually. I initially left the FreeRTOSConfig file alone since i didn’t see any new definitions, and then copied one from the demo’s folder just in case.

The editor linker works (if i control click the definition it finds it in the FreeRTOSConfig file). I’m not sure how the compiler is supposed to find it though, since there are no includes in portmacro.h and i didnt set the FreeRTOSConfig as a project wide include file.

To test if it was some sort of linking issues i set configMAX_PRIORITIES to 40 to see if the error check at line 182 triggered during compilation, and it does.

rtel wrote on Friday, September 11, 2015:

I’m not sure how the compiler is supposed
to find it though, since there are no includes in portmacro.h and i
didnt set the FreeRTOSConfig as a project wide include file.

The source file must include “FreeRTOS.h”.

FreeRTOS.h then includes, FreeRTOSConfig.h, projdefs.h and portable.h,
in that order, to ensure FreeRTOSConfig.h is included before portable.h.

portmacro.h being included from portable.h to provide the port specific
definitions.

amcolex wrote on Friday, September 11, 2015:

Ok that make sense. Unfortunately, i still don’t understand why the compiler fails though.

If i replace the macro with the expanded values “( 5 << (8 - 4) )”, the project compiles correctly, so this is a localized issue.