change(arduino): Rework arduino app #393
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
This pull request refactors how Arduino build and flash information is handled and improves documentation and tests to match the new structure. The main changes involve extracting flash settings and binary information directly from build artifacts (like
flash_args), simplifying the codebase, and updating the documentation and tests accordingly. It also replaces the use of multiple binaries with the use of the merged binary.This will allow for us to have multi dut tests without conflicts.
Refactoring and Build Directory Handling:
ArduinoAppclass now extracts the sketch name, FQBN, flash settings, bootloader offset, and binary paths directly from the build directory and associated files (such asflash_argsandbuild.options.json). This replaces the previous hardcoded logic for flash settings and binary offsets.README.mdhas been updated to reflect this improved build directory handling.Flashing Logic Update:
serial.pyhas been updated to use the new flash settings and bootloader offset extracted from the build artifacts, rather than relying on hardcoded values or precomputed file lists. [1] [2]Testing and Documentation Improvements:
binary_file) and to use the revised build directory structure. [1] [2] [3] [4]README.mdhas been improved to clarify how to specify the build directory and how the Arduino service locates required files. [1] [2]Build Artifact Example:
flash_argsfile has been added to show the expected format for extracting flash settings and offsets.Testing
Tested locally