Skip to content

Commit 244536e

Browse files
authored
Merge pull request #2934 from cesanta/test
Add test Makefiles for more IDEs
2 parents 8a8ff2a + fa24a3e commit 244536e

File tree

4 files changed

+55
-13
lines changed

4 files changed

+55
-13
lines changed

test/cgt+make/Makefile

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
ROOT ?= $(realpath $(CURDIR)/../..)
2+
TARGET ?= Debug
3+
DOCKER = docker run --rm -v $(ROOT):$(ROOT) -v $(CURDIR):/root -w $(CURDIR)
4+
IMAGE ?= scaprile/cgt
5+
6+
all: $(PROJECTS)
7+
echo
8+
9+
$(PROJECTS): FORCE
10+
$(DOCKER) $(IMAGE) make -C $@
11+
12+
FORCE:

test/cube/Makefile

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,15 @@ all: $(PROJECTS)
1010

1111
$(PROJECTS): FORCE
1212
(make -C $@ && make -C $@ clean) || ( \
13-
PROJNAME=`xq -r .projectDescription.name $@/.project` && \
14-
$(DOCKER) $(IMAGE) $(PATHTO)headless-build.sh -data workspace -import $@ -cleanBuild $$PROJNAME/$(TARGET) )
13+
COREDIRS=`find $@ -maxdepth 1 -name 'CM*' -print` && ( \
14+
(test "$$COREDIRS" == "" && \
15+
PROJNAME=`xq -r .projectDescription.name $@/.project` && \
16+
$(DOCKER) $(IMAGE) $(PATHTO)headless-build.sh -data workspace -import $@ -cleanBuild $$PROJNAME/$(TARGET) ) || ( \
17+
(test "$$COREDIRS" != "" && \
18+
for core in $$COREDIRS; do \
19+
DIR=`basename $$core` \
20+
PROJNAME=`xq -r .projectDescription.name $@/$$DIR/.project` && \
21+
$(DOCKER) $(IMAGE) $(PATHTO)headless-build.sh -data workspace -import $@/$$DIR -cleanBuild $$PROJNAME/$(TARGET) || exit 1; \
22+
done ))))
1523

1624
FORCE:

test/wizard/Makefile

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,10 @@ ifeq "$(IDE)" "GCC+make"
66
BUILD = $(MAKE) -f ../gcc+make/Makefile PROJECTS=wizard
77
endif
88
ifeq "$(IDE)" "CubeIDE"
9-
BUILD = $(MAKE) -f ../cube/Makefile PROJECTS=wizard
9+
BUILD = $(MAKE) -f ../cube/Makefile PROJECTS=wizard && rm -rf workspace
1010
endif
1111
ifeq "$(IDE)" "MCUXpresso"
12-
BUILD = $(MAKE) -f ../xpresso/Makefile PROJECTS=wizard
13-
endif
14-
ifeq "$(IDE)" "Zephyr"
15-
BUILD = true
12+
BUILD = $(MAKE) -f ../xpresso/Makefile PROJECTS=wizard && rm -rf workspace
1613
endif
1714
ifeq "$(IDE)" "Keil"
1815
BUILD = true
@@ -26,6 +23,12 @@ endif
2623
ifeq "$(IDE)" "Arduino"
2724
BUILD = true
2825
endif
26+
ifeq "$(IDE)" "CGT+make"
27+
BUILD = $(MAKE) -f ../cgt+make/Makefile PROJECTS=wizard
28+
endif
29+
ifeq "$(IDE)" "Zephyr"
30+
BUILD = $(MAKE) -f ../zephyr/Makefile PROJECTS=wizard BOARD=$(BOARD)
31+
endif
2932

3033

3134
firmware.bin: wizard

test/wizard/test.sh

Lines changed: 25 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ rm test.log
1717

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

3029

31-
NXP="rt1020 rt1024 rt1040 rt1060 rt1064 rt1170 mcxn947"
32-
NXPIDES="GCC+make"
33-
#MCUXpresso: mcxn947
30+
NXP="mcxn947"
31+
NXPIDES="GCC+make MCUXpresso"
3432
for board in $NXP; do
3533
for ide in $NXPIDES; do
36-
for rtos in "baremetal"; do
34+
for rtos in $RTOSES; do
3735
dotest $board $ide $rtos
3836
done
3937
done
4038
done
39+
NXP="rt1020 rt1024 rt1040 rt1060 rt1064 rt1170"
40+
for board in $NXP; do
41+
dotest $board "GCC+make" "baremetal"
42+
done
4143

4244

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

5355

56+
TI="tm4c129"
57+
TIIDES="GCC+make"
58+
for board in $TI; do
59+
for ide in $TIIDES; do
60+
for rtos in $RTOSES; do
61+
dotest $board $ide $rtos
62+
done
63+
done
64+
done
65+
dotest "tms570" "CGT+make" "baremetal"
66+
67+
5468
PICO="evb-pico"
55-
#Zephyr
5669
for board in $PICO; do
5770
for rtos in "baremetal"; do
5871
dotest $board "Pico-SDK" $rtos
@@ -66,6 +79,12 @@ for board in $ESP; do
6679
done
6780

6881

82+
ZEPHYR="f207 f429 f746 f756 f767 h563 h573 h723 h735 h743 h745 h747 h753 h755 mcxn947 rt1060 rt1064 evb-pico"
83+
for board in $ZEPHYR; do
84+
echo dotest $board "Zephyr" "baremetal"
85+
done
86+
87+
6988
ARDUINO="teensy41"
7089

7190
rm -rf workspace pico-sdk

0 commit comments

Comments
 (0)