# FreeRTOS + Pico-SDK install with Github fetch

**URL:** <https://forums.freertos.org/t/freertos-pico-sdk-install-with-github-fetch/20632>\
**Category:** Kernel\
**Created:** [June 6, 2024, 8:50am UTC](https://forums.freertos.org/t/freertos-pico-sdk-install-with-github-fetch/20632 "2024-06-06T08:50:40Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![Lithimlin](https://d3iykfbgfh8zhg.cloudfront.net/user_avatar/forums.freertos.org/lithimlin/32/4676_2.png) [@Lithimlin](https://forums.freertos.org/u/Lithimlin)\
**Post date:** [June 6, 2024, 8:50am UTC](https://forums.freertos.org/t/freertos-pico-sdk-install-with-github-fetch/20632/1 "2024-06-06T08:50:40Z")

</div>

Hi everyone,

I’m currently trying to set up a template project for FreeRTOS with the Pico-SDK.  
I found several guides online but I’m trying to make the code as portable between machines as possible since I expect several people to work on it. We’re currently already having a lot of trouble with this in other frameworks (such as PlatformIO), so I’m trying to eliminate as many sources of error as I can.

For this, I’m trying to pull the FreeRTOS kernel and the Pico-SDK from their respective Github repositories. I’ve set up a repository so you can browse through all the files. It’s called Lithimlin/freeRTOS-pico. (As a new user I can’t link it directly unfortunately.)

In the second commit (0df6afd), I’m getting an error from the Pico-SDK because some files are not being generated properly. In the next commit (7784687), I added a workaround to fix this, but I’m not sure if things are being built correctly as now I’m getting a lot of errors about unknown types and implicit function declarations that seem to be stemming from the RP2040 port of FreeRTOS. Perhaps my workaround didn’t fix as much as I’d have liked.

I hope someone here can help out.

---

<div class="post-metadata">

**Author:** ![aggarg](https://d3iykfbgfh8zhg.cloudfront.net/user_avatar/forums.freertos.org/aggarg/32/4245_2.png) [@aggarg](https://forums.freertos.org/u/aggarg)\
**Post date:** [June 6, 2024, 12:55pm UTC](https://forums.freertos.org/t/freertos-pico-sdk-install-with-github-fetch/20632/2 "2024-06-06T12:55:34Z")

</div>

Did you try following [this guide](https://datasheets.raspberrypi.com/pico/getting-started-with-pico.pdf) from Pico?

---

<div class="post-metadata">

**Author:** ![Lithimlin](https://d3iykfbgfh8zhg.cloudfront.net/user_avatar/forums.freertos.org/lithimlin/32/4676_2.png) [@Lithimlin](https://forums.freertos.org/u/Lithimlin)\
**Post date:** [June 6, 2024, 1:28pm UTC](https://forums.freertos.org/t/freertos-pico-sdk-install-with-github-fetch/20632/3 "2024-06-06T13:28:33Z")

</div>

Yes but without much luck. The issue is also not getting the Pico-SDK to work on its own. It’s specifically the FreeRTOS port I’m having trouble with.

---

<div class="post-metadata">

**Author:** ![aggarg](https://d3iykfbgfh8zhg.cloudfront.net/user_avatar/forums.freertos.org/aggarg/32/4245_2.png) [@aggarg](https://forums.freertos.org/u/aggarg)\
**Post date:** [June 6, 2024, 4:33pm UTC](https://forums.freertos.org/t/freertos-pico-sdk-install-with-github-fetch/20632/4 "2024-06-06T16:33:20Z")

</div>

Try to use this demo - [FreeRTOS-Community-Supported-Demos/CORTEX\_M0+\_RP2040 at 3d475bddf7ac8af425da67cdaa2485e90a57a881 · FreeRTOS/FreeRTOS-Community-Supported-Demos · GitHub](https://github.com/FreeRTOS/FreeRTOS-Community-Supported-Demos/tree/3d475bddf7ac8af425da67cdaa2485e90a57a881/CORTEX_M0%2B_RP2040).

---

<div class="post-metadata">

**Author:** ![Lithimlin](https://d3iykfbgfh8zhg.cloudfront.net/user_avatar/forums.freertos.org/lithimlin/32/4676_2.png) [@Lithimlin](https://forums.freertos.org/u/Lithimlin)\
**Post date:** [June 17, 2024, 7:46am UTC](https://forums.freertos.org/t/freertos-pico-sdk-install-with-github-fetch/20632/5 "2024-06-17T07:46:13Z")

</div>

I didn’t yet, seeing as they use an outdated version of the FreeRTOS Kernel before the SMP was merged into the main branch. I don’t have a great overview of the feature difference before and after the merge, but I’ll try it out.

---

<div class="post-metadata">

**Author:** ![Lithimlin](https://d3iykfbgfh8zhg.cloudfront.net/user_avatar/forums.freertos.org/lithimlin/32/4676_2.png) [@Lithimlin](https://forums.freertos.org/u/Lithimlin)\
**Post date:** [June 17, 2024, 8:17am UTC](https://forums.freertos.org/t/freertos-pico-sdk-install-with-github-fetch/20632/6 "2024-06-17T08:17:34Z")

</div>

While this project does build correctly, it only does so when I go to the FreeRTOS repo (still can’t link in posts, sorry) and clone it. This makes sense since the demos use code in the Demo/Common directory there.  
But this still doesn’t teach me a whole lot about how to make a new small project.

---

<div class="post-metadata">

**Author:** ![aggarg](https://d3iykfbgfh8zhg.cloudfront.net/user_avatar/forums.freertos.org/aggarg/32/4245_2.png) [@aggarg](https://forums.freertos.org/u/aggarg)\
**Post date:** [June 17, 2024, 3:49pm UTC](https://forums.freertos.org/t/freertos-pico-sdk-install-with-github-fetch/20632/7 "2024-06-17T15:49:26Z")

</div>

> [@Lithimlin](#):
>
> But this still doesn’t teach me a whole lot about how to make a new small project.

Are you able to follow [this CMakeLists.txt file](https://github.com/FreeRTOS/FreeRTOS-Community-Supported-Demos/blob/main/CORTEX_M0%2B_RP2040/OnEitherCore/CMakeLists.txt)? It uses [this file](https://github.com/FreeRTOS/FreeRTOS-Community-Supported-Demos/blob/main/CORTEX_M0%2B_RP2040/OnEitherCore/pico_sdk_import.cmake) to import pico SDK and [this file](https://github.com/FreeRTOS/FreeRTOS-Community-Supported-Demos/blob/main/CORTEX_M0%2B_RP2040/OnEitherCore/FreeRTOS_Kernel_import.cmake) to import FreeRTOS-Kernel.

---

<div class="post-metadata">

**Author:** ![Lithimlin](https://d3iykfbgfh8zhg.cloudfront.net/user_avatar/forums.freertos.org/lithimlin/32/4676_2.png) [@Lithimlin](https://forums.freertos.org/u/Lithimlin)\
**Post date:** [June 25, 2024, 6:58am UTC](https://forums.freertos.org/t/freertos-pico-sdk-install-with-github-fetch/20632/8 "2024-06-25T06:58:01Z")

</div>

Not to be mean or anything, but I am using all three of those files in my repository that I mentioned in the original post.

I’ve since gotten it to work by finding another repository that I could use as a base. I suspect the issue is that the sample config provided for the RP2040 doesn’t actually work with it or requires some further configuration that is done somewhere in the demos that I don’t do but also can’t find.

---

<div class="post-metadata">

**Author:** ![aggarg](https://d3iykfbgfh8zhg.cloudfront.net/user_avatar/forums.freertos.org/aggarg/32/4245_2.png) [@aggarg](https://forums.freertos.org/u/aggarg)\
**Post date:** [June 26, 2024, 4:36am UTC](https://forums.freertos.org/t/freertos-pico-sdk-install-with-github-fetch/20632/9 "2024-06-26T04:36:57Z")

</div>

> [@Lithimlin](#):
>
> I’ve since gotten it to work by finding another repository that I could use as a base.

Glad that you figured it.

> [@Lithimlin](#):
>
> I suspect the issue is that the sample config provided for the RP2040 doesn’t actually work with it or requires some further configuration that is done somewhere in the demos that I don’t do but also can’t find.

If you can share what config did not work, we can try to help.
