Porting to PIC32

ChibiOS public support forum for all topics not covered by a specific support forum.

Moderators: RoccoMarco, lbednarz, utzig, tfAteba, barthess

jjdean
Posts: 2
Joined: Wed Mar 01, 2023 11:22 pm
Has thanked: 1 time

Porting to PIC32

Postby jjdean » Thu Mar 02, 2023 12:09 am

Hi!
I'm interested in porting ChibiOS to a PIC32MZ board which uses MIPS32 architecture. I can see that a port of this nature to some PIC32MX boards has been done before, but was last touched back in 2013 (https://forum.chibios.org/viewforum.php?f=17) when ChibiOS was on v2.5.

Really I'm just looking for some idea of what a project like this would entail. I've used ChibiOS on projects before but only on a high level on already supported STM32 boards. I've never really needed to dig into or modify the low-level parts like HAL so I'm not sure what it will take to port to an entirely new architecture and uC family or even how feasible it is.

I have experience doing low-level programming on PICs from other projects so I'm not too worried about that aspect.

Any tips you may have to point me in the right direction or set my expectations before I start blindly fumbling around would be greatly appreciated!

User avatar
Giovanni
Site Admin
Posts: 14458
Joined: Wed May 27, 2009 8:48 am
Location: Salerno, Italy
Has thanked: 1076 times
Been thanked: 922 times
Contact:

Re: Porting to PIC32

Postby Giovanni » Thu Mar 02, 2023 7:09 am

Hi,

ChibiOS has been ported on a lot of non-STM32 micros over the years but many have been dropped because lack of commitment from the authors about long term maintenance. The system evolves, some internal interfaces can change, if there is nobody doing the changes in ports then ports die.

You need to port 2 things basically:

1) The RTOS (RT and/or NIL) port layer, you need to get this working first.
2) The HAL implementation, for this you need at very minimum: clock inits (hal_lld.c/h), GPIO driver (pal_lld.c/h) and a serial driver (Serial or SIO LLDs), board files templates (board.c/h containing clock sources and GPIO default settings), configuration files templates (mcuconf.h).

This is the bare minimum to run the test suite and validate the port. The you can proceed with all the other drivers based you your priorities. Note that the STM32 port has generators for board files and mcuconf.h files, you may want to create those for your port too in order to ease maintenance.

Not sure how much of the above was addressed in that early port, you could try to get in touch with the original author and see if there is still interest.

Giovanni

jjdean
Posts: 2
Joined: Wed Mar 01, 2023 11:22 pm
Has thanked: 1 time

Re: Porting to PIC32 - Potential Paid Gig

Postby jjdean » Wed Apr 12, 2023 12:38 am

Hi again!

I've been working on this off and on for the past few weeks. While I've made some progress, it's been very slow. I'm sure I could get there eventually, but I'm certain that there are others on this forum who would be able to complete this in a fraction of the time.

This project is for my company, not a personal project, so I do have the resources to hire someone to help out. If anyone is interested, I would be happy to pay you for assistance with this project.

This could entail just doing the setup and tricky bits or fully completing it depending on how much time you have available.

Please message me if you are interested or know someone else who might be!

User avatar
tfAteba
Posts: 547
Joined: Fri Oct 16, 2015 11:03 pm
Location: Strasbourg, France
Has thanked: 91 times
Been thanked: 48 times

Re: Porting to PIC32

Postby tfAteba » Wed Apr 12, 2023 6:43 pm

Hello jjdean,

Look at your PM
regards,

Theo.


Return to “General Support”

Who is online

Users browsing this forum: No registered users and 6 guests