@theotherjimmy @0xc0170
Assume I create a custom target and want to use that target in multiple applications.
The most elegant approach I can think of with my limited understanding of the config system, would be to create a git repository that contains the following:
This repository would then be imported as a git submodule of any applications I develop for the board.
(or, if the application is hardware agnostic enough, I might create a new repository that includes both the application and BSP as git submodules)
Known Issues to using this approach:
What currently is the cleanest way to accomplish modular custom target support for an application?
What, if anything, could be done to 'enhance' custom target support?
@loverdeg-ep The current limitation, that the "custom_targets.json" must be at the root, is primarily an implementation limitation. You could "trick" the build system into thinking that it's at the root by:
.mbedignore file in the root ignoring the module directorymbed compile/mbed export with --source pointing to that dir.I take it that this is almost a blocker for going to production?
[Mirrored to Jira]
@theotherjimmy Not quite a blocker since we can work around it.
Just want to make sure custom targets get first class support and consideration moving forward.
[Mirrored to Jira]
@loverdeg-ep Yeah, It seems that custom target support is really needed for going to production, as you use it for the custom board you're making. I appreciate that you're pushing on it, as it frequently sees the least love.
[Mirrored to Jira]
Internal Jira reference: https://jira.arm.com/browse/IOTCORE-323
@theotherjimmy, @trowbridgec
Been trialing a number of multi-git-repo tools and dependency managers.
Forgot I posted this issue and ran into it again.
We will be using the recommended workaround, but it would be nice the next time I chase my tail to find a --custom-targets option in the documentation.
@theotherjimmy
Would this be as simple as adding the option to tools/options.py and passing custom_targets_directory instead of source_dir?
All that being said,
Can't put my finger on it, but using custom_targets.json to define custom targets feels _ick_ in the first place.
@loverdeg-ep The implementation that you outlined would work, and I would accept a PR that adds and implements a --custom-targets command line switch.
Can't put my finger on it, but using custom_targets.json to define custom targets feels ick in the first place.
Good to know that something feels off to you. If you can put your finger on what that is, I would like to know it.
TODO: Close once #9401 comes with 5.12.
--custom-targets command line switch was delivered in #9401 so closing this issue.
Most helpful comment
@loverdeg-ep Yeah, It seems that custom target support is really needed for going to production, as you use it for the custom board you're making. I appreciate that you're pushing on it, as it frequently sees the least love.
[Mirrored to Jira]