-
Notifications
You must be signed in to change notification settings - Fork 548
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
[RFC]: board_types.txt -> consolidated board_types.h #151
base: main
Are you sure you want to change the base?
Conversation
5450cca
to
1af9eef
Compare
having the relevant info would be nice, but having it as pseudo-C pre-processor is pointless as it can't compile or be checked so it just makes it harder to read. |
This is just something quick I hacked together to start the discussion. The idea is to have it in a form where the data can be directly used by the project (if desired). I'm fine with any tabular data if you have a suggestion.
As long as we're aligned on the goal of centralizing the data necessary for bootloader compatibility (not deconfliction) that's fine. I think the small amount of hassle coordinating a couple sectors here and there is worth it for the sanity of vendors and users. You can have full access here or we could start a new standalone repo that contains this alone. That might be better as each project could consume it as a submodule and avoid copying a file manually. |
As a hardware provider it is in my best interest to preserve bootloader compatibility between both projects, I am sure that most other vendors would agree. It would be great if the build scripts could parse this file for the particular values to limit typos or errors. If it pleases everyone, possibly relocate this to an independent repo so that it can be maintained as the "authoritative open source drone IDs"? I find the layout is easy enough to follow but I do have a couple questions. Is there or should there be a character limit to the name? What is Type? I see it correlates to the board ID in most instances. Would adding a USB ID field be beneficial. Would it be worth adding a field to indicate the applicable ports which firmware could be uploaded via, such as USB, UARTx, etc? |
Changes (TODO)
I've created a new empty repo (https://github.com/PX4/Board_ID) we can use for this purpose. If there's consensus here then we can continue this effort in a new pull request over there.
This is probably beyond the minimum set of common data we need, but I could go either way. |
This is a great move in the right direction. We are going to need a bigger ID and will have to rev the bootloader to do that. Also N.B. The IO is almost out of space. |
We use USB VID and then PID as the identifiers. In ardupilot we define all of these in the board specific hardware def files, |
board_type is already 32 bit. Is that the ID you're referring to? |
I think the only string that should be in the file should be the board name, and this should not be tied to the USB strings. |
I propose we merge
board_types.txt
into a single sorted table with all additional fields necessary to maintain compatibility between PX4, Ardupilot, and anyone else wishing to adopt this bootloader.Note: this is a first rough pass using xmacros and only partially correct data.
Background - #138 (comment)