mimxrt/boards/TEENSY40: Re-create the flash FS after deploy.
This is required since the Teensy Halfkay loader attempts to erase all of the flash but fails to do so, at least in my tests. Formatting brings it back to a known state.
This commit is contained in:
parent
dfd4324eb1
commit
745b4319a2
@ -2,6 +2,8 @@ BOARD ?= TEENSY40
|
||||
BOARD_DIR ?= boards/$(BOARD)
|
||||
BUILD ?= build-$(BOARD)
|
||||
|
||||
PORT ?= /dev/ttyACM0
|
||||
|
||||
CROSS_COMPILE ?= arm-none-eabi-
|
||||
|
||||
ifeq ($(wildcard $(BOARD_DIR)/.),)
|
||||
|
11
ports/mimxrt/boards/TEENSY40/format.py
Normal file
11
ports/mimxrt/boards/TEENSY40/format.py
Normal file
@ -0,0 +1,11 @@
|
||||
# format.py
|
||||
# Re-create the file system
|
||||
|
||||
import os
|
||||
import mimxrt
|
||||
|
||||
bdev = mimxrt.Flash()
|
||||
|
||||
os.VfsLfs2.mkfs(bdev, progsize=256)
|
||||
vfs = os.VfsLfs2(bdev, progsize=256)
|
||||
os.mount(vfs, "/")
|
@ -3,3 +3,5 @@ MCU_VARIANT = MIMXRT1062DVJ6A
|
||||
|
||||
deploy: $(BUILD)/firmware.hex
|
||||
teensy_loader_cli --mcu=imxrt1062 -v -w $<
|
||||
sleep 1
|
||||
$(PYTHON) $(TOP)/tools/pyboard.py --device $(PORT) $(BOARD_DIR)/format.py
|
||||
|
Loading…
Reference in New Issue
Block a user