add stm32l432 build test

This commit is contained in:
yparitcher 2019-01-06 14:48:18 -05:00
parent 1dd835d698
commit 5afdef463e
No known key found for this signature in database
GPG Key ID: FC78BE8055D48472
3 changed files with 27 additions and 6 deletions

View File

@ -5,9 +5,11 @@ addons:
apt: apt:
sources: sources:
- ubuntu-toolchain-r-test - ubuntu-toolchain-r-test
- team-gcc-arm-embedded/ppa
packages: packages:
- gcc-7 - gcc-7
- cppcheck - cppcheck
- gcc-arm-embedded
script: script:
- export CC=gcc-7 - export CC=gcc-7
- make test - make test

View File

@ -33,7 +33,7 @@ CFLAGS += -DAES256=1 -DAPP_CONFIG=\"app.h\"
name = main name = main
.PHONY: all .PHONY: all $(LIBCBOR)
all: main all: main
tinycbor/Makefile crypto/tiny-AES-c/aes.c: tinycbor/Makefile crypto/tiny-AES-c/aes.c:
@ -42,9 +42,17 @@ tinycbor/Makefile crypto/tiny-AES-c/aes.c:
.PHONY: cbor .PHONY: cbor
cbor: $(LIBCBOR) cbor: $(LIBCBOR)
$(LIBCBOR): tinycbor/Makefile $(LIBCBOR):
cd tinycbor/ && $(MAKE) clean && $(MAKE) -j8 cd tinycbor/ && $(MAKE) clean && $(MAKE) -j8
test: env3
$(MAKE) clean
$(MAKE) -C . main
$(MAKE) clean
cd ./targets/stm32l432; $(MAKE) test PREFIX=$(PREFIX) VENV=". ../../env3/bin/activate;"
$(MAKE) clean
$(MAKE) cppcheck
.PHONY: efm8prog .PHONY: efm8prog
efm8prog: efm8prog:
cd './targets/efm8\Keil 8051 v9.53 - Debug' && $(MAKE) all cd './targets/efm8\Keil 8051 v9.53 - Debug' && $(MAKE) all
@ -97,13 +105,13 @@ cppcheck:
cppcheck $(CPPCHECK_FLAGS) fido2 cppcheck $(CPPCHECK_FLAGS) fido2
cppcheck $(CPPCHECK_FLAGS) pc cppcheck $(CPPCHECK_FLAGS) pc
test: main cppcheck
clean: clean:
rm -f *.o main.exe main $(obj) rm -f *.o main.exe main $(obj)
rm -rf env2 env3
for f in crypto/tiny-AES-c/Makefile tinycbor/Makefile ; do \ for f in crypto/tiny-AES-c/Makefile tinycbor/Makefile ; do \
if [ -f "$$f" ]; then \ if [ -f "$$f" ]; then \
(cd `dirname $$f` ; git checkout -- .) ;\ (cd `dirname $$f` ; git checkout -- .) ;\
fi ;\ fi ;\
done done
full-clean: clean
rm -rf env2 env3

View File

@ -5,7 +5,7 @@ endif
APPMAKE=build/application.mk APPMAKE=build/application.mk
BOOTMAKE=build/application.mk BOOTMAKE=build/application.mk
merge_hex=python ../../tools/solotool.py mergehex merge_hex=../../tools/solotool.py mergehex
all: all:
$(MAKE) -f $(APPMAKE) -j8 solo.hex PREFIX=$(PREFIX) DEBUG=$(DEBUG) EXTRA_DEFINES='-DFLASH_ROP=1' $(MAKE) -f $(APPMAKE) -j8 solo.hex PREFIX=$(PREFIX) DEBUG=$(DEBUG) EXTRA_DEFINES='-DFLASH_ROP=1'
@ -40,6 +40,9 @@ build-release: clean2 boot-sig-checking clean all
build-hacker: clean2 boot-no-sig clean all-hacker build-hacker: clean2 boot-no-sig clean all-hacker
$(merge_hex) solo.hex bootloader.hex all.hex $(merge_hex) solo.hex bootloader.hex all.hex
build-debugboot: clean2 debugboot-boot clean debugboot-app
$(merge_hex) solo.hex bootloader.hex all.hex
clean: clean:
$(MAKE) -f $(APPMAKE) clean $(MAKE) -f $(APPMAKE) clean
$(MAKE) -f $(BOOTMAKE) clean $(MAKE) -f $(BOOTMAKE) clean
@ -76,3 +79,11 @@ solo.hex:
cbor: cbor:
$(MAKE) -f application.mk -j8 cbor $(MAKE) -f application.mk -j8 cbor
test:
$(MAKE) cbor
$(VENV) $(MAKE) build-release-locked
$(VENV) $(MAKE) build-release
$(VENV) $(MAKE) build-hacker
$(VENV) $(MAKE) build-debugboot
$(MAKE) clean2