-
Notifications
You must be signed in to change notification settings - Fork 18.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Extend hwdef system to Linux HAL #29303
Extend hwdef system to Linux HAL #29303
Conversation
we have GET_I2C_DEVICE now-adays
like chibios_hwdef.py - but for Linux
like chibios_hwdef.py - but for Linux
like chibios_hwdef.py - but for Linux
Amazing! No idea how you verify, I suppose configure all? |
@Williangalvani can you look at and approve this? I think this is ready, but would like you to test it in your build env |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Very nice! I tested on Navigator64 and everything looks good.
The only think that caught my attention is having an env.py
being a pickled file instead of actual python code, but that is already in chibios.py, too.
LOL. @tpwrules was similarly vexed when reviewing this PR! Thanks for looking. |
Lightly factors
libraries/AP_HAL_ChibiOS/hwdef/scripts/chibios_hwdef.py
intolibraries/AP_HAL/hwdef/scripts/hwdef.py
andChibiOSHWDef
starts to inherit fromHWDef
Creates
libraries/AP_HAL_Linux/hwdef/scripts/linux_hwdef.py
andLinuxHWDef
inherits fromHWDef
.Creates hwdef files for Linux build targets in
libraries/AP_HAL_Linux/hwdef/<boardname>
Moves defines from
#if
block based on linux built subtype into those hwdefs.Removes checks of linux-board-subtype in various libraries, replacing them with simple defines in the new hwdefs.
Allows parsing of
LINUX_SPIDEV
lines in the Linux hwdef files, replacing static definitions inlibraries/AP_HAL_Linux/SPIDevice.cpp
.This is by no means a complete movement to hwdef, but I think it's at a reasonable point to merge.
Still to do (at least...):
navigator64
requiresaarch64
) (I have patches for this)hwdef
directory, as we do for ChibiOSThe output for this PR is binary-identical to the master it is based on, at least for the ChibiOS boards and these:
Notably missing are the zynq boards (xilinx).
For reference, the Navigator hwdef: