Raspberry Pi Pico FreeRTOS and Arduino part 1
Тәжірибелік нұсқаулар және стиль
Raspberry pi pico multi core and FreeRTOS programing in Arduino covers some difference and common behavior between
multi core programing and using tasks with FreeRTOS on the raspberry pi pico and pi pico W.
Пікірлер: 31
Thank you very much for sharing ♥.
Thank you, man, you saved a lot of my time 🙏 BTW, your intro is awesome 🎶
@CircuitSecrets
4 ай бұрын
Thank you, I am glad to help.
Hi, thanks for the easy to understand explanation. However, I have a problem getting it work. I keep getting "fatal error: FreeRTOS.h : No such file or directory". How can I install the necessary libraries?
@CircuitSecrets
Жыл бұрын
Thank you! I should have included the link in this video, but FreeRTOS is included in the Philhower library for the raspberry pi pico/pico w. That video is here kzread.info/dash/bejne/fJqK0Leld7eomZs.html it covers how to setup the library, and there is a link to the associated board manager url in the description of that video. Once installed, and the correct board is selected from that board manager addition the header should be found. I hope this helps.
Hi, how add freertos library in Arduino IDE? Maybe link, or instructions.
@CircuitSecrets
Жыл бұрын
Sorry I didn't think to include the information because I did a whole series on the raspberry pi pico and arduino, and the very first video included the link to the libraries. FreeRTOS is included in the Philhower library for the raspberry pi pico/pico w. That video is here kzread.info/dash/bejne/fJqK0Leld7eomZs.html it covers how to setup the library, and there is a link to the associated board manager url in the description of that video. Let me know if this helps and if you have any other questions. Good luck!
@tehnoart1
Жыл бұрын
@@CircuitSecrets thanks! your advice and videos helped me a lot. I tried to install the original freertos kernel ported to rp2040 directly into the sketch, but it didn't work. surprised to learn that the freertos core is integrated into Philhower's unofficial board manager. thanks again
@CircuitSecrets
Жыл бұрын
@@tehnoart1 I am glad it helped, happy coding!
@CircuitSecrets Thanks for the super quick reply. I did everything just like explained in linked video, but I kept getting errors. After uninstalling the Arduino IDE and reinstall it and changing a lot of things, finally now it's working just fine. The secret or should I say the main problem was that there was a "clash" between libraries. The FreeRTOS library for Arduino UNO (with other few boards) was having a priority clash with the Pi Pico FreeRTOS library. So, I made a clean install of the Arduino IDE and also deleting all related folders. An then installed only the Pi Pico FreeRTOS library. Only then, everything is working properly. So, if it not a trouble, could you make a video on how to manage the libraries for Arduino IDE? Mainly on library foldering sysytem and how to create folders so that they don't clash into each other. Or, if there is already a video somewhere explaining all these, please share me the link. Thanks for you time.
@CircuitSecrets
Жыл бұрын
I am glad you got it sorted. I think the libraries fall into the include paths automatically. So first installed is the first looked for. I can see how the naming would cause an issue. Perhaps adding the desired header to the project sketch would cause it to be pulled first? I will have to experiment and get back to you on it. Thanks for the suggestion, I will make a video with my findings after the video I am currently working on. Thank you!
@hrnbrain
Жыл бұрын
@@CircuitSecrets I never thought first installed library will be first referred. Anyway, I (and many others) would appreciate it if there is a detailed video on how to manage folders for libraries and naming of the libraries in order to avoid clashes. Thanks in advance.
@CircuitSecrets
Жыл бұрын
@@hrnbrain OK I will see what I can do. I have never had a conflict between libraries so I assumed it was not a common problem. In my next video I will focus on library management for the Arduino IDE, what little management options are actually available.
Man we need to do one for my prop haha
@CircuitSecrets
Жыл бұрын
We will!
How would code from both cores access the serial port or other on board hardware?
@CircuitSecrets
Жыл бұрын
To keep from running into trouble I would separate the hardware access across the cores. Like use a given serial port only on one core, use a specific ADC only on one core. I have not experimented with that particular problem, I just instinctively have always tied certain actions to certain tasks and cores. I know that the pins can all be routed to access different hardware, and I assume the same goes from processor cores to the hardware. I can't find a block diagram or schematic concerning the cores and the connection structure.
@Tony770jr
Жыл бұрын
@@CircuitSecrets thanks, are global variables accessable to both cores?
@CircuitSecrets
Жыл бұрын
@@Tony770jr Yeah, but be careful with that too, as if one is changing the value the other could miss it. Maybe have a global variable that changes when a process accesses the variable to write it.
@Tony770jr
Жыл бұрын
@@CircuitSecrets will do, thanks!
@CircuitSecrets
Жыл бұрын
@@Tony770jr You're welcome!
have you posted the FreeRTOS code so we can test it out? If so what is the link. Thanks Richard
@CircuitSecrets
Жыл бұрын
The examples from the video can be found at www.circuitsecrets.com
@richardbrown2290
Жыл бұрын
@@CircuitSecrets Thanks. I was looking for help and I noticed that Mbed is a RTOS also.I may be wrong about that! Have you ever looked at that.. Thanks again Richard
@CircuitSecrets
Жыл бұрын
@@richardbrown2290 I noticed it but have not actually tried it, so I can't help with that.
Could you please provide the exact name of the library used here? I tried to add in ARDUINO IDE to import a FreeRTOS library but I was not able to find one that loaded to the PICO to run.
@lc-dj2xs
Жыл бұрын
No I pasted Philhower in the Library Manager: only two libraries I was able to locate
@CircuitSecrets
Жыл бұрын
Here is the video where I explain the library. kzread.info/dash/bejne/fJqK0Leld7eomZs.html
@CircuitSecrets
Жыл бұрын
@@lc-dj2xs You have to include the github address for the earlphilhower library.under preferences in the section titled board manager urls. Then the library will show up in the board manager.
@lc-dj2xs
Жыл бұрын
I have included the provided git url the preferences for the bord manager. But still I am not able to locate the library. I will uninstall everything, delete local files and reinstall. Thank you for the fast answers.
@CircuitSecrets
Жыл бұрын
@@lc-dj2xs I hope it helps you get it working, good luck.