Skip to content
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

custom_targets.json and modular target board support packages #6581

Closed
0Grit opened this issue Apr 9, 2018 · 9 comments
Closed

custom_targets.json and modular target board support packages #6581

0Grit opened this issue Apr 9, 2018 · 9 comments

Comments

@0Grit
Copy link

0Grit commented Apr 9, 2018

Description

  • Type: Question, possible enhancement
  • Priority: Minor

@theotherjimmy @0xc0170

Background

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:

  • PinNames.h
  • device.h
  • custom_targets.json
  • git submodules of any of the board's IC drivers not already included with mbedOS

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:

  • custom_targets.json needs to be in the root of the "project"
  • managing mbedOS version dependencies

Questions

  • 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?

@theotherjimmy
Copy link
Contributor

theotherjimmy commented Apr 9, 2018

@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:

  • Place an .mbedignore file in the root ignoring the module directory
  • always run mbed 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]

@0Grit
Copy link
Author

0Grit commented Apr 9, 2018

@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]

@theotherjimmy
Copy link
Contributor

theotherjimmy commented Apr 9, 2018

@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]

@adbridge
Copy link
Contributor

adbridge commented Oct 4, 2018

Internal Jira reference: https://jira.arm.com/browse/IOTCORE-323

@0Grit
Copy link
Author

0Grit commented Jan 14, 2019

@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.

@theotherjimmy
Copy link
Contributor

@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.

@theotherjimmy
Copy link
Contributor

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.

@0Grit
Copy link
Author

0Grit commented Jan 22, 2019

TODO: Close once #9401 comes with 5.12.

@evedon
Copy link
Contributor

evedon commented May 24, 2019

--custom-targets command line switch was delivered in #9401 so closing this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants