In current state Mbed CE build system auto searches only for upload method config for regular targets. In case of custom targets is expected the config will be defined via top level cmakelist.
// this is example how look current structure of a project with a custom target
./Project_Name/
│
├── mbed-os/
├── Build/
├── Custom_targets/
│ ├── YOUR_TARGET/
│ │ └── somefiles.xxx
│ ├── ANOTHER_TARGET/
│ │ └── somefiles.xxx
│ └── CMakeLists.txt
│
├── CMakeLists.txt
├── mabed_app.json
├── custom_targets.json
└── main.cpp
This PR brings the build system will also search for an upload method config in custom_targets/upload_method_cfg/ folder (it mirrors same logic from mbed-os/targets/upload_method_cfg/ folder) and also brings an option to change default expected path via top lvl cmakelist.
// this is example how will look new expected structure of a project with a custom target
./Project_Name/
│
├── mbed-os/
├── Build/
├── Custom_targets/
│ ├── YOUR_TARGET/
│ │ └── somefiles.xxx
│ ├── ANOTHER_TARGET/
│ │ └── somefiles.xxx
│ │
│ ├── upload_method_cfg/
│ │ ├── YOUR_TARGET.cmake
│ │ └── ANOTHER_TARGET.cmake
│ └── CMakeLists.txt
│
├── CMakeLists.txt
├── custom_targets.json
├── mabed_app.json
└── main.cpp
We will have an official automated solution how to deal with upload method config file for custom targets. But also a solution for anyone who want to go its own way.
[x] Patch update (Bug fix / Target update / Docs update / Test update / Refactor)
[] Feature update (New feature / Functionality change / New API)
[] Major update (Breaking change E.g. Return code change / API behaviour change)
Test results
[x] No Tests required for this change (E.g docs only update)
[] Covered by existing mbed-os tests (Greentea or Unittest)
[] Tests / results supplied as part of this PR
Summary of changes
This PR is in context of many discussions and I hope everyone will find its option.
In current state Mbed CE build system auto searches only for upload method config for regular targets. In case of custom targets is expected the config will be defined via top level cmakelist.
This PR brings the build system will also search for an upload method config in
custom_targets/upload_method_cfg/
folder (it mirrors same logic frommbed-os/targets/upload_method_cfg/
folder) and also brings an option to change default expected path via top lvl cmakelist.We will have an official automated solution how to deal with upload method config file for custom targets. But also a solution for anyone who want to go its own way.
Impact of changes
Migration actions required
N/A
Documentation
How will this merged I can update custom target example as soon as possible.
Pull request type
Test results
Reviewers
@multiplemonomials