There is comprehensive documentation on porting AP to new STM32 boards (https://ardupilot.org/dev/docs/porting.html). Much of the configuration there happens through hwdef.dat files. It appears that Linux builds use a different mechanism. Tools/ardupilotwaf/boards.py has classes that correspond to different Linux targets (blue, bbbmini, etc.). These classes define different values for CONFIG_HAL_BOARD_SUBTYPE for each build variant, and some of the .cpp sources contain conditional compilation around these values. Is this it? Is there more? Is there anything that spells out which sensors are present on each board, what busses they connect to, which IOs have what functions?
The context is trying to port AP to a custom BBB cape.
I develop a board for pocket with almost same design of PocketPilot we validate the board and planning to buy some boards.
The definition of linux is under libraries/AP_HAL/boards/linux.h
Inside the libraries/AP_HAL_Linux you have several files with all related lower level stuffs( spi, i2c, pwm, rc in and rc out).
Thank you, @juvinski! Reading through libraries/AP_HAL/board/linux.h now. I see where it uses PROBE macros to specify which I2C and SPI devices to look for, e.g., for the BBBlue. I don’t see where it says what to use for RC IN and RC OUT (I think blue uses PRU for both–AP_HAL_Linux/RCInput_PRU.cpp and AP_HAL_Linux/RCOutput_PRU.cpp)
AP_HAL_Linux/RCOutput_PRU.cpp wraps its entire body in this…
…suggesting that the build system compiles this file for every target but the object is empty except for these two targets. But AP_HAL_Linux/RCInput.cpp has no such wrapper.
We did some prototypes with beaglebone.org but no official release. @juvinski is certainly the most active build/support reference at the moment on this platform.