Add possibility to use external scripts to detect target, flash firmware, reset board and discover serial port for custom boards
- Dominant language
- Python
- Stars
- 49
- Forks
- 32
- PR merge metrics
- No merged PRs in 30d
Description
### Description
The old `mbed-cli` tool supports [custom boards](https://os.mbed.com/blog/entry/Custom-and-community-board-support/) like [Bluepill](https://os.mbed.com/users/hudakz/code/mbed-os-bluepill/), but it doesn't allow to flash firmware and run [greentea](https://os.mbed.com/docs/mbed-os/v6.5/debug-test/greentea-for-testing-applications.html) tests on them, as some hardware debugger/programmers (like stlink v2) aren't supported or don't have virtual COM port functionality.
Could you please add a hook for external user scripts/programs that can implement target detection, firmware uploading, board resetting and serial port discovery itself for program uploading and greentea testing.
I have an example of such approach to run greentea tests with `mbed-cli` tool on Bluepill target using stlink v2 and external UART adapter, but it uses monkey patching to add this functionality: https://github.com/vznncv/vznncv-mbed-greentea
### Issue request type
- [x] Enhancement
- [ ] Bug
Contributor guide
Research direction
Start by reviewing the mbed-cli custom board support described in the linked Mbed documentation and the existing mbed-tools CLI architecture. Define an external-script hook covering target detection, firmware uploading, board reset, and serial-port discovery, then verify that it supports program uploading and greentea testing for boards such as Bluepill with stlink v2 and an external UART adapter.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- cli, embedded-iot
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 30/100