Adding support for a new MCU to ArduPilot

This video shows a call between @Mallikarjun_SE and myself where we add support for the STM32L431 microcontroller to ArduPilot. It is a long video, but may be interesting if someone else wants to add a new MCU
Note that adding the L431 was much harder than adding most MCUs as it wasn’t actually a supported ChibiOS MCU, so we needed to add support to ChibiOS too.
The happy ending is the board did boot up and work as an AP_Periph CAN peripheral.

15 Likes

Very interesting, thanks!

1 Like

Thank you for video you have post… i will follow it for try add in my folder the G474 with 128 pins coz some pins are not recognize during the build of the hwdef file

1 Like

thanks! If you get stuck let me know what pins and I’ll add them

Great, looking forward to more similar videos.

Good day, ive some small problems to add some pins for my G474QBT6…specially the usart3 and i2c.
Actually i cannot compile it…

post a link to the branch you’ve created with the changes and I can take a look

Good day, i will create it asap… for now i have build the hwdef file porting the board in my ardupilot folder

Sorry for the very silly question.
Is it required to configure pinouts for the board? like i2c and uart before using them in the hwdef-bl.dat and hwdef.dat file for building ardupilot firmware?

I build firmware for a custom board, its stm32f405rgt6 and connected mpu6050 but i am not getting anything in the mission planner.

Good day MPU6050 it’s i2c and not SPI, so if you want make it work you must find the proper address…

1 Like

Yes you are right, I gave a try with BMP280 over SPI and it worked.