Skip to content

Commit

Permalink
add debug for flash
Browse files Browse the repository at this point in the history
  • Loading branch information
jeffdi committed Jun 16, 2023
1 parent 5149db7 commit a5a7891
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions firmware_vex/nucleo/io_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,13 @@
import sys
from machine import Pin

VERSION = "io_config -- version 1.2.1"
VERSION = "io_config -- version 1.2.2"
config_filename = "gpio_config_def.py"
debug = False
# debug=True



# used as an activity indicator
# - active = flash firmware, checking for IO pulses

Expand Down Expand Up @@ -114,7 +115,7 @@ def flash_data(test_name, config_stream, first_line=1):
hex_file.write(f"{i}\n")
hex_file.close()

flash(f"{test_name}-tmp.hex")
flash(f"{test_name}-tmp.hex", debug)


def exec_flash_data(test, test_name, config_stream):
Expand All @@ -131,7 +132,7 @@ def exec_flash_data(test, test_name, config_stream):
test.powerup_sequence()
erase()
# test.flash(f"{test_name}.hex")
flash(f"{test_name}.hex")
flash(f"{test_name}.hex", debug)
flash_data(test_name, config_stream)
test.powerup_sequence()
test.release_reset()
Expand Down Expand Up @@ -474,8 +475,8 @@ def run_flash_caravel(v=1.6):
print("*** flashing Caravel")
test.apply_reset()
test.powerup_sequence()
erase()
if flash(f"firmware.hex"):
erase(debug=True)
if flash(f"firmware.hex", debug=True):
print("status Good")
else:
print("failed!")
Expand Down

0 comments on commit a5a7891

Please sign in to comment.