FreeRTOSConfig.h check in examples

I download FreeRTOS. It contains a lot of examples. Some examples need to be updated because it’s FreeRTOSConfig.h was from old FreeRTOS. For example there is no
#define INCLUDE_xTaskGetCurrentTaskHandle
in my Atmega328 example.

May be maintainer needs to produce auto checker script? Script should read all example one by one and check FreeRTOSConfig.h. Every FreeRTOSConfig.h should contains all FreeRTOSConfig.h’s defines. Any ideas?

“Old” FreeRTOSConfig.h scripts don’t actually need to be updated, as any virtually all the parameters have defaults that get applied if the define isn’t there.

You only really need to include the defines for the options that you want to be non-default. This is intentional so you can normally safely update to newer versions of FreeRTOS without needing to change your project.

Perhaps FreeRTOS.h could be modified so that if you add some define to your FreeRTOSConfig.h that it generates a warning/error if some item isn’t actually defined, but that is apt to often generate a lot of noise when compiling.

1 Like

We do try to ensure anything new added is done so in a backward compatible way - so if a #define isn’t defined it defaults to whatever the behaviour was before it was added. It is helpful when folks report when we get this wrong so it can be fixed.

1 Like

The attached may also help - it’s not finished yet but will get checked into the repo as a template when done.
ReferecenFreeRTOSConfig.h (21.5 KB)

1 Like