Skip to content

Commit

Permalink
Merge pull request #2934 from cesanta/test
Browse files Browse the repository at this point in the history
Add test Makefiles for more IDEs
  • Loading branch information
scaprile authored Oct 8, 2024
2 parents 8a8ff2a + fa24a3e commit 244536e
Show file tree
Hide file tree
Showing 4 changed files with 55 additions and 13 deletions.
12 changes: 12 additions & 0 deletions test/cgt+make/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
ROOT ?= $(realpath $(CURDIR)/../..)
TARGET ?= Debug
DOCKER = docker run --rm -v $(ROOT):$(ROOT) -v $(CURDIR):/root -w $(CURDIR)
IMAGE ?= scaprile/cgt

all: $(PROJECTS)
echo

$(PROJECTS): FORCE
$(DOCKER) $(IMAGE) make -C $@

FORCE:
12 changes: 10 additions & 2 deletions test/cube/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,15 @@ all: $(PROJECTS)

$(PROJECTS): FORCE
(make -C $@ && make -C $@ clean) || ( \
PROJNAME=`xq -r .projectDescription.name $@/.project` && \
$(DOCKER) $(IMAGE) $(PATHTO)headless-build.sh -data workspace -import $@ -cleanBuild $$PROJNAME/$(TARGET) )
COREDIRS=`find $@ -maxdepth 1 -name 'CM*' -print` && ( \
(test "$$COREDIRS" == "" && \
PROJNAME=`xq -r .projectDescription.name $@/.project` && \
$(DOCKER) $(IMAGE) $(PATHTO)headless-build.sh -data workspace -import $@ -cleanBuild $$PROJNAME/$(TARGET) ) || ( \
(test "$$COREDIRS" != "" && \
for core in $$COREDIRS; do \
DIR=`basename $$core` \
PROJNAME=`xq -r .projectDescription.name $@/$$DIR/.project` && \
$(DOCKER) $(IMAGE) $(PATHTO)headless-build.sh -data workspace -import $@/$$DIR -cleanBuild $$PROJNAME/$(TARGET) || exit 1; \
done ))))

FORCE:
13 changes: 8 additions & 5 deletions test/wizard/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,10 @@ ifeq "$(IDE)" "GCC+make"
BUILD = $(MAKE) -f ../gcc+make/Makefile PROJECTS=wizard
endif
ifeq "$(IDE)" "CubeIDE"
BUILD = $(MAKE) -f ../cube/Makefile PROJECTS=wizard
BUILD = $(MAKE) -f ../cube/Makefile PROJECTS=wizard && rm -rf workspace
endif
ifeq "$(IDE)" "MCUXpresso"
BUILD = $(MAKE) -f ../xpresso/Makefile PROJECTS=wizard
endif
ifeq "$(IDE)" "Zephyr"
BUILD = true
BUILD = $(MAKE) -f ../xpresso/Makefile PROJECTS=wizard && rm -rf workspace
endif
ifeq "$(IDE)" "Keil"
BUILD = true
Expand All @@ -26,6 +23,12 @@ endif
ifeq "$(IDE)" "Arduino"
BUILD = true
endif
ifeq "$(IDE)" "CGT+make"
BUILD = $(MAKE) -f ../cgt+make/Makefile PROJECTS=wizard
endif
ifeq "$(IDE)" "Zephyr"
BUILD = $(MAKE) -f ../zephyr/Makefile PROJECTS=wizard BOARD=$(BOARD)
endif


firmware.bin: wizard
Expand Down
31 changes: 25 additions & 6 deletions test/wizard/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ rm test.log

STM32="f207 f429 f439 f746 f756 f767 h563 h573 h723 h735 h743 h745 h747 h753 h755"
STIDES="GCC+make CubeIDE"
# Zephyr: !f439
# Keil: f756
for board in $STM32; do
for ide in $STIDES; do
Expand All @@ -28,16 +27,19 @@ for board in $STM32; do
done


NXP="rt1020 rt1024 rt1040 rt1060 rt1064 rt1170 mcxn947"
NXPIDES="GCC+make"
#MCUXpresso: mcxn947
NXP="mcxn947"
NXPIDES="GCC+make MCUXpresso"
for board in $NXP; do
for ide in $NXPIDES; do
for rtos in "baremetal"; do
for rtos in $RTOSES; do
dotest $board $ide $rtos
done
done
done
NXP="rt1020 rt1024 rt1040 rt1060 rt1064 rt1170"
for board in $NXP; do
dotest $board "GCC+make" "baremetal"
done


INFINEON="xmc4400 xmc4700 xmc7200"
Expand All @@ -51,8 +53,19 @@ for board in $INFINEON; do
done


TI="tm4c129"
TIIDES="GCC+make"
for board in $TI; do
for ide in $TIIDES; do
for rtos in $RTOSES; do
dotest $board $ide $rtos
done
done
done
dotest "tms570" "CGT+make" "baremetal"


PICO="evb-pico"
#Zephyr
for board in $PICO; do
for rtos in "baremetal"; do
dotest $board "Pico-SDK" $rtos
Expand All @@ -66,6 +79,12 @@ for board in $ESP; do
done


ZEPHYR="f207 f429 f746 f756 f767 h563 h573 h723 h735 h743 h745 h747 h753 h755 mcxn947 rt1060 rt1064 evb-pico"
for board in $ZEPHYR; do
echo dotest $board "Zephyr" "baremetal"
done


ARDUINO="teensy41"

rm -rf workspace pico-sdk
Expand Down

0 comments on commit 244536e

Please sign in to comment.