Hello! I'm trying to port ChibiOS to the ESP32 MCU in order to run Ardupilot on it, and I am aware that there were prevoius attempts.
If I come accross any issues I will post them here.
Here is the fork: https://github.com/InsanitySquared/ChibiOS
Currenty, I'm a bit confused as to what is the PAL subsystem and what it does. Any help?
Thanks!
I know it is quite a major undertaking, but I'll try it anyways
Porting ChibiOS to ESP32
-
- Posts: 4
- Joined: Sat Jun 06, 2020 5:11 am
- Has thanked: 2 times
Porting ChibiOS to ESP32
Last edited by InsanitySquared on Sat Jun 06, 2020 5:36 am, edited 1 time in total.
- Giovanni
- Site Admin
- Posts: 14455
- Joined: Wed May 27, 2009 8:48 am
- Location: Salerno, Italy
- Has thanked: 1076 times
- Been thanked: 922 times
- Contact:
Re: Porting ChibiOS to ESP32
Hi,
PAL is a GPIO abstraction and the minor of your problems.
Creating a build environment (makefiles) is part of the port process. You may look at the ARM startup files which include makefiles, linker files and assembler startups, you need to start from there. Look into /os/common/startup/ARMCMx
After that you port the RTOS and that is the hardest part. Look into /os/common/ports/ARMCMx
HAL comes last and that can take months depending on which drivers you need/want. At very least you need clock initialization, PAL and Serial drivers.
Giovanni
InsanitySquared wrote:Currenty, I'm a bit confused as to what is the PAL subsystem and what it does. Any help?
PAL is a GPIO abstraction and the minor of your problems.
InsanitySquared wrote:I would also like some instructions on how to build the OS.
Creating a build environment (makefiles) is part of the port process. You may look at the ARM startup files which include makefiles, linker files and assembler startups, you need to start from there. Look into /os/common/startup/ARMCMx
After that you port the RTOS and that is the hardest part. Look into /os/common/ports/ARMCMx
HAL comes last and that can take months depending on which drivers you need/want. At very least you need clock initialization, PAL and Serial drivers.
Giovanni
-
- Posts: 4
- Joined: Sat Jun 06, 2020 5:11 am
- Has thanked: 2 times
Re: Porting ChibiOS to ESP32
Right. Sounds great! Thanks for the prompt assistance! I will keep this topic updated.
I'll get back to PAL etc after setting up the basics.
I'll get back to PAL etc after setting up the basics.
Re: Porting ChibiOS to ESP32
There has been a little prior discussion on this, and maybe some starter code; see this thread
-
- Posts: 4
- Joined: Sat Jun 06, 2020 5:11 am
- Has thanked: 2 times
Re: Porting ChibiOS to ESP32
Thanks. I was able to get to the ESP32's github page from that. Now all I have to do is reverse engineer the whole thing No biggie
I was able to setup a build environment using Cmake. Will go on from there.
I was able to setup a build environment using Cmake. Will go on from there.
-
- Posts: 4
- Joined: Sat Jun 06, 2020 5:11 am
- Has thanked: 2 times
Re: Porting ChibiOS to ESP32
So, after quite a bit of scouring google and red herrings, I struck gold:
https://www.espressif.com/sites/default ... ual_en.pdf
^^The technical specs
https://vivonomicon.com/2019/03/30/gett ... ogramming/
^^and an amazing blog that's going to be REALLY helpful.
I wont be setting a blazingly fast trail or attempting to break any development speed records, but the project is going on, and updates will come here
As @Giovanni suggested I'll start with the RTOS (first RT then maybe later NIL). To do this, again like @Giovanni I'll get to work on timers. Thanks @Giovanni !!
https://www.espressif.com/sites/default ... ual_en.pdf
^^The technical specs
https://vivonomicon.com/2019/03/30/gett ... ogramming/
^^and an amazing blog that's going to be REALLY helpful.
I wont be setting a blazingly fast trail or attempting to break any development speed records, but the project is going on, and updates will come here
As @Giovanni suggested I'll start with the RTOS (first RT then maybe later NIL). To do this, again like @Giovanni I'll get to work on timers. Thanks @Giovanni !!
- Giovanni
- Site Admin
- Posts: 14455
- Joined: Wed May 27, 2009 8:48 am
- Location: Salerno, Italy
- Has thanked: 1076 times
- Been thanked: 922 times
- Contact:
Re: Porting ChibiOS to ESP32
Hi,
Glad to hear there is progress, just a note, if you port RT then also NIL should work, those use the same port module.
Giovanni
Glad to hear there is progress, just a note, if you port RT then also NIL should work, those use the same port module.
Giovanni
Re: Porting ChibiOS to ESP32
Since the Original poster was trying to port ArduPilot to esp32, i thought i'd point out that a few of us got it running via a less-than-optimal FreeRTOS intermediate layer.... the code is not great, but its good enough to fly a plane/copter/sub at this point.... a ChibiOS port would have been much better, but no-one with the low-level ChibiOS experience stepped forward to do that layer...
https://github.com/davidbuzz/ardupilot/ ... _HAL_ESP32
https://github.com/davidbuzz/ardupilot/ ... _HAL_ESP32
- Giovanni
- Site Admin
- Posts: 14455
- Joined: Wed May 27, 2009 8:48 am
- Location: Salerno, Italy
- Has thanked: 1076 times
- Been thanked: 922 times
- Contact:
Re: Porting ChibiOS to ESP32
The original poster went silent so it is safe to assume there has been no progress. A port is not out of question but we have finite bandwidth and there are other things ongoing.
BTW, we recently ported RT to the dual core RP2040, the OS now is able to support SMP architectures, ESP32 would be a good fit.
Giovanni
BTW, we recently ported RT to the dual core RP2040, the OS now is able to support SMP architectures, ESP32 would be a good fit.
Giovanni
Return to “Development and Feedback”
Who is online
Users browsing this forum: No registered users and 30 guests