diff options
-rw-r--r-- | src/fsm/.gitignore | 1 | ||||
-rw-r--r-- | src/fsm/Makefile | 126 | ||||
-rw-r--r-- | src/fsm/README.md | 15 | ||||
-rw-r--r-- | src/fsm/bin/.git_keep | 0 | ||||
-rw-r--r-- | src/fsm/hardfault.s | 13 | ||||
-rw-r--r-- | src/glutt-o-logique/FreeRTOSConfig.h (renamed from src/stm32f/src/Core/FreeRTOSConfig.h) | 0 | ||||
-rw-r--r-- | src/glutt-o-logique/Makefile (renamed from src/stm32f/Makefile) | 34 | ||||
-rw-r--r-- | src/glutt-o-logique/audio.c (renamed from src/stm32f/src/Audio/audio.c) | 0 | ||||
-rw-r--r-- | src/glutt-o-logique/common.c (renamed from src/stm32f/src/Core/common.c) | 0 | ||||
-rw-r--r-- | src/glutt-o-logique/cw.c (renamed from src/stm32f/src/Audio/cw.c) | 0 | ||||
-rw-r--r-- | src/glutt-o-logique/debug.c (renamed from src/fsm/debug.c) | 0 | ||||
-rw-r--r-- | src/glutt-o-logique/debug.h (renamed from src/fsm/debug.h) | 0 | ||||
-rw-r--r-- | src/glutt-o-logique/delay.c (renamed from src/stm32f/src/Core/delay.c) | 2 | ||||
-rw-r--r-- | src/glutt-o-logique/ds18b20/README (renamed from src/ds18b20/README) | 0 | ||||
-rw-r--r-- | src/glutt-o-logique/ds18b20/tm_stm32f4_ds18b20.c (renamed from src/ds18b20/tm_stm32f4_ds18b20.c) | 0 | ||||
-rw-r--r-- | src/glutt-o-logique/ds18b20/tm_stm32f4_ds18b20.h (renamed from src/ds18b20/tm_stm32f4_ds18b20.h) | 0 | ||||
-rw-r--r-- | src/glutt-o-logique/ds18b20/tm_stm32f4_onewire.c (renamed from src/ds18b20/tm_stm32f4_onewire.c) | 0 | ||||
-rw-r--r-- | src/glutt-o-logique/ds18b20/tm_stm32f4_onewire.h (renamed from src/ds18b20/tm_stm32f4_onewire.h) | 0 | ||||
-rw-r--r-- | src/glutt-o-logique/fsm.c (renamed from src/stm32f/src/Core/fsm.c) | 0 | ||||
-rw-r--r-- | src/glutt-o-logique/gps.c (renamed from src/stm32f/src/GPS/gps.c) | 0 | ||||
-rw-r--r-- | src/glutt-o-logique/i2c.c (renamed from src/stm32f/src/GPIO/i2c.c) | 0 | ||||
-rw-r--r-- | src/glutt-o-logique/leds.c (renamed from src/stm32f/src/GPIO/leds.c) | 2 | ||||
-rw-r--r-- | src/glutt-o-logique/leds.h (renamed from src/stm32f/includes/GPIO/leds.h) | 0 | ||||
-rw-r--r-- | src/glutt-o-logique/main.c (renamed from src/stm32f/src/Core/main.c) | 2 | ||||
-rw-r--r-- | src/glutt-o-logique/minmea.c (renamed from src/stm32f/src/GPS/minema.c) | 0 | ||||
-rw-r--r-- | src/glutt-o-logique/pio.c (renamed from src/stm32f/src/GPIO/pio.c) | 0 | ||||
-rw-r--r-- | src/glutt-o-logique/temperature.c (renamed from src/stm32f/src/GPIO/temperature.c) | 0 | ||||
-rw-r--r-- | src/glutt-o-logique/usart.c (renamed from src/stm32f/src/GPIO/usart.c) | 0 | ||||
-rw-r--r-- | src/stm32f/.gitignore | 1 | ||||
l--------- | src/stm32f/FreeRTOS | 1 | ||||
-rw-r--r-- | src/stm32f/bin/.gitignore | 2 | ||||
l--------- | src/stm32f/bsp | 1 | ||||
-rw-r--r-- | src/stm32f/obj/.gitignore | 2 | ||||
l--------- | src/stm32f/src/GPIO/tm_stm32f4_ds18b20.c | 1 | ||||
l--------- | src/stm32f/src/GPIO/tm_stm32f4_ds18b20.h | 1 | ||||
l--------- | src/stm32f/src/GPIO/tm_stm32f4_onewire.c | 1 | ||||
l--------- | src/stm32f/src/GPIO/tm_stm32f4_onewire.h | 1 |
37 files changed, 21 insertions, 185 deletions
diff --git a/src/fsm/.gitignore b/src/fsm/.gitignore deleted file mode 100644 index 6533942..0000000 --- a/src/fsm/.gitignore +++ /dev/null @@ -1 +0,0 @@ -vc.h diff --git a/src/fsm/Makefile b/src/fsm/Makefile deleted file mode 100644 index b939934..0000000 --- a/src/fsm/Makefile +++ /dev/null @@ -1,126 +0,0 @@ -### -# GNU ARM Embedded Toolchain -CC=arm-none-eabi-gcc -LD=arm-none-eabi-ld -AR=arm-none-eabi-ar -AS=arm-none-eabi-as -CP=arm-none-eabi-objcopy -OD=arm-none-eabi-objdump -SIZE=arm-none-eabi-size - -### -# Directory Structure -BINDIR=bin -SRCDIR=. - -### -# Find source files -ASOURCES=$(shell find -L $(SRCDIR) -name '*.s') -CSOURCES+=$(shell find -L $(SRCDIR) -name '*.c') -# Find header directories -INC=$(shell find -L . -name '*.h' -exec dirname {} \; | uniq) -INCLUDES=$(INC:%=-I%) -# Create object list -OBJECTS=$(ASOURCES:%.s=%.o) -OBJECTS+=$(CSOURCES:%.c=%.o) -# Define output files ELF & IHEX -BINELF=outp.elf -BINHEX=outp.hex - -### -# MCU FLAGS -MCFLAGS=-mcpu=cortex-m4 -mthumb -mlittle-endian \ --mfpu=fpv4-sp-d16 -mfloat-abi=softfp -mthumb-interwork -# COMPILE FLAGS -DEFS=-DUSE_STDPERIPH_DRIVER -DSTM32F4XX -DARM_MATH_CM4 -D__FPU_PRESENT=1 -CFLAGS =-Wall -ggdb -std=c99 -c $(MCFLAGS) $(DEFS) $(INCLUDES) -# LINKER FLAGS -LDSCRIPT= bsp/stm32_flash.ld -LDFLAGS =-T $(LDSCRIPT) --specs=nosys.specs $(MCFLAGS) -Wl,-Map=$(BINDIR)/outp.map - -### -# Optimizations -OPT?='O2 O3 O6' -# O1 and O4 are irrelevant -# O5 breaks FreeRTOS somehow -# I'm not trusting O7 - -ifneq ($(filter O1,$(OPT)),) -CXXFLAGS+=-fno-exceptions # Uncomment to disable exception handling -DEFS+=-DNO_EXCEPTIONS # The source code has to comply with this rule -endif - -ifneq ($(filter O2,$(OPT)),) -CFLAGS+=-Os # Optimize for size https://gcc.gnu.org/onlinedocs/gcc/Optimize-Options.html -CXXFLAGS+=-Os -LDFLAGS+=-Os # Optimize for size https://gcc.gnu.org/onlinedocs/gcc/Optimize-Options.html -endif - -ifneq ($(filter O3,$(OPT)),) -CFLAGS+=-ffunction-sections -fdata-sections # Place each function or data item into its own section in the output file -CXXFLAGS+=-ffunction-sections -fdata-sections # -||- -LDFLAGS+=-Wl,-gc-sections # Remove isolated unused sections -endif - -ifneq ($(filter O4,$(OPT)),) -CFLAGS+=-fno-builtin # Disable C++ exception handling -CXXFLAGS+=-fno-builtin # Disable C++ exception handling -endif - -ifneq ($(filter O5,$(OPT)),) -CFLAGS+=-flto # Enable link time optimization -CXXFLAGS+=-flto # Enable link time optimization -LDFLAGS+=-flto # Enable link time optimization -endif - -ifneq ($(filter O6,$(OPT)),) -CXXFLAGS+=-fno-rtti # Disable type introspection -endif - -ifneq ($(findstring O7,$(OPT)),) -LDFLAGS+=--specs=nano.specs # Use size optimized newlib -endif - -### -# Build Rules -.PHONY: all release debug clean - -all: release - -release: $(BINDIR)/$(BINHEX) - -debug: CFLAGS+=-g -debug: LDFLAGS+=-g -debug: release - -$(BINDIR)/$(BINHEX): $(BINDIR)/$(BINELF) - $(CP) -O ihex $< $@ - -$(BINDIR)/$(BINELF): $(OBJECTS) vc.h - $(CC) $(LDFLAGS) $(OBJECTS) -o $@ - $(SIZE) $(BINDIR)/$(BINELF) - -%.o: %.c $(INC) - $(CC) $(CFLAGS) $< -o $@ - -%.o: %.s - $(CC) $(CFLAGS) $< -o $@ - -vc.h: ../../.git/logs/HEAD - echo "// This file is generated by Makefile." > vc.h - echo "// Do not edit this file!" >> vc.h - git log -1 --format="format:#define GIT_VERSION \"%h\"" >> vc.h - echo >> vc.h - echo >> vc.h - -clean: - rm -f $(OBJECTS) $(BINDIR)/$(BINELF) $(BINDIR)/$(BINHEX) - -# Connect to openocd's gdb server on port 3333 -deploy: $(BINDIR)/$(BINELF) -ifeq ($(wildcard /opt/openocd/bin/openocd),) - /usr/bin/openocd -f /usr/share/openocd/scripts/board/stm32f4discovery.cfg -c "program bin/"$(BINELF)" verify reset" -c "init" -c "reset" -c "exit" -else - /opt/openocd/bin/openocd -f /opt/openocd/share/openocd/scripts/board/stm32f4discovery.cfg -c "program bin/"$(BINELF)" verify reset" -c "init" -c "reset" -c "exit" -endif - diff --git a/src/fsm/README.md b/src/fsm/README.md deleted file mode 100644 index 69f1f22..0000000 --- a/src/fsm/README.md +++ /dev/null @@ -1,15 +0,0 @@ -An example program that tries to output CW using -the audio codec on the STM32F4DISCOVERY, using the FSM -and switches. - -Connections as follows: - -Blue in QRP_n PC1 -Violet out LED red PC2 -Grey in 1750 PC4 -White out LED yel PC5 -Black - GND GND -Brown in RX_n PC6 -Red in U_n PC8 -Orange out LED grn PC9 -Green in D_n PC11 diff --git a/src/fsm/bin/.git_keep b/src/fsm/bin/.git_keep deleted file mode 100644 index e69de29..0000000 --- a/src/fsm/bin/.git_keep +++ /dev/null diff --git a/src/fsm/hardfault.s b/src/fsm/hardfault.s deleted file mode 100644 index 8570dcc..0000000 --- a/src/fsm/hardfault.s +++ /dev/null @@ -1,13 +0,0 @@ -.syntax unified -.cpu cortex-m3 -.thumb - -.global HardFault_Handler -.extern hard_fault_handler_c - -HardFault_Handler: - tst lr, #4 - ite eq - mrseq r0, msp - mrsne r0, psp - b hard_fault_handler_c diff --git a/src/stm32f/src/Core/FreeRTOSConfig.h b/src/glutt-o-logique/FreeRTOSConfig.h index 8d6f128..8d6f128 100644 --- a/src/stm32f/src/Core/FreeRTOSConfig.h +++ b/src/glutt-o-logique/FreeRTOSConfig.h diff --git a/src/stm32f/Makefile b/src/glutt-o-logique/Makefile index 29bf265..d9ff944 100644 --- a/src/stm32f/Makefile +++ b/src/glutt-o-logique/Makefile @@ -12,18 +12,18 @@ SIZE=arm-none-eabi-size # Directory Structure BINDIR=bin SRCDIR=. -ODIR=obj -### -# Find source files -ASOURCES=$(shell find -L $(SRCDIR) -name '*.s') -CSOURCES+=$(shell find -L $(SRCDIR) -name '*.c') -# Find header directories -INC=$(shell find -L . -name '*.h' -exec dirname {} \; | uniq) -INCLUDES=$(INC:%=-I%) -I ../common/includes/ -I ./includes/ +SOURCES=$(shell find -L $(SRCDIR) -name '*.s') +SOURCES+=$(shell find -L $(SRCDIR) -name '*.c') +HEADERS=$(shell find -L $(SRCDIR) -name '*.h') + +INC=$(shell find -L $(SRCDIR) -name '*.h' -exec dirname {} \; | uniq) +INC+=../common/includes +INCLUDES=$(INC:%=-I%) + # Create object list -OBJECTS=$(ASOURCES:%.s=%.o) -OBJECTS+=$(CSOURCES:%.c=obj/%.o) +OBJECTS=$(SOURCES:%.c=obj/%.o) + # Define output files ELF & IHEX BINELF=outp.elf BINHEX=outp.hex @@ -36,7 +36,7 @@ MCFLAGS=-mcpu=cortex-m4 -mthumb -mlittle-endian \ DEFS=-DUSE_STDPERIPH_DRIVER -DSTM32F4XX -DARM_MATH_CM4 -D__FPU_PRESENT=1 CFLAGS =-Wall -ggdb -std=c99 -c $(MCFLAGS) $(DEFS) $(INCLUDES) # LINKER FLAGS -LDSCRIPT= bsp/stm32_flash.ld +LDSCRIPT= $(SRCDIR)/bsp/stm32_flash.ld LDFLAGS =-T $(LDSCRIPT) --specs=nosys.specs $(MCFLAGS) -Wl,-Map=$(BINDIR)/outp.map ### @@ -97,19 +97,21 @@ debug: release $(BINDIR)/$(BINHEX): $(BINDIR)/$(BINELF) $(CP) -O ihex $< $@ -$(BINDIR)/$(BINELF): $(OBJECTS) vc.h +$(BINDIR)/$(BINELF): vc.h $(OBJECTS) $(CC) $(LDFLAGS) $(OBJECTS) -o $@ $(SIZE) $(BINDIR)/$(BINELF) dir_guard=@mkdir -p $(@D) -obj/%.o: %.c $(INC) +obj/%.o: %.c $(HEADERS) $(dir_guard) - $(CC) $(CFLAGS) $< -o $@ + @echo [CC] $< + @$(CC) $(CFLAGS) $< -o $@ -obj/%.o: %.s +obj/%.o: %.s $(HEADERS) $(dir_guard) - $(CC) $(CFLAGS) $< -o $@ + @echo [AS] $< + @$(CC) $(CFLAGS) $< -o $@ vc.h: ../../.git/logs/HEAD echo "// This file is generated by Makefile." > vc.h diff --git a/src/stm32f/src/Audio/audio.c b/src/glutt-o-logique/audio.c index bdb2961..bdb2961 100644 --- a/src/stm32f/src/Audio/audio.c +++ b/src/glutt-o-logique/audio.c diff --git a/src/stm32f/src/Core/common.c b/src/glutt-o-logique/common.c index a647d26..a647d26 100644 --- a/src/stm32f/src/Core/common.c +++ b/src/glutt-o-logique/common.c diff --git a/src/stm32f/src/Audio/cw.c b/src/glutt-o-logique/cw.c index 028ae82..028ae82 100644 --- a/src/stm32f/src/Audio/cw.c +++ b/src/glutt-o-logique/cw.c diff --git a/src/fsm/debug.c b/src/glutt-o-logique/debug.c index 2e33a32..2e33a32 100644 --- a/src/fsm/debug.c +++ b/src/glutt-o-logique/debug.c diff --git a/src/fsm/debug.h b/src/glutt-o-logique/debug.h index 6215e5f..6215e5f 100644 --- a/src/fsm/debug.h +++ b/src/glutt-o-logique/debug.h diff --git a/src/stm32f/src/Core/delay.c b/src/glutt-o-logique/delay.c index 59030c4..af959f7 100644 --- a/src/stm32f/src/Core/delay.c +++ b/src/glutt-o-logique/delay.c @@ -22,7 +22,7 @@ * SOFTWARE. */ -#include "delay.h" +#include "Core/delay.h" #include "stm32f4xx_conf.h" #include "stm32f4xx.h" diff --git a/src/ds18b20/README b/src/glutt-o-logique/ds18b20/README index 0cd66d5..0cd66d5 100644 --- a/src/ds18b20/README +++ b/src/glutt-o-logique/ds18b20/README diff --git a/src/ds18b20/tm_stm32f4_ds18b20.c b/src/glutt-o-logique/ds18b20/tm_stm32f4_ds18b20.c index d16e48c..d16e48c 100644 --- a/src/ds18b20/tm_stm32f4_ds18b20.c +++ b/src/glutt-o-logique/ds18b20/tm_stm32f4_ds18b20.c diff --git a/src/ds18b20/tm_stm32f4_ds18b20.h b/src/glutt-o-logique/ds18b20/tm_stm32f4_ds18b20.h index 337883e..337883e 100644 --- a/src/ds18b20/tm_stm32f4_ds18b20.h +++ b/src/glutt-o-logique/ds18b20/tm_stm32f4_ds18b20.h diff --git a/src/ds18b20/tm_stm32f4_onewire.c b/src/glutt-o-logique/ds18b20/tm_stm32f4_onewire.c index 44ec8db..44ec8db 100644 --- a/src/ds18b20/tm_stm32f4_onewire.c +++ b/src/glutt-o-logique/ds18b20/tm_stm32f4_onewire.c diff --git a/src/ds18b20/tm_stm32f4_onewire.h b/src/glutt-o-logique/ds18b20/tm_stm32f4_onewire.h index 9b14109..9b14109 100644 --- a/src/ds18b20/tm_stm32f4_onewire.h +++ b/src/glutt-o-logique/ds18b20/tm_stm32f4_onewire.h diff --git a/src/stm32f/src/Core/fsm.c b/src/glutt-o-logique/fsm.c index 99413ba..99413ba 100644 --- a/src/stm32f/src/Core/fsm.c +++ b/src/glutt-o-logique/fsm.c diff --git a/src/stm32f/src/GPS/gps.c b/src/glutt-o-logique/gps.c index 10afe88..10afe88 100644 --- a/src/stm32f/src/GPS/gps.c +++ b/src/glutt-o-logique/gps.c diff --git a/src/stm32f/src/GPIO/i2c.c b/src/glutt-o-logique/i2c.c index 750f5de..750f5de 100644 --- a/src/stm32f/src/GPIO/i2c.c +++ b/src/glutt-o-logique/i2c.c diff --git a/src/stm32f/src/GPIO/leds.c b/src/glutt-o-logique/leds.c index 291b650..88b46bf 100644 --- a/src/stm32f/src/GPIO/leds.c +++ b/src/glutt-o-logique/leds.c @@ -2,7 +2,7 @@ #include "stm32f4xx_conf.h" -#include "../../../stm32f/includes/GPIO/leds.h" +#include "leds.h" void leds_turn_on(int l) { diff --git a/src/stm32f/includes/GPIO/leds.h b/src/glutt-o-logique/leds.h index 869a032..869a032 100644 --- a/src/stm32f/includes/GPIO/leds.h +++ b/src/glutt-o-logique/leds.h diff --git a/src/stm32f/src/Core/main.c b/src/glutt-o-logique/main.c index d63f540..21df1d0 100644 --- a/src/stm32f/src/Core/main.c +++ b/src/glutt-o-logique/main.c @@ -24,7 +24,7 @@ #include "stm32f4xx_conf.h" -#include "../../../stm32f/includes/GPIO/leds.h" +#include "leds.h" #include "../../../common/src/Core/main.c" diff --git a/src/stm32f/src/GPS/minema.c b/src/glutt-o-logique/minmea.c index 10df198..10df198 100644 --- a/src/stm32f/src/GPS/minema.c +++ b/src/glutt-o-logique/minmea.c diff --git a/src/stm32f/src/GPIO/pio.c b/src/glutt-o-logique/pio.c index d8780fe..d8780fe 100644 --- a/src/stm32f/src/GPIO/pio.c +++ b/src/glutt-o-logique/pio.c diff --git a/src/stm32f/src/GPIO/temperature.c b/src/glutt-o-logique/temperature.c index 780a019..780a019 100644 --- a/src/stm32f/src/GPIO/temperature.c +++ b/src/glutt-o-logique/temperature.c diff --git a/src/stm32f/src/GPIO/usart.c b/src/glutt-o-logique/usart.c index d174719..d174719 100644 --- a/src/stm32f/src/GPIO/usart.c +++ b/src/glutt-o-logique/usart.c diff --git a/src/stm32f/.gitignore b/src/stm32f/.gitignore deleted file mode 100644 index 6533942..0000000 --- a/src/stm32f/.gitignore +++ /dev/null @@ -1 +0,0 @@ -vc.h diff --git a/src/stm32f/FreeRTOS b/src/stm32f/FreeRTOS deleted file mode 120000 index 51f4e96..0000000 --- a/src/stm32f/FreeRTOS +++ /dev/null @@ -1 +0,0 @@ -../FreeRTOS
\ No newline at end of file diff --git a/src/stm32f/bin/.gitignore b/src/stm32f/bin/.gitignore deleted file mode 100644 index d6b7ef3..0000000 --- a/src/stm32f/bin/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -* -!.gitignore diff --git a/src/stm32f/bsp b/src/stm32f/bsp deleted file mode 120000 index 5d9120a..0000000 --- a/src/stm32f/bsp +++ /dev/null @@ -1 +0,0 @@ -../bsp
\ No newline at end of file diff --git a/src/stm32f/obj/.gitignore b/src/stm32f/obj/.gitignore deleted file mode 100644 index d6b7ef3..0000000 --- a/src/stm32f/obj/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -* -!.gitignore diff --git a/src/stm32f/src/GPIO/tm_stm32f4_ds18b20.c b/src/stm32f/src/GPIO/tm_stm32f4_ds18b20.c deleted file mode 120000 index ffa5c2a..0000000 --- a/src/stm32f/src/GPIO/tm_stm32f4_ds18b20.c +++ /dev/null @@ -1 +0,0 @@ -../../../ds18b20/tm_stm32f4_ds18b20.c
\ No newline at end of file diff --git a/src/stm32f/src/GPIO/tm_stm32f4_ds18b20.h b/src/stm32f/src/GPIO/tm_stm32f4_ds18b20.h deleted file mode 120000 index 51c9ece..0000000 --- a/src/stm32f/src/GPIO/tm_stm32f4_ds18b20.h +++ /dev/null @@ -1 +0,0 @@ -../../../ds18b20/tm_stm32f4_ds18b20.h
\ No newline at end of file diff --git a/src/stm32f/src/GPIO/tm_stm32f4_onewire.c b/src/stm32f/src/GPIO/tm_stm32f4_onewire.c deleted file mode 120000 index 241eefa..0000000 --- a/src/stm32f/src/GPIO/tm_stm32f4_onewire.c +++ /dev/null @@ -1 +0,0 @@ -../../../ds18b20/tm_stm32f4_onewire.c
\ No newline at end of file diff --git a/src/stm32f/src/GPIO/tm_stm32f4_onewire.h b/src/stm32f/src/GPIO/tm_stm32f4_onewire.h deleted file mode 120000 index 81ebf8e..0000000 --- a/src/stm32f/src/GPIO/tm_stm32f4_onewire.h +++ /dev/null @@ -1 +0,0 @@ -../../../ds18b20/tm_stm32f4_onewire.h
\ No newline at end of file |