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
Simplified Local Build using Permanent Config #12341
Conversation
- incorporating board configuration - first stage towards removal of custom_defaults
This comment has been minimized.
This comment has been minimized.
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.
Can you please add a new line at the end of every file?
You don't need to do it manually, though. @ASDosjani made a little bash script in the unified-targets repo to do this.
https://github.com/betaflight/unified-targets/blob/master/fix-file-endings.sh.
But you need to change it a bit to fit this case.
@KarateBrot this is now done :) |
This comment has been minimized.
This comment has been minimized.
Do you want to test this code? Here you have an automated build: |
AUTOMERGE: (FAIL)
|
I'm happy to see you took on-board all of my suggestions and requirements from #12335 and also went the extra step of moving all the target definitions back into the codebase. 🥳 Some questions:
can you outline the remaining stages, as it's not clear what's going to happen with the exsting cli commands that are in the target config in the unified targets repo.
long-term, in what form with the config be?
Please give an example where any of these targets will not be bootable. Also: What is the plan for 4.4.1, are you going to back-port this PR to 4.4.1 so that all the EXST targets can be built again? Additionally: The EXST targets need settings that are currently hard-coded in the MCU config, such as VMA address for the flash chip. I see that this PR extracts a setting from a #define and turns it into a make file parameter. As follows:
The same approach can be taken for the VMA address. e.g. in a target
then:
The same approach can also be used to pick the right linker script based on the EXST and TARGET_FLASH_SIZE settings which could also be extracted from the |
One more question is there a PR somewhere to update the documentation on the targets repo? I ask as currently target maintainers have to publish changes both to |
Note this approach is no different and fundamentally the same as board.h that already existed but I've simply generated all of the header files. There's only two differences, the first is no need for mk file to set the core target, and the second is merely the file locations. The plan would be to restrict to one header file only to restrict a proliferation of complexity. Regarding your EXST targets, they aren't a priority for the moment. The volume of downloads don't warrant it taking priority over other items, this includes spending time reviewing PRs. Once we've migrated and finished the majority I'm happy to revisit. In the meantime I'm happy for you to build a hex and provide to me, and I'll update the cloud build api with a static hex for each version so the target can be downloaded similarly to how it works for 4.3.2 releases. |
Until the targets repo is decommissioned maintainers will only need to update the config files in that repo. We will periodically auto generate, similar to translation PRs. I'll be updating the documentation around the changes dropping board.h shortly. |
Any plan will be incomplete unless the EXST targets are included in the plan. The VMA address and linker script settings are in the BASE H750/H730 targets
I can, but it doesn't feel like this is a good idea as people won't be able to re-create the .hex/.bin themselves from the source like they should be able to. Please can you answer my question about if this is going to be backported to the |
Also, please can you answer my other question:
|
I may consider back porting it. I won't be needing your assistance but thanks for the offer. |
Working defines for each of them as required. I figured it was a fairly clear answer in the statement 'there will be one header file'. The next stages will simply be working through various approaches to achieve the single header file. |
it wasn't clear, as I had previously heard mention of using .json files for target configs, but that would entail json parsing code in the makefiles, etc. can you confirm going forward that the plan is to keep the per-target header file (only) in this PR going forward? |
This is the first stage in the decommissioning process for unified targets and custom defaults.
Usage: