diff options
| author | Scott Shawcroft <scott@tannewt.org> | 2020-04-17 16:23:28 -0700 |
|---|---|---|
| committer | Scott Shawcroft <scott@tannewt.org> | 2020-05-15 15:36:16 -0700 |
| commit | 6aaab005c5f3a781fec229640c74bf44a601fc97 (patch) | |
| tree | d81d0c4d0387a15f8ea764ea31062d47527a4390 /tools | |
| parent | 0d8bca92e208e705150097d26db6a5390dc9eb9b (diff) | |
Initial ESP32S2 port.
Basic blinky works but doesn't check pins.
Diffstat (limited to 'tools')
| -rw-r--r-- | tools/build_board_info.py | 3 | ||||
| -rw-r--r-- | tools/join_bins.py | 20 |
2 files changed, 22 insertions, 1 deletions
diff --git a/tools/build_board_info.py b/tools/build_board_info.py index 3594f2ae7..7eed2c70c 100644 --- a/tools/build_board_info.py +++ b/tools/build_board_info.py @@ -12,7 +12,7 @@ from sh.contrib import git sys.path.append("adabot") import adabot.github_requests as github -SUPPORTED_PORTS = ["nrf", "atmel-samd", "stm", "cxd56", "mimxrt10xx", "litex"] +SUPPORTED_PORTS = ["atmel-samd", "cxd56", "esp32s2", "litex", "mimxrt10xx", "nrf", "stm"] BIN = ('bin',) UF2 = ('uf2',) @@ -35,6 +35,7 @@ extension_by_port = { "cxd56": SPK, "mimxrt10xx": HEX_UF2, "litex": DFU, + "esp32s2": BIN } # Per board overrides diff --git a/tools/join_bins.py b/tools/join_bins.py new file mode 100644 index 000000000..cb73aaabb --- /dev/null +++ b/tools/join_bins.py @@ -0,0 +1,20 @@ +import sys + +output_filename = sys.argv[1] +input_filenames = {} +i = 2 +while i < len(sys.argv): + offset = int(sys.argv[i], 16) + filename = sys.argv[i + 1] + input_filenames[offset] = filename + i += 2 + +with open(output_filename, "wb") as output_file: + offsets = sorted(input_filenames.keys()) + for offset in offsets: + input_filename = input_filenames[offset] + # Fill with ones to save NOR flash. + while output_file.tell() < offset: + output_file.write(b"\xff") + with open(input_filename, "rb") as input_file: + output_file.write(input_file.read()) |
