Cloning FreeRTOS-kernel repository does not download the latest release?


I see the latest release of the FreeRTOS-kernel is 11.0.1 as per:

However, for some reason, when I clone via command line or even browsing directly on I seem to get 10.4.4 when checking task.h file.
To get the latest I have to click the release and download the zip from there.
Any ideas of why this is?

The main branch is the development branch, so there shouldn’t be a version number in task.h if that is what you are looking at. See FreeRTOS-Kernel/include/task.h at main · FreeRTOS/FreeRTOS-Kernel · GitHub where the version is just “development branch”.

The version number in the 11.0.1 tag looks correct: FreeRTOS-Kernel/include/task.h at V11.0.1 · FreeRTOS/FreeRTOS-Kernel · GitHub, I didn’t try cloning though.

Thanks for your reply!

Yeah, this is most likely my git knowledge that is lacking, or almost none existent. :smiley:
But if the main branch is a development branch, then cloning the tag instead sounds reasonable to me. Because a straight clone of the main branch gives me the 10.4.4 thing.

However, that gives me

fatal: ‘origin/V11.0.1’ is not a commit and a branch ‘V11.0.1’ cannot be created from it
fatal: unable to checkout submodule ‘FreeRTOS-Kernel’

The idea was just to add kernel as a submodule to my project, but my knowledge with is lacking

I normally use Tortoise git which has a simple interface and integrates into Windows, only dropping to the command line for more complex actions…however I just tried:

git clone

and see DEVELOPMENT BRANCH in the file header comments. I then entered the FreeRTOS kernel directory and typed:

git checkout V11.0.1

Just to try the simplest command. I then received the V11.0.1 files - so this seemed to work (although it is more likely you want to create a local branch using something like:

git checkout -b my_branch V11.0.1

Thanks again for your reply.

After some trial and error I was able to get it to work with the help of your tips.

To add it as a submodule this is what needed to be done:

git submodule add <path of the submodule>
git submodule update --init

This pulls in 10.4.4 for a reason I’m not sure of.
To get it up to latest, at time of writing it is V11.0.1 release.
Inside the submodule directory, do:

git checkout V11.0.1

I’ve opened a PR to update the version number in the main branch, which is what is cloned by default.

This branch is considered pre-release, so it is best to use a tagged release as others have noted above.

Thanks for your update.

So then there was just a typo inside the task.h file?

BTW, I see that I messed up my quote in my post above this. Not all syntax is in the quote, unfortunately I am not able to edit this now. But if someone with permission can, it would be great.
Might help someone later on

I fixed that. Thank you for sharing!

1 Like