From 1e35af770f8da34f1ccfcd991fabede5f832be38 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mario=20H=C3=BCttel?= Date: Fri, 17 Apr 2020 23:22:00 +0200 Subject: [PATCH 1/3] Add c style checker --- .gitmodules | 4 ++++ c-style-checker | 1 + 2 files changed, 5 insertions(+) create mode 160000 c-style-checker diff --git a/.gitmodules b/.gitmodules index 5635b65..00cf1d5 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,3 +1,7 @@ [submodule "stm-firmware/shellmatta"] path = stm-firmware/shellmatta url = https://git.shimatta.de/mhu/shellmatta +[submodule "c-style-checker"] + path = c-style-checker + url = https://git.shimatta.de/mhu/c-style-checker.git + branch = master diff --git a/c-style-checker b/c-style-checker new file mode 160000 index 0000000..3a58e3d --- /dev/null +++ b/c-style-checker @@ -0,0 +1 @@ +Subproject commit 3a58e3dd1c2ef6de78df89c8fdc7ba96b51cd4e0 From cbd3e56503fe55dcef66f3f96db7f5773ca58f20 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mario=20H=C3=BCttel?= Date: Sat, 18 Apr 2020 01:37:50 +0200 Subject: [PATCH 2/3] Make programming script take the elf file as an argument --- stm-firmware/program-device.sh | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/stm-firmware/program-device.sh b/stm-firmware/program-device.sh index bcb13b7..780d4db 100755 --- a/stm-firmware/program-device.sh +++ b/stm-firmware/program-device.sh @@ -1,5 +1,10 @@ #!/bin/bash +if [[ -z $1 ]]; then + echo "Usage: $0 " + exit -1 +fi + JLinkGDBServer -if SWD -device STM32F407VE & sleep 2 @@ -12,7 +17,7 @@ if [[ $gdbpid == "" ]]; then exit fi -arm-none-eabi-gdb -x program-device.gdb reflow-controller.elf +arm-none-eabi-gdb -x program-device.gdb $1 sleep 2 kill $gdbpid From c745f865bd8c787ddc4dd5c52f2774234e0f7ff0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mario=20H=C3=BCttel?= Date: Sat, 18 Apr 2020 01:39:50 +0200 Subject: [PATCH 3/3] Add device programming to target in Makefile --- stm-firmware/Makefile | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/stm-firmware/Makefile b/stm-firmware/Makefile index 899e8ba..cfbb2c2 100644 --- a/stm-firmware/Makefile +++ b/stm-firmware/Makefile @@ -80,7 +80,6 @@ default: $(target).elf %.hex: %.elf $(QUIET)$(OBJCOPY) -O ihex $^ $@ - #Linking $(target).elf: $(OBJ) $(ASOBJ) @echo [LD] $@ @@ -101,7 +100,10 @@ $(ASOBJ): $(QUIET)$(CC) $(CFLAGS) -MMD -MT $@ $(INCLUDEPATH) $(DEFINES) -o $@ $(@:$(OBJDIR)/%.S.o=%.S) -.PHONY: qtproject clean mrproper objcopy disassemble +.PHONY: qtproject clean mrproper objcopy disassemble program + +program: $(target).elf + ./program-device.sh $< disassemble: $(target).elf $(QUIET)$(OBJDUMP) -D -s $< > $(target).lss