Sfoglia il codice sorgente

build: Fix Invalid character '\' in expression when make upload in windows

Signed-off-by: Huaqi Fang <578567190@qq.com>
Huaqi Fang 3 anni fa
parent
commit
dd4924a6cc
1 ha cambiato i file con 9 aggiunte e 10 eliminazioni
  1. 9 10
      Build/Makefile.conf

+ 9 - 10
Build/Makefile.conf

@@ -59,24 +59,23 @@ GDB_PORT ?= 3333
 GDBREMOTE ?= | $(OPENOCD) $(OPENOCD_OPT) -c \"$(OPENOCD_CMD_ARGS); gdb_port pipe; log_output openocd.log\" -f $(OPENOCD_CFG)
 
 GDB_UPLOAD_ARGS ?= --batch
-GDB_UPLOAD_CMDS += -ex "thread apply all monitor reset halt"
+GDB_UPLOAD_CMDS += -ex 'thread apply all monitor reset halt'
+GDB_UPLOAD_CMDS += -ex 'thread apply all info reg pc'
+GDB_UPLOAD_CMDS += -ex 'thread 1'
+GDB_UPLOAD_CMDS += -ex 'load'
 # $$pc is for $pc in gdb, but need to do this in makefile
-# in command extra '\' is required
 # please make sure the _start label is provided in your startup code
 # and is the entry of the startup of cpu
-GDB_UPLOAD_CMDS += -ex "thread apply all info reg pc"
-GDB_UPLOAD_CMDS += -ex "thread 1"
-GDB_UPLOAD_CMDS += -ex "load"
 # make sure pc is set to _start after load
 # when load program to flash, the cpu will do reset init
 # before flash erase and do reset halt after flash write end
 # so we need to manually set pc to _start
 # see https://openocd.org/doc/html/CPU-Configuration.html#Target-Events
-GDB_UPLOAD_CMDS += -ex "thread apply all set \$$pc=_start"
-GDB_UPLOAD_CMDS += -ex "thread apply all info reg pc"
-GDB_UPLOAD_CMDS += -ex "thread 1"
-GDB_UPLOAD_CMDS += -ex "monitor resume"
-GDB_UPLOAD_CMDS += -ex "quit"
+GDB_UPLOAD_CMDS += -ex 'thread apply all set $$pc=_start'
+GDB_UPLOAD_CMDS += -ex 'thread apply all info reg pc'
+GDB_UPLOAD_CMDS += -ex 'thread 1'
+GDB_UPLOAD_CMDS += -ex 'monitor resume'
+GDB_UPLOAD_CMDS += -ex 'quit'
 
 OPENOCD_PORT_ARGS = -c "$(OPENOCD_CMD_ARGS); gdb_port $(GDB_PORT)"