Skip to content

Commit

Permalink
successful flashing
Browse files Browse the repository at this point in the history
  • Loading branch information
irvingywang committed Aug 22, 2024
1 parent 1a4512f commit 0788af8
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
12 changes: 6 additions & 6 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -262,15 +262,15 @@ clean_unix:
#######################################

# Windows (Powershell)
ECHO_WARNING_POWERSHELL=powershell Write-Host -ForegroundColor Yellow [Message from Jason]:
ECHO_SUCCESS_POWERSHELL=powershell Write-Host -ForegroundColor Green [Success]
ECHO_WARNING_POWERSHELL=powershell Write-Host -ForegroundColor Yellow [Warning]:
ECHO_SUCCESS_POWERSHELL=powershell Write-Host -ForegroundColor Green [Success]:

download_powershell:
@echo "Attempting to use CMSIS-DAP..."
@openocd -f config/openocd_cmsis_dap.cfg -c init -c halt -c "program $(BUILD_DIR)/$(TARGET).bin 0x08000000 verify reset" -c "reset run" -c shutdown && \
@openocd -f $(CONTROL_BASE)/config/openocd_cmsis_dap.cfg -c init -c halt -c "program $(BUILD_DIR)/$(TARGET).bin 0x08000000 verify reset" -c "reset run" -c shutdown && \
($(ECHO_SUCCESS_POWERSHELL) "Successfully programmed the device using CMSIS-DAP.") || \
($(ECHO_WARNING_POWERSHELL) "Failed to connect using CMSIS-DAP. Attempting to use STLink..." && \
openocd -f config/openocd_stlink.cfg -c init -c halt -c "program $(BUILD_DIR)/$(TARGET).bin 0x08000000 verify reset" -c "reset run" -c shutdown && \
openocd -f $(CONTROL_BASE)/config/openocd_stlink.cfg -c init -c halt -c "program $(BUILD_DIR)/$(TARGET).bin 0x08000000 verify reset" -c "reset run" -c shutdown && \
($(ECHO_SUCCESS_POWERSHELL) "Successfully programmed the device using STLink.") || \
($(ECHO_WARNING_POWERSHELL) "Failed to connect using both CMSIS-DAP and STLink. Please check your connections and try again."))

Expand All @@ -281,10 +281,10 @@ ECHO_SUCCESS=echo "\033[32m[Success]\033[0m"

download:
@echo "Attempting to use CMSIS-DAP..."
@openocd -d2 -f control-base/config/openocd_cmsis_dap.cfg -c init -c halt -c "program $(BUILD_DIR)/$(TARGET).bin 0x08000000 verify reset" -c "reset run" -c shutdown && \
@openocd -d2 -f $(CONTROL_BASE)/config/openocd_cmsis_dap.cfg -c init -c halt -c "program $(BUILD_DIR)/$(TARGET).bin 0x08000000 verify reset" -c "reset run" -c shutdown && \
($(ECHO_SUCCESS) "Successfully programmed the device using CMSIS-DAP.") || \
($(ECHO_WARNING) "Failed to connect using CMSIS-DAP. Attempting to use STLink..." && \
openocd -d2 -f control-base/config/openocd_stlink.cfg -c init -c halt -c "program $(BUILD_DIR)/$(TARGET).bin 0x08000000 verify reset" -c "reset run" -c shutdown && \
openocd -d2 -f $(CONTROL_BASE)/config/openocd_stlink.cfg -c init -c halt -c "program $(BUILD_DIR)/$(TARGET).bin 0x08000000 verify reset" -c "reset run" -c shutdown && \
($(ECHO_SUCCESS) "Successfully programmed the device using STLink.") || \
($(ECHO_WARNING) "Failed to connect using both CMSIS-DAP and STLink. Please check your connections and try again."))

Expand Down
2 changes: 1 addition & 1 deletion control-base
Submodule control-base updated 1 files
+6 −6 .gitmodules

0 comments on commit 0788af8

Please sign in to comment.