An Operating System on a $4 Board? | Getting Started with FreeRTOS on the Raspberry Pi Pico

preview_player
Показать описание
In this video, we talk about the basic concepts of a Real Time Operating System, or RTOS. Also, we go into how to setup a CMake project for the Raspberry Pi Pico to get FreeRTOS on the device. Finally, we discuss how to setup two tasks to blink LED's at different intervals.

Without an operating system on your Raspberry Pi Pico RP2040, making programs that execute multiple functions at the same time is extremely difficult. By using an RTOS, you're able to write code in terms of "tasks" that a scheduler runs based on their priority. FreeRTOS is an open source RTOS that allows you to make your Pi Pico projects more powerful.

🏫 COURSES 🏫

Chapters:
0:00 Intro
0:33 FreeRTOS
2:05 Coding
6:30 Demo
6:45 Multitasking
7:20 Outro
Рекомендации по теме
Комментарии
Автор

GUYS! I FIXED MY PICO AND THE EXAMPLE!

Inside the task code, I forgot to put the tasks in an infinite loop. Because of this, the blink only executes once, and the board appears as though its crashing. I made both of those tasks infinite loops and the board came back to life (was never dead xd) and behaved as expected.

Thanks to @max from Discord for finding this bug

LowLevelTV
Автор

Man, your vids are really great and helpful! Please just don't stop uploading!!! <3

akashpatil
Автор

i've done a bit of RTOS on older PICs. Now returning to the concept for some robotics. I hope you will cover what might be possible with FreeRTOS on one core and more linear C code on the other core of the pico. Also, i am really liking the OpenOCD/swd/GDB setup with rpi pico, pretty much the best debug capabilities i've ever had. However, i remember having very difficult time debugging RTOS code in earlier days. Hope you can cover some practical RTOS debugging with GDB and dual core. Thanks for video!!

raresharktooth
Автор

The rp2040 on the pi pico has PIO's that can do this. They're like independent cores that manage gpio pins for you. Using the PIO assembly code you can implement just about any protocol. In this case one PIO to blink the LEDs in sync with the clock, maybe add an interupt for the button. Then one PIO for the serial bus. Any pin can go with any PIO (kinda). You can then do what you need to inside of your main program loop and not worry about timing. The rp2040 is neat.

cprogrck
Автор

Frying a dev board is one of most hated experiences for me in the electronics field! Thanks for the tutorial.

junaidpv
Автор

Great stuff, I’m super interested in freeRTOS and love all the pico videos, thanks!

liquid
Автор

Any cool projects using FreeRTOS? Do tell ;)

LowLevelTV
Автор

@Low Level Learning, Awesome Thank you.
A suggestion: Allegedly, there is now Symmetric Multiprocessing Branch of FreeRTOS available for RP2040 (=RTOS on both cores), would be nice to show how to enable it ...

lighthunt
Автор

Nice, a short and sweet tutorial -- will take some time to absorb ;-)

Cptnbond
Автор

Great! Exactly what I was looking for!

d
Автор

2:25 shouldn't this be the smp branch that we need to clone.. as per the docs it's the smp branch which is intended for pico

hobbes
Автор

Thanks for the FreeRTOS tutorial! Can you please post a follow-up video showing the results on the Pico? We need closure. 😁

fred.chapman
Автор

Hi there is a big question in me about Freertos!
Imaging if we have 3 functions and compiler needs to run every function in 1us so all functions needs 3us to run
Can Freertos do all of these 3 functions just in 1us and same time?

Cyrusradplus
Автор

Can we make Gateway using RPi Pico, FreeRTOS, Node-Red ?

DevvratYadav
Автор

Could you make a video about working with MicroPython in VS Code with the Raspberry Pi Pico?

paul
Автор

great video. Do you know if the two tasks run on separate cores and how to enforce this?

heel
Автор

I didn't see any configuration changes to indicate multiple cores (which may also need some RP2040-specific code for communicating between cores). I'm guessing this is all running on a single core.

markday
Автор

How are you rebooting the pico into programing mode? It doesn't look like you are pulling out the plug every time. Are you using a reset button?

yubrajbhoi
Автор

nice intro, please bring more tutorials on freeRTOS.

rahulkushwaha
Автор

any way to have a raspberry pi to act as a storage device and run a program?

AlexShynkarenko