chore: blinky

This commit is contained in:
2024-12-07 03:52:01 +06:00
parent 88bffa691d
commit 9e48697f3d
16 changed files with 19200 additions and 87 deletions

View File

@@ -41,8 +41,7 @@ BIN = $(BUILD_DIR)/$(PROJECT).bin
HEX = $(BUILD_DIR)/$(PROJECT).hex
# flash
INTERFACE = stlink
OPENOCD_BASE=openocd -f interface/$(INTERFACE).cfg -f rtl8710_openocd/script/rtl8710.ocd -c "init" -c "reset" -c "halt"
RTL8710_PATH = ./rtl8710_openocd
FLASH_BIN = $(BUILD_DIR)/$(PROJECT).bin
.PHONY: all clean flash size test mac dump dump0 full_erase restore restore_nae verify reset
@@ -79,33 +78,14 @@ size: $(ELF)
clean:
rm -rf $(BUILD_DIR)
# flash tool
include $(RTL8710_PATH)/rtl8710-openocd.mk
# flash cmds
flash:
rtl-flash:
@$(OPENOCD_BASE) -c 'rtl8710_flash_auto_erase 1' \
-c 'rtl8710_flash_auto_verify 1' \
-c 'rtl8710_flash_write $(FLASH_BIN) 0' \
-c 'rtl8710_reboot' -c 'reset run' -c shutdown
test:
$(OPENOCD_BASE) -c "rtl8710_flash_read_id" -c "shutdown"
mac:
$(OPENOCD_BASE) -c "rtl8710_flash_read_mac" -c "shutdown"
dump:
$(OPENOCD_BASE) -c "rtl8710_flash_read_id" -c "rtl8710_flash_read dump.bin 0 1048576" -c "shutdown"
full_erase:
$(OPENOCD_BASE) -c "rtl8710_flash_mass_erase" -c shutdown
restore:
$(OPENOCD_BASE) -c "rtl8710_flash_auto_erase 1" -c "rtl8710_flash_auto_verify 1" -c "rtl8710_flash_write dump.bin 0" -c shutdown
restore_nae:
$(OPENOCD_BASE) -c "rtl8710_flash_auto_erase 0" -c "rtl8710_flash_auto_verify 1" -c "rtl8710_flash_write dump.bin 0" -c shutdown
verify:
$(OPENOCD_BASE) -c "rtl8710_flash_verify dump.bin 0" -c shutdown
reset:
$(OPENOCD_BASE) -c "rtl8710_reboot" -c shutdown
.PHONY: rtl-test rtl-mac rtl-dump rtl-full-erase rtl-restore rtl-restore-nae rtl-verify rtl-reset rtl-flash clean