Skip to content

new feature: hil-serial-by-function#71

Merged
brainstorm merged 1 commit into
brainstorm:mainfrom
jubeormk1:feature/hil-serial-by-function
Mar 2, 2026
Merged

new feature: hil-serial-by-function#71
brainstorm merged 1 commit into
brainstorm:mainfrom
jubeormk1:feature/hil-serial-by-function

Conversation

@jubeormk1

@jubeormk1 jubeormk1 commented Mar 2, 2026

Copy link
Copy Markdown
Collaborator

While preparing the hil environment, I noticed that it will save time if we can use an alias to link the serials by function, so later on the details of where a target and its usb-uart adapter are connected are hidden from the test scripts.

I have created a set of config files, scripts and services that will handle giving relevant devices a predictable path every time they are added or removed from the hil-host.

This will work like this:

  • a new serial device (/dev/tty*) is plug/unplug
  • for every /dev/serial/by-id/ device
  • look for a "function map" in the serial_map.conf file
  • if the device has a defined value in the config file, create the link /dev/serial/by-function/device-value

Having a predictable pattern to address targets and uart adapters make some task trivial. Two examples:

  • reset all devices: for device in /dev/serial/by-function/prog_*; do espflash reset -p "$device"; done
  • erase all devices flash: for device in /dev/serial/by-function/prog_*; do espflash erase-flash -p "$device"; done

As the maintainer has control of the serial map file, the value can be modified to address details of task for different chip families and new functions can be added to adapt to new requirements.

This PR is aligned with the the task defined in the issue #37

while preparing the hil environment, I noticed that it will save time
if we can use an alias to link the serials by function, so later on
the details of where a target and its usb-uart adapter are connected are
hidden from the test scripts.
@jubeormk1 jubeormk1 assigned brainstorm and Autofix and unassigned brainstorm and Autofix Mar 2, 2026
@brainstorm brainstorm merged commit d8a9f5c into brainstorm:main Mar 2, 2026
8 checks passed
@brainstorm

Copy link
Copy Markdown
Owner

@jubeormk1 Curiosity, did you ever come across https://github.com/esp-rs/esp-hal/tree/main/hil-test when setting up our HIL? I just did and thought it might bring good ideas here?

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants