new ihm
This commit is contained in:
1 parent
2b9e574ba9
commit
b119a6abd7
583 files changed
+224175
-218466
No files matched your search
@@ -1,38 +1,40 @@
|
||||
stm32cube_programmer_path := STMicroelectronics/STM32Cube/STM32CubeProgrammer/bin
|
||||
stm32cube_programmer_filename := STM32_Programmer_CLI.exe
|
||||
stm32cube_programmer_filepath := $(stm32cube_programmer_path)/$(stm32cube_programmer_filename)
|
||||
stm32cube_loader_relative_path := ExternalLoader/$(stldr)
|
||||
stm32cube_loader := $(stm32cube_programmer_path)/$(stm32cube_loader_relative_path)
|
||||
|
||||
program_files_win32 = /c/Program Files (x86)
|
||||
program_files_win64 = /c/Program Files
|
||||
program_files_CLT = /c/ST/STM32CubeCLT/STM32CubeCLT/
|
||||
|
||||
# Check which tools are installed
|
||||
ifneq ("$(shell find "$(program_files_win64)/$(stm32cube_programmer_filepath)" 2> nul )","")
|
||||
program_files_path := $(program_files_win64)
|
||||
else ifneq ("$(shell find "$(program_files_win32)/$(stm32cube_programmer_filepath)" 2> nul )","")
|
||||
program_files_path := $(program_files_win32)
|
||||
else ifneq ("$(shell find "$(program_files_CLT)/$(stm32cube_programmer_filepath)" 2> nul )","")
|
||||
program_files_path := $(program_files_CLT)
|
||||
endif
|
||||
|
||||
st_stm32cube_programmer_path := $(program_files_path)/$(stm32cube_programmer_path)
|
||||
st_stm32cube_programmer_filepath := $(program_files_path)/$(stm32cube_programmer_filepath)
|
||||
st_stm32cube_external_loader := $(program_files_path)/$(stm32cube_loader)
|
||||
|
||||
# define variable n as some line breaks for the error message
|
||||
define error_msg
|
||||
|
||||
|
||||
|
||||
****************************************************************************************************************************
|
||||
* *
|
||||
* STM32CubeProgrammer is not found. Make sure the STM32CubeProgrammer is installed in its default directory. *
|
||||
* You can download it at https://www.st.com/en/development-tools/stm32cubeprog.html *
|
||||
* *
|
||||
****************************************************************************************************************************
|
||||
|
||||
|
||||
|
||||
stm32cube_programmer_path := STMicroelectronics/STM32Cube/STM32CubeProgrammer/bin
|
||||
stm32cube_programmer_filename := STM32_Programmer_CLI.exe
|
||||
stm32cube_programmer_filepath := $(stm32cube_programmer_path)/$(stm32cube_programmer_filename)
|
||||
stm32cube_loader_relative_path := ExternalLoader/$(stldr)
|
||||
stm32cube_loader := $(stm32cube_programmer_path)/$(stm32cube_loader_relative_path)
|
||||
|
||||
program_files_win32 = /c/Program Files (x86)
|
||||
program_files_win64 = /c/Program Files
|
||||
program_files_CLT = /c/ST/STM32CubeCLT/STM32CubeCLT/
|
||||
|
||||
# Check which tools are installed (Windows only; macOS/Linux flash through gcc/flash.sh)
|
||||
ifeq ($(OS),Windows_NT)
|
||||
ifneq ("$(shell find "$(program_files_win64)/$(stm32cube_programmer_filepath)" 2> nul )","")
|
||||
program_files_path := $(program_files_win64)
|
||||
else ifneq ("$(shell find "$(program_files_win32)/$(stm32cube_programmer_filepath)" 2> nul )","")
|
||||
program_files_path := $(program_files_win32)
|
||||
else ifneq ("$(shell find "$(program_files_CLT)/$(stm32cube_programmer_filepath)" 2> nul )","")
|
||||
program_files_path := $(program_files_CLT)
|
||||
endif
|
||||
endif
|
||||
|
||||
st_stm32cube_programmer_path := $(program_files_path)/$(stm32cube_programmer_path)
|
||||
st_stm32cube_programmer_filepath := $(program_files_path)/$(stm32cube_programmer_filepath)
|
||||
st_stm32cube_external_loader := $(program_files_path)/$(stm32cube_loader)
|
||||
|
||||
# define variable n as some line breaks for the error message
|
||||
define error_msg
|
||||
|
||||
|
||||
|
||||
****************************************************************************************************************************
|
||||
* *
|
||||
* STM32CubeProgrammer is not found. Make sure the STM32CubeProgrammer is installed in its default directory. *
|
||||
* You can download it at https://www.st.com/en/development-tools/stm32cubeprog.html *
|
||||
* *
|
||||
****************************************************************************************************************************
|
||||
|
||||
|
||||
|
||||
endef
|
||||
@@ -1,10 +1,17 @@
|
||||
_extflash_:
|
||||
ifeq ($(program_files_path),)
|
||||
$(error $(error_msg))
|
||||
endif
|
||||
@cd "$(st_stm32cube_programmer_path)" && ./$(stm32cube_programmer_filename) -c port=SWD ap=1 -d $(application_path)/$(binary_output_path)/target.hex -el $(stm32cube_loader_relative_path) -hardRst
|
||||
_intflash_:
|
||||
ifeq ($(program_files_path),)
|
||||
$(error $(error_msg))
|
||||
endif
|
||||
@cd "$(st_stm32cube_programmer_path)" && ./$(stm32cube_programmer_filename) -c port=SWD ap=1 -d $(application_path)/$(binary_output_path)/intflash.hex -el $(stm32cube_loader_relative_path) -hardRst
|
||||
ifeq ($(OS),Windows_NT)
|
||||
_extflash_:
|
||||
ifeq ($(program_files_path),)
|
||||
$(error $(error_msg))
|
||||
endif
|
||||
@cd "$(st_stm32cube_programmer_path)" && ./$(stm32cube_programmer_filename) -c port=SWD ap=1 -d $(application_path)/$(binary_output_path)/target.hex -el $(stm32cube_loader_relative_path) -hardRst
|
||||
_intflash_:
|
||||
ifeq ($(program_files_path),)
|
||||
$(error $(error_msg))
|
||||
endif
|
||||
@cd "$(st_stm32cube_programmer_path)" && ./$(stm32cube_programmer_filename) -c port=SWD ap=1 -d $(application_path)/$(binary_output_path)/intflash.hex -el $(stm32cube_loader_relative_path) -hardRst
|
||||
else
|
||||
# macOS/Linux: delegate to gcc/flash.sh (finds STM32_Programmer_CLI, uses ap=1 mode=UR)
|
||||
flash_project := $(if $(findstring Appli,$(binary_output_path)),appli,boot)
|
||||
_extflash_ _intflash_:
|
||||
@"$(application_path)/gcc/flash.sh" $(flash_project)
|
||||
endif
|
||||
Reference in new issue
Block a user