[Revisit] Upgrading FreeRTOSV8.0.1

As it turns out, there was some redundant things that I did during the upgrade to FreeRTOSV8.0.1 for AEMB2. What I did wrong last time was that I added the commits from upstream into the git repository. This was actually not required as the commits from upstream can be viewed by checking them out in the upstream itself. Since the commits were added, the git history for AEMB2 repository became extremely long and had more than 700 commits which took a long time to load all of them. Therefore, I was instructed to re-do the whole upgrade with only the necessary files and commits.

However, I had stupidly push the previous wrong upgrade into gemenon. So, now the repository in gemenon is affected. The repository needs to be fixed back to its previous state first before I upgrade it again.

First, I clone the repository from gemenon into my local workplace. Then, I use the following commands to remove the commits up to before the merge of FreeRTOSV8.0.1.

git reset --hard HEAD~3
This command removes the latest three commits (which are part of the merge) and resets the HEAD to the previous commit from two years back.

git gc --prune=now
This command removes all the loose commits(unreference commits) and repackages the git repository.

After this, the git repository is now back to its previous state and the upgrade is to be performed again.

The same steps are taken in the previous upgrade, except this time the fetch is limited to the latest stable revision.

git fetch -r2241
Revision 2241 which is the latest revision of FreeRTOSV8.0.1 is only fetched. When the fetching is completed, there is only one branch remotes/tags/V8.0.1 available. In the previous fetch, there were many more branches from V7.2.0 up to V8.0.1. The merge process is repeated and code fixing is done like previously to update AEMB2 code for FreeRTOSV8.0.1. Lastly, a release branch is created and tag with 14.27 as the release number. The repository is then forced push back to gemenon.

As you can see in the screen shot below, there are only commits from myself and Dr Shawn while commits from upstream is kept to a minimum. For upstream FreeRTOS commits, I recommend users to visit this website.

new merge

You may also like...

Leave a Reply