iotile / iotile/coretools

Update jlink transport plugin to not need hack in debug_intefarce

Open
#753 1 comment 0 reactions 0 assignees View on GitHub
transport-jlink type:technical-debt
Dominant language
Python
Stars
14
Forks
7
PR merge metrics
No merged PRs in 30d

Description

There was a hack put into the `DeviceAdapter` methods to allow the `jlink` transport plugin to reflash a device without calling "connect" first on the adapter. This was because connect verified some firmware RAM structures that were not guaranteed to be valid always.

When we move to the new `AbstractDeviceAdapter` interface for connecting to devices, we're not going to bring this hack along so we need to fix it. From looking at the code, it seems like we just need to

- move VERIFY_CONTROL_STRUCTURE to `open_rpc_interface` instead of connect.
- make sure we can connect_direct from `HardwareManager` without enabling the RPC interface with a flag.
- Use the `connection_string` parameter in `HardwareManager.debug` to `connect` and then open the debug interface rather than just opening the debug interface.

That way we can guarantee the ability to access the debug interface without needing a hack that allows the debug interface to be "opened" without an underlying device connection.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.