Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding support for windows #20

Open
asafsirin opened this issue Dec 27, 2020 · 1 comment
Open

Adding support for windows #20

asafsirin opened this issue Dec 27, 2020 · 1 comment

Comments

@asafsirin
Copy link

Hi there

perhaps this project could be extended with windows support. adjusted makefiles a bit to get f1 template compiled as below:
template makefile changes:
#include ./STM32-base/make/common.mk
include C:/software/stm32/STM32-base/make/common.mk

common.mk changes:

windows mod (added). changed to bash find

FIND_EXEC ?= C:/software/bshell/find.exe
PROJECT_DIR ?= C:/software/stm32/templates/STM32-base-F1-template

windows mod (replace)

#STM32_BASE_PATH   ?= ./STM32-base
#STM32_CUBE_PATH   ?= ./STM32-base-STM32Cube
STM32_BASE_PATH   ?= c:/software/stm32/STM32-base
STM32_CUBE_PATH   ?= c:/software/stm32/STM32-base-STM32Cube

windows mod (replace)

#BIN_FOLDER ?= ./bin
#OBJ_FOLDER ?= ./obj
#SRC_FOLDER ?= ./src
#INC_FOLDER ?= ./inc
BIN_FOLDER ?= $(PROJECT_DIR)/bin
OBJ_FOLDER ?= $(PROJECT_DIR)/obj
SRC_FOLDER ?= $(PROJECT_DIR)/src
INC_FOLDER ?= $(PROJECT_DIR)/inc

windows mod (replace)

#TOOLCHAIN_PATH      ?= ../../tools/bin/
TOOLCHAIN_PATH      ?= C:/software/gcc-arm/gcc-arm-none-eabi-10-2020-q4-major/bin

windows mod (replace)

#TOOLCHAIN_SEPARATOR ?=
TOOLCHAIN_SEPARATOR ?= /

output:

C:\software\stm32\templates\STM32-base-F1-template>make
C:/software/gcc-arm/gcc-arm-none-eabi-10-2020-q4-major/bin/arm-none-eabi-g++ -c -specs=nosys.specs -Wall -Wextra -g -ffunction-sections -fdata-sections -D STM32F103xB -Wl,-Lc:/software/stm32/STM32-bas
e/linker,-Tc:/software/stm32/STM32-base/linker/STM32F1xx/STM32F103x8.ld -I./inc -Ic:/software/stm32/STM32-base/startup -mcpu=cortex-m3 -march=armv7-m -mlittle-endian -mthumb -masm-syntax-unified -D CA
LL_ARM_SYSTEM_INIT -Ic:/software/stm32/STM32-base-STM32Cube/CMSIS/ARM/inc -Ic:/software/stm32/STM32-base-STM32Cube/CMSIS/STM32F1xx/inc -fno-threadsafe-statics -fno-rtti -fno-exceptions -fno-unwind-tab
les c:/software/stm32/STM32-base/startup/STM32F1xx/STM32F103xB.s -o C:/software/stm32/templates/STM32-base-F1-template/obj/startup_STM32F103xB.o
C:/software/gcc-arm/gcc-arm-none-eabi-10-2020-q4-major/bin/arm-none-eabi-g++ -specs=nosys.specs -Wall -Wextra -g -ffunction-sections -fdata-sections -D STM32F103xB -Wl,-Lc:/software/stm32/STM32-base/l
inker,-Tc:/software/stm32/STM32-base/linker/STM32F1xx/STM32F103x8.ld -I./inc -Ic:/software/stm32/STM32-base/startup -mcpu=cortex-m3 -march=armv7-m -mlittle-endian -mthumb -masm-syntax-unified -D CALL_
ARM_SYSTEM_INIT -Ic:/software/stm32/STM32-base-STM32Cube/CMSIS/ARM/inc -Ic:/software/stm32/STM32-base-STM32Cube/CMSIS/STM32F1xx/inc -fno-threadsafe-statics -fno-rtti -fno-exceptions -fno-unwind-tables
 C:/software/stm32/templates/STM32-base-F1-template/src/main.c c:/software/stm32/STM32-base-STM32Cube/CMSIS/STM32F1xx/src/system_stm32f1xx.c C:/software/stm32/templates/STM32-base-F1-template/obj/star
tup_STM32F103xB.o -o C:/software/stm32/templates/STM32-base-F1-template/bin/stm32_executable.elf
C:/software/gcc-arm/gcc-arm-none-eabi-10-2020-q4-major/bin/arm-none-eabi-objcopy -O binary C:/software/stm32/templates/STM32-base-F1-template/bin/stm32_executable.elf C:/software/stm32/templates/STM32
-base-F1-template/bin/stm32_bin_image.bin

C:\software\stm32\templates\STM32-base-F1-template>

Cheers

@ThomasGravekamp
Copy link
Collaborator

Hi there, thanks for your input!

There is already an issue for supporting Windows. See #10.

I have not yet decided how Windows will be supported. I would like to stay away from having to make changes to the make files to keep things simple. Someone mentioned that STM32-base already works with MSYS2 (#10), which would be a neater solution in my opinion.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants