Skip to content

Commit ac618f7

Browse files
committed
Adding ability to clear lm32 in SPI flash.
Current loading lm32 firmware from SPI flash is broken because it gets loaded into main ram and that doesn't work (see issue timvideos#274).
1 parent 39bb34b commit ac618f7

File tree

3 files changed

+6
-1
lines changed

3 files changed

+6
-1
lines changed

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ load: load-gateware $(addprefix load-,$(TARGETS))
153153
flash-gateware: gateware-submodules
154154
$(MAKEPY_CMD) flash-bitstream
155155

156-
flash: flash-gateware $(addprefix flash-,$(TARGETS))
156+
flash: flash-gateware $(addprefix flash-,$(TARGETS))
157157
@echo ""
158158
@echo ""
159159
@echo "Power cycle your board to boot newly flashed stuff."

Makefile.lm32

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,11 @@ flash-lm32: image-lm32
6868
echo "Flashing to $$($(PYTHON) -c "print(hex($$FIRMWARE_ADDRESS))") ($$FIRMWARE_ADDRESS)"; \
6969
$(FLASHEXTRA_CMD) $(HDMI2USBDIR)/firmware/lm32/firmware.fbi $$FIRMWARE_ADDRESS
7070

71+
clear-flash-lm32:
72+
export FIRMWARE_ADDRESS=$$($(PYTHON) -c "import platforms.$(BOARD) as b; print(b.Platform.gateware_size)"); \
73+
echo "Zeroing $$($(PYTHON) -c "print(hex($$FIRMWARE_ADDRESS))") ($$FIRMWARE_ADDRESS)"; \
74+
$(FLASHEXTRA_CMD) $(HDMI2USBDIR)/firmware/zero.bin $$FIRMWARE_ADDRESS
75+
7176
clean-lm32:
7277
if [ -f $(MSCDIR)/software/include/generated/cpu.mak ]; then \
7378
$(MAKE) -C firmware/lm32 clean; \

firmware/zero.bin

512 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)