mirror of
https://github.com/drasko/open-ameba.git
synced 2024-11-21 21:44:19 +00:00
update
This commit is contained in:
parent
020aedc9bb
commit
52c964be3f
2 changed files with 24 additions and 18 deletions
28
flasher.mk
28
flasher.mk
|
@ -109,13 +109,13 @@ _endgenbin:
|
|||
ifeq ($(FLASHER_TYPE), Jlink)
|
||||
|
||||
reset:
|
||||
@start $(JLINK_PATH)$(JLINK_EXE) -Device CORTEX-M3 -If SWD -Speed 1000 $(FLASHER_PATH)RTL_Reset.JLinkScript
|
||||
@$(JLINK_PATH)$(JLINK_EXE) -Device CORTEX-M3 -If SWD -Speed 1000 $(FLASHER_PATH)RTL_Reset.JLinkScript
|
||||
|
||||
runram:
|
||||
@start $(JLINK_PATH)$(JLINK_EXE) -Device CORTEX-M3 -If SWD -Speed 1000 $(FLASHER_PATH)RTL_RunRAM.JLinkScript
|
||||
@$(JLINK_PATH)$(JLINK_EXE) -Device CORTEX-M3 -If SWD -Speed 1000 $(FLASHER_PATH)RTL_RunRAM.JLinkScript
|
||||
|
||||
readfullflash:
|
||||
@start $(JLINK_PATH)$(JLINK_EXE) -Device CORTEX-M3 -If SWD -Speed 1000 $(FLASHER_PATH)RTL_FFlash.JLinkScript
|
||||
@$(JLINK_PATH)$(JLINK_EXE) -Device CORTEX-M3 -If SWD -Speed 1000 $(FLASHER_PATH)RTL_FFlash.JLinkScript
|
||||
|
||||
|
||||
flashburn:
|
||||
|
@ -128,24 +128,26 @@ flashburn:
|
|||
@echo define call3>>$(FLASHER_PATH)flash_file.jlink
|
||||
@echo FlasherWrite build/bin/ram_all.bin '$$'Image2Addr '$$'Image2Size>>$(FLASHER_PATH)flash_file.jlink
|
||||
@echo end>>$(FLASHER_PATH)flash_file.jlink
|
||||
@start $(JLINK_PATH)$(JLINK_GDBSRV) -device Cortex-M3 -if SWD -ir -endian little -speed 1000
|
||||
@cmd /K start $(JLINK_PATH)$(JLINK_GDBSRV) -device Cortex-M3 -if SWD -ir -endian little -speed 1000
|
||||
@$(GDB) -x $(FLASHER_PATH)gdb_wrflash.jlink
|
||||
@taskkill /F /IM $(JLINK_GDBSRV)
|
||||
#@taskkill /F /IM $(JLINK_GDBSRV)
|
||||
|
||||
flashwebfs:
|
||||
@echo set '$$'ImageSize = $(shell printf '0x%X\n' $$(stat --printf="%s" $(BIN_DIR)/webpages.espfs))>$(FLASHER_PATH)file_info.jlink
|
||||
@echo define call1>$(FLASHER_PATH)file_info.jlink
|
||||
@echo set '$$'ImageSize = $(shell printf '0x%X\n' $$(stat --printf="%s" $(BIN_DIR)/webpages.espfs))>>$(FLASHER_PATH)file_info.jlink
|
||||
@echo set '$$'ImageAddr = 0x0D0000>>$(FLASHER_PATH)file_info.jlink
|
||||
@echo define call1>>$(FLASHER_PATH)file_info.jlink
|
||||
@echo end>>$(FLASHER_PATH)file_info.jlink
|
||||
@echo define call2>>$(FLASHER_PATH)file_info.jlink
|
||||
@echo FlasherWrite $(BIN_DIR)/webpages.espfs '$$'ImageAddr '$$'ImageSize>>$(FLASHER_PATH)file_info.jlink
|
||||
@echo end>>$(FLASHER_PATH)file_info.jlink
|
||||
@start $(JLINK_PATH)$(JLINK_GDBSRV) -device Cortex-M3 -if SWD -ir -endian little -speed 1000
|
||||
@cmd /K start $(JLINK_PATH)$(JLINK_GDBSRV) -device Cortex-M3 -if SWD -ir -endian little -speed 1000
|
||||
@$(GDB) -x $(FLASHER_PATH)gdb_wrfile.jlink
|
||||
@taskkill /F /IM $(JLINK_GDBSRV)
|
||||
#@taskkill /F /IM $(JLINK_GDBSRV)
|
||||
|
||||
flash_OTA:
|
||||
@start $(JLINK_PATH)$(JLINK_GDBSRV) -device Cortex-M3 -if SWD -ir -endian little -speed 1000
|
||||
@cmd /K start $(JLINK_PATH)$(JLINK_GDBSRV) -device Cortex-M3 -if SWD -ir -endian little -speed 1000
|
||||
@$(GDB) -x $(FLASHER_PATH)gdb_ota.jlink
|
||||
@taskkill /F /IM $(JLINK_GDBSRV)
|
||||
#@taskkill /F /IM $(JLINK_GDBSRV)
|
||||
|
||||
else
|
||||
|
||||
|
@ -170,10 +172,14 @@ flashwebfs:
|
|||
|
||||
|
||||
reset:
|
||||
# @$(JLINK_PATH)$(JLINK_EXE) -Device CORTEX-M3 -If SWD -Speed $(FLASHER_SPEED) flasher/RTLreset.JLinkScript
|
||||
@$(OPENOCD) -f interface/$(FLASHER).cfg -c "transport select swd" -f $(FLASHER_PATH)rtl8710.ocd -c "init" -c "adapter_khz $(FLASHER_SPEED)" -c "reset halt" \
|
||||
-c "rtl8710_reboot" -c shutdown
|
||||
|
||||
runram:
|
||||
# @$(JLINK_PATH)$(JLINK_GDB) -device Cortex-M3 -if SWD -ir -endian little -speed $(FLASHER_SPEED)
|
||||
# @$(GDB) -x flasher/gdb_run_ram.jlink
|
||||
# @taskkill.exe -F -IM $(JLINK_GDB)
|
||||
@$(OPENOCD) -f interface/$(FLASHER).cfg -c "transport select swd" -f $(FLASHER_PATH)rtl8710.ocd -c "init" -c "adapter_khz $(FLASHER_SPEED)" -c "reset halt" \
|
||||
-c "load_image $(RAM1R_IMAGE) 0x10000bc8 bin" \
|
||||
-c "load_image $(RAM2_IMAGE) 0x10006000 bin" \
|
||||
|
|
|
@ -36,12 +36,11 @@ if $rtl8710_flasher_capacity == 0
|
|||
monitor go
|
||||
FlasherWait
|
||||
set $id = {int}($rtl8710_flasher_buffer + 0x0C)
|
||||
set $rtl8710_flasher_capacity = 1 << (($id >> 16) & 0x0ff)
|
||||
if ($id == 0x1420c2)
|
||||
set $rtl8710_flasher_capacity = 1 << (($id >> 16) & 0x0ff)
|
||||
printf "Flash ID = 0x%08x : MX25L8006E (%d kbytes)\n", $id, $rtl8710_flasher_capacity>>10
|
||||
else
|
||||
set $rtl8710_flasher_capacity = 1024*1024)
|
||||
error "Flash ID = 0x%08x : ?\n", $id
|
||||
printf "Flash ID = 0x%08x : (%d kbytes)\n", $id, $rtl8710_flasher_capacity>>10
|
||||
end
|
||||
printf "RTL8710 flasher initialized\n"
|
||||
else
|
||||
|
@ -142,15 +141,16 @@ SetClk83MHz
|
|||
SPI_Init
|
||||
FlasherInit
|
||||
FlasherLoad flasher/rtl8710_flasher.bin
|
||||
if $ImageSize != 0
|
||||
call1
|
||||
if $ImageSize != 0
|
||||
set $ImageEnd = $ImageSize + $ImageAddr + 0x4000
|
||||
if $rtl8710_flasher_capacity >= $ImageEnd
|
||||
printf "Write Image size %d to Flash addr 0x%08x:\n", $ImageSize, $ImageAddr
|
||||
call1
|
||||
else
|
||||
call2
|
||||
else
|
||||
printf "Error: Image size is too big!\n"
|
||||
end
|
||||
else
|
||||
else
|
||||
printf "Error: Image size is zero!\n"
|
||||
end
|
||||
quit
|
||||
|
|
Loading…
Reference in a new issue