diff options
| author | Ha Thach <[email protected]> | 2026-06-05 21:23:40 +0700 |
|---|---|---|
| committer | GitHub <[email protected]> | 2026-06-05 21:23:40 +0700 |
| commit | 1009b14b02232adc70a0a5a5ed4a3a06118fef0d (patch) | |
| tree | ff083c76bbe662b40475cf90df7d78584113ee32 | |
| parent | 9dea2c8f397c004d3f3288bac3c0df9c842fe713 (diff) | |
add tm4c123x evk to hill pool (#3676)
* add ek_tm4c123gxl to the hil pool, flashing with lm4flash
| -rw-r--r-- | hw/bsp/family_support.cmake | 20 | ||||
| -rw-r--r-- | hw/bsp/tm4c/family.cmake | 4 | ||||
| -rwxr-xr-x | test/hil/hil_test.py | 13 | ||||
| -rw-r--r-- | test/hil/tinyusb.json | 14 |
4 files changed, 49 insertions, 2 deletions
diff --git a/hw/bsp/family_support.cmake b/hw/bsp/family_support.cmake index 07d693d77..af2716b28 100644 --- a/hw/bsp/family_support.cmake +++ b/hw/bsp/family_support.cmake @@ -900,6 +900,26 @@ function(family_flash_uniflash TARGET) #set_property(TARGET ${TARGET}-uniflash PROPERTY FOLDER ${TARGET}-group) endfunction() +# Add flash lm4flash target (lightweight flasher for TI Tiva-C/Stellaris ICDI boards) +function(family_flash_lm4flash TARGET) + if (NOT DEFINED LM4FLASH) + set(LM4FLASH lm4flash) + endif () + + if (NOT DEFINED LM4FLASH_OPTION) + set(LM4FLASH_OPTION "") + endif () + separate_arguments(OPTION_LIST UNIX_COMMAND ${LM4FLASH_OPTION}) + + add_custom_target(${TARGET}-lm4flash + DEPENDS ${TARGET} + COMMAND ${LM4FLASH} ${OPTION_LIST} $<TARGET_FILE_DIR:${TARGET}>/${TARGET}.bin + VERBATIM + ) + + #set_property(TARGET ${TARGET}-lm4flash PROPERTY FOLDER ${TARGET}-group) +endfunction() + # Add flash ft9xx target need to remove kernal's ftdi_sio and bind D2XX drivers # sudo rmmod ftdi_sio && for i in 0 1 2 3; do sudo sh -c "echo 3-3.4:1.$i > /sys/bus/usb/drivers/ftdi_sio/unbind" 2>/dev/null; done function(family_flash_ft9xx TARGET) diff --git a/hw/bsp/tm4c/family.cmake b/hw/bsp/tm4c/family.cmake index 41b8a597a..ce7c62409 100644 --- a/hw/bsp/tm4c/family.cmake +++ b/hw/bsp/tm4c/family.cmake @@ -79,6 +79,6 @@ function(family_configure_example TARGET RTOS) # Flashing family_add_bin_hex(${TARGET}) family_flash_jlink(${TARGET}) - family_flash_openocd(${TARGET}) - family_flash_uniflash(${TARGET}) + family_flash_lm4flash(${TARGET}) + # family_flash_uniflash(${TARGET}) endfunction() diff --git a/test/hil/hil_test.py b/test/hil/hil_test.py index b0b3fc17e..609199d1b 100755 --- a/test/hil/hil_test.py +++ b/test/hil/hil_test.py @@ -496,6 +496,19 @@ def reset_uniflash(board): return subprocess.CompletedProcess(args=['dummy'], returncode=0) +def flash_lm4flash(board, firmware): + # TI Tiva-C / Stellaris ICDI: lightweight lm4flash, resets and runs after write + flasher = board['flasher'] + ret = run_cmd(f'lm4flash -s {flasher["uid"]} {flasher["args"]} {firmware}.bin') + return ret + + +def reset_lm4flash(board): + # lm4flash has no reset-only mode; it resets+runs on flash, so reset is a no-op + flasher = board['flasher'] + return subprocess.CompletedProcess(args=['dummy'], returncode=0) + + # ------------------------------------------------------------- # Tests: dual # ------------------------------------------------------------- diff --git a/test/hil/tinyusb.json b/test/hil/tinyusb.json index 467b7378a..79b2645c7 100644 --- a/test/hil/tinyusb.json +++ b/test/hil/tinyusb.json @@ -1,6 +1,20 @@ { "boards": [ { + "name": "ek_tm4c123gxl", + "uid": "010105186C60A110", + "tests": { + "device": true, + "host": false, + "dual": false + }, + "flasher": { + "name": "lm4flash", + "uid": "0E205D19", + "args": "-v" + } + }, + { "name": "espressif_p4_function_ev", "uid": "6055F9F98715", "build": { |
