diff options
author | xengineering <me@xengineering.eu> | 2022-01-23 12:13:24 +0100 |
---|---|---|
committer | xengineering <me@xengineering.eu> | 2022-01-23 12:17:33 +0100 |
commit | 5cc962d5fd6ab6b5d4f080a8afe920befe0a44c8 (patch) | |
tree | 64e13cde9a65127314c2e815600b507d191517e1 | |
parent | 5bdae1ce519bc67ab094c10da7bedbbf5b8a535a (diff) | |
download | ledcontrol-5cc962d5fd6ab6b5d4f080a8afe920befe0a44c8.tar ledcontrol-5cc962d5fd6ab6b5d4f080a8afe920befe0a44c8.tar.zst ledcontrol-5cc962d5fd6ab6b5d4f080a8afe920befe0a44c8.zip |
Introduce firmware directory
-rw-r--r-- | .gitignore | 3 | ||||
-rw-r--r-- | .gitmodules | 4 | ||||
-rw-r--r-- | Makefile | 20 | ||||
-rw-r--r-- | firmware/.gitignore | 1 | ||||
-rw-r--r-- | firmware/LICENSE (renamed from LICENSE) | 0 | ||||
-rw-r--r-- | firmware/Makefile | 20 | ||||
-rw-r--r-- | firmware/README.md (renamed from README.md) | 0 | ||||
-rwxr-xr-x | firmware/gdb.sh (renamed from gdb.sh) | 0 | ||||
-rw-r--r-- | firmware/ld/stm32f103c8t6.ld (renamed from ld/stm32f103c8t6.ld) | 0 | ||||
m--------- | firmware/libopencm3 (renamed from deps/libopencm3) | 0 | ||||
-rwxr-xr-x | firmware/ocd.sh (renamed from ocd.sh) | 0 | ||||
-rw-r--r-- | firmware/src/main.c (renamed from src/main.c) | 0 |
12 files changed, 23 insertions, 25 deletions
diff --git a/.gitignore b/.gitignore deleted file mode 100644 index 41b083e..0000000 --- a/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -docs -build -libopencm3-examples diff --git a/.gitmodules b/.gitmodules index 7ee543a..f52533d 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,3 +1,3 @@ -[submodule "deps/libopencm3"] - path = deps/libopencm3 +[submodule "firmware/libopencm3"] + path = firmware/libopencm3 url = https://github.com/libopencm3/libopencm3.git diff --git a/Makefile b/Makefile deleted file mode 100644 index a37a60f..0000000 --- a/Makefile +++ /dev/null @@ -1,20 +0,0 @@ - -# tools -PREFIX ?= arm-none-eabi -CC = $(PREFIX)-gcc -LD = $(PREFIX)-gcc -OBJCOPY = $(PREFIX)-objcopy - -all: deps/libopencm3/lib/libopencm3_stm32f1.a - mkdir -p build - $(CC) -O0 -c -g -DSTM32F1 -Ideps/libopencm3/include -mcpu=cortex-m3 -mthumb -o build/main.o src/main.c - $(LD) --static -nostartfiles -mcpu=cortex-m3 -mthumb -msoft-float -Tld/stm32f103c8t6.ld -Ldeps/libopencm3/lib build/main.o -lopencm3_stm32f1 -o build/ledcontrol.elf - $(OBJCOPY) -O binary build/ledcontrol.elf build/ledcontrol.bin - -deps/libopencm3/lib/libopencm3_stm32f1.a: - make -C deps/libopencm3 - -clean: - rm -rf build - -.PHONY: all clean diff --git a/firmware/.gitignore b/firmware/.gitignore new file mode 100644 index 0000000..378eac2 --- /dev/null +++ b/firmware/.gitignore @@ -0,0 +1 @@ +build diff --git a/LICENSE b/firmware/LICENSE index 53d1f3d..53d1f3d 100644 --- a/LICENSE +++ b/firmware/LICENSE diff --git a/firmware/Makefile b/firmware/Makefile new file mode 100644 index 0000000..4698df5 --- /dev/null +++ b/firmware/Makefile @@ -0,0 +1,20 @@ + +# tools +PREFIX ?= arm-none-eabi +CC = $(PREFIX)-gcc +LD = $(PREFIX)-gcc +OBJCOPY = $(PREFIX)-objcopy + +all: libopencm3/lib/libopencm3_stm32f1.a + mkdir -p build + $(CC) -O0 -c -g -DSTM32F1 -Ilibopencm3/include -mcpu=cortex-m3 -mthumb -o build/main.o src/main.c + $(LD) --static -nostartfiles -mcpu=cortex-m3 -mthumb -msoft-float -Tld/stm32f103c8t6.ld -Llibopencm3/lib build/main.o -lopencm3_stm32f1 -o build/ledcontrol.elf + $(OBJCOPY) -O binary build/ledcontrol.elf build/ledcontrol.bin + +libopencm3/lib/libopencm3_stm32f1.a: + make -C libopencm3 + +clean: + rm -rf build + +.PHONY: all clean diff --git a/README.md b/firmware/README.md index 1fee659..1fee659 100644 --- a/README.md +++ b/firmware/README.md diff --git a/ld/stm32f103c8t6.ld b/firmware/ld/stm32f103c8t6.ld index db01550..db01550 100644 --- a/ld/stm32f103c8t6.ld +++ b/firmware/ld/stm32f103c8t6.ld diff --git a/deps/libopencm3 b/firmware/libopencm3 -Subproject 6763681c260cf280487d70ca0d1996a8b79fff3 +Subproject 6763681c260cf280487d70ca0d1996a8b79fff3 diff --git a/src/main.c b/firmware/src/main.c index 8e39278..8e39278 100644 --- a/src/main.c +++ b/firmware/src/main.c |