Skip to content

Commit

Permalink
Merge pull request #275 from mithro/more-flash-fixes
Browse files Browse the repository at this point in the history
Disable the lm32 firmware from SPI flash for now
  • Loading branch information
mithro authored Aug 6, 2016
2 parents 39bb34b + 0bd873c commit 08ef6a6
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 3 deletions.
5 changes: 4 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -152,8 +152,11 @@ load: load-gateware $(addprefix load-,$(TARGETS))
# Flash
flash-gateware: gateware-submodules
$(MAKEPY_CMD) flash-bitstream
@echo ""
@echo ""
@echo "Gateware has been flashed."

flash: flash-gateware $(addprefix flash-,$(TARGETS))
flash: flash-gateware $(addprefix flash-,$(TARGETS))
@echo ""
@echo ""
@echo "Power cycle your board to boot newly flashed stuff."
Expand Down
15 changes: 13 additions & 2 deletions Makefile.lm32
Original file line number Diff line number Diff line change
Expand Up @@ -64,9 +64,20 @@ image-lm32: firmware-lm32
$(MAKEIMAGE_CMD) --fbi --output $(HDMI2USBDIR)/firmware/lm32/firmware.fbi $(HDMI2USBDIR)/firmware/lm32/firmware.bin

flash-lm32: image-lm32
@echo
@echo "Skipping writing lm32 firmware to flash."
@echo "(Loading lm32 firmware from flash is current disabled --"
@echo " see https://github.com/timvideos/HDMI2USB-misoc-firmware/issues/274)"
@echo "Booting will use lm32 firmware embedded in the gateware."
@echo
# export FIRMWARE_ADDRESS=$$($(PYTHON) -c "import platforms.$(BOARD) as b; print(b.Platform.gateware_size)"); \
# echo "Flashing to $$($(PYTHON) -c "print(hex($$FIRMWARE_ADDRESS))") ($$FIRMWARE_ADDRESS)"; \
# $(FLASHEXTRA_CMD) $(HDMI2USBDIR)/firmware/lm32/firmware.fbi $$FIRMWARE_ADDRESS

clear-flash-lm32:
export FIRMWARE_ADDRESS=$$($(PYTHON) -c "import platforms.$(BOARD) as b; print(b.Platform.gateware_size)"); \
echo "Flashing to $$($(PYTHON) -c "print(hex($$FIRMWARE_ADDRESS))") ($$FIRMWARE_ADDRESS)"; \
$(FLASHEXTRA_CMD) $(HDMI2USBDIR)/firmware/lm32/firmware.fbi $$FIRMWARE_ADDRESS
echo "Zeroing $$($(PYTHON) -c "print(hex($$FIRMWARE_ADDRESS))") ($$FIRMWARE_ADDRESS)"; \
$(FLASHEXTRA_CMD) $(HDMI2USBDIR)/firmware/zero.bin $$FIRMWARE_ADDRESS

clean-lm32:
if [ -f $(MSCDIR)/software/include/generated/cpu.mak ]; then \
Expand Down
Binary file added firmware/zero.bin
Binary file not shown.

0 comments on commit 08ef6a6

Please sign in to comment.