Developer question -- where are target hardware boards defined?

I guess someone must have to approve posting to the development list as “New Topic” is greyed out there. But it seems I can post here.

I’m completely new to ArduPilot software development, but not to software development. I just forked the source from Github and built it from source. I was impressed how easy this was.

Now I have a question: How are the various hardware target beads defined? I mean when I type “./waf list_boards” where does that list come from?

Next question: how do I know which physical flight controller board matches up to which was target. It should be clear but I don’t want to guess.

Some place there must be a big table that defines the characteristic of each target. I’d like to learn to add new targets.

Hi, and welcome

ArduPilot is transitioning to Chibios and that has enabled easier ways to add support for new board. Here is a good example of what is required

If you join the gitter channels you have a very active community on the Chibios channel, adding and optimising several new boards

To expand a little, whilst the legacy/nuttx builds/targets are included in the waf make files, for ChibiOS the list is generated from the hwdef directory.
This means if you add a new target, you can simply ./waf configure board=new_target (where new_target is a folder in hwdef) without having to explicitly add new_target to the build system.
If your new board uses an MCU that is already supported (F412, F405, F427, F745, F767, maybe a couple of others), adding a new hwdef.dat is all that is necessary. If you need to add a new MCU it’s a bit more involved but a bunch of that is automated too.

Thanks. That is most of what I need to know. The file is called “hwdef.dat” and “Gitter”.

I have an idea I want to explore. A python program called maybe “beta2ardu” Give it a working Betaflight configuration for a board and it makes the files needed to support that board on ArduPilot.

The Betaflight CLI dump has everything I can think of you’d need to describe the board, specifically what resources are connected to which ARM M pins, the type of IMU and so on.

I will try ti implement one by hand and see how it goes.

1 Like

Great idea, news about this?