diff options
| author | hathach <[email protected]> | 2019-03-10 01:24:13 +0700 |
|---|---|---|
| committer | hathach <[email protected]> | 2019-03-10 01:24:13 +0700 |
| commit | ddfc32f5ec7b586c40b8964863d4b19cd5b83185 (patch) | |
| tree | b6a24f2aea28ebb4b1e9836a15cdc9e3b591abc5 /hw | |
| parent | 0ff7d609f0268d4abcec9c6ba2f3e24104a3fd96 (diff) | |
adding segger project for stm32f4
Diffstat (limited to 'hw')
| -rw-r--r-- | hw/bsp/stm32f407g_disc1/board.mk | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/hw/bsp/stm32f407g_disc1/board.mk b/hw/bsp/stm32f407g_disc1/board.mk index 0fc35cee7..e20c0cb04 100644 --- a/hw/bsp/stm32f407g_disc1/board.mk +++ b/hw/bsp/stm32f407g_disc1/board.mk @@ -27,8 +27,20 @@ VENDOR = st CHIP_FAMILY = stm32f4 # Path to STM32 Cube Programmer CLI -STM32Prog = STM32_Programmer_CLI +ifeq ($(OS),Windows_NT) + STM32Prog = C:/Program Files/STMicroelectronics/STM32Cube/STM32CubeProgrammer/bin/STM32_Programmer_CLI +else + UNAME_S := $(shell uname -s) + + ifeq ($(UNAME_S),Linux) + STM32Prog = $(HOME)/STMicroelectronics/STM32Cube/STM32CubeProgrammer/bin/STM32_Programmer_CLI + endif + + ifeq ($(UNAME_S),Darwin) + STM32Prog = STM32_Programmer_CLI + endif +endif -# flash target to download +# flash target using on-board stlink flash: $(BUILD)/$(BOARD)-firmware.elf $(STM32Prog) --connect port=swd --write $< --go |
