Pico-SDK support fixes and cleanups

This commit is contained in:
Sergio R. Caprile committed 2024-11-11 14:52:28 -03:00
1 parent 0aa61ce58f
commit 2b8b0ebe95
27 files changed
+270 -104

No files matched your search

+18 -9
View File
@@ -1,18 +1,27 @@
PROJECTS ?= $(wildcard ../../examples/rp2040/*-sdk-*)
PROJECTS ?= $(wildcard ../../examples/pico-sdk/*-picosdk-*)
SDK_PATH ?= $(realpath $(PWD))/pico-sdk
SDK_VERSION ?= 2.0.0
all: $(PROJECTS)
echo
$(PROJECTS): pico-sdk
(make -C $@ build && make -C $@ clean) || ( \
ln -s $(PWD)/pico-sdk $@/pico-sdk && \
$(PROJECTS): pico-sdk FORCE
(make -C $@ build SDK_PATH=$(SDK_PATH) && make -C $@ clean) || ( \
ln -s $(SDK_PATH) $@/pico-sdk && \
cd $@ && rm -rf build && mkdir -p build && \
cd build && cmake -G "Unix Makefiles" .. && make && \
rm -rf build pico-sdk )
cd build && cmake -DPICO_BOARD=$(SDKBNAME) -G "Unix Makefiles" .. && make && \
cd .. && rm -rf build pico-sdk )
FORCE:
pico-sdk:
git clone --depth 1 -b 1.5.1 https://github.com/raspberrypi/pico-sdk $@
cd $@ && git submodule update --init
test -d $(SDK_PATH) || ( git clone --depth 1 -b $(SDK_VERSION) https://github.com/raspberrypi/pico-sdk $@ && \
cd $@ && git submodule update --init )
clean:
rm -rf pico-sdk
rm -rf $(SDK_PATH)
# Wizard-style board name --> Pico-SDK board name; SDKBNAME = table[BOARD]
SDK_evb-pico := pico
SDK_evb-pico2 := pico2
SDKBNAME = $(SDK_$(BOARD))
+1 -1
View File
@@ -15,7 +15,7 @@ ifeq "$(IDE)" "Keil"
BUILD = true
endif
ifeq "$(IDE)" "Pico-SDK"
BUILD = $(MAKE) -f ../pico-sdk/Makefile PROJECTS=wizard
BUILD = $(MAKE) -f ../pico-sdk/Makefile PROJECTS=wizard BOARD=$(BOARD)
endif
ifeq "$(IDE)" "ESP-IDF"
BUILD = $(MAKE) -f ../esp-idf/Makefile PROJECTS=wizard
+67 -66
View File
@@ -1,12 +1,13 @@
#!/bin/bash
RTOSES="baremetal FreeRTOS"
WIZARD_URL=""
test "$1" != "" && WIZARD_URL="WIZARD_URL=$1"
dotest ()
{
echo "BOARD=$1 IDE=$2 RTOS=$3" >> test.log
make BOARD=$1 IDE=$2 RTOS=$3 || ( \
make BOARD=$1 IDE=$2 RTOS=$3 $4 $WIZARD_URL || ( \
echo "^^^ FAILED ^^^" >> test.log && rm -rf wizard* workspace )
}
@@ -15,57 +16,57 @@ cd `dirname "$0"`
rm test.log
STM32="f207 f429 f439 f746 f756 f767 h563 h573 h723 h735 h743 h745 h747 h753 h755"
STIDES="GCC+make CubeIDE"
# Keil: f756
for board in $STM32; do
for ide in $STIDES; do
for rtos in $RTOSES; do
dotest $board $ide $rtos
done
done
done
#STM32="f207 f429 f439 f746 f756 f767 h563 h573 h723 h735 h743 h745 h747 h753 h755"
#STIDES="GCC+make CubeIDE"
## Keil: f756
#for board in $STM32; do
# for ide in $STIDES; do
# for rtos in $RTOSES; do
# dotest $board $ide $rtos
# done
# done
#done
#
#
#NXP="mcxn947"
#NXPIDES="GCC+make MCUXpresso"
#for board in $NXP; do
# for ide in $NXPIDES; 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"
#INFINEONIDES="GCC+make"
#for board in $INFINEON; do
# for ide in $INFINEONIDES; do
# for rtos in "baremetal"; do
# dotest $board $ide $rtos
# done
# done
#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"
NXP="mcxn947"
NXPIDES="GCC+make MCUXpresso"
for board in $NXP; do
for ide in $NXPIDES; 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"
INFINEONIDES="GCC+make"
for board in $INFINEON; do
for ide in $INFINEONIDES; do
for rtos in "baremetal"; do
dotest $board $ide $rtos
done
done
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"
PICO="evb-pico evb-pico2"
for board in $PICO; do
for rtos in "baremetal"; do
dotest $board "Pico-SDK" $rtos
@@ -73,20 +74,20 @@ for board in $PICO; do
done
ESP="esp32"
for board in $ESP; do
dotest $board "ESP-IDF" "baremetal"
done
# h755 not supported in 3.7.0 branch; master branch currently not building
# other ST boards (PHY address != 0) might build and not work
ZEPHYR="f207 f429 f746 f756 f767 h563 h573 h723 h735 h743 h745 h747 h753 mcxn947 rt1060 rt1064 evb-pico"
for board in $ZEPHYR; do
dotest $board "Zephyr" "baremetal"
done
ARDUINO="teensy41"
#ESP="esp32"
#for board in $ESP; do
# dotest $board "ESP-IDF" "baremetal"
#done
#
## h755 not supported in 3.7.0 branch; master branch currently not building
## other ST boards (PHY address != 0) might build and not work
#ZEPHYR="f207 f429 f746 f756 f767 h563 h573 h723 h735 h743 h745 h747 h753 mcxn947 rt1060 rt1064 evb-pico"
#for board in $ZEPHYR; do
# dotest $board "Zephyr" "baremetal"
#done
#
#
#ARDUINO="teensy41"
#
rm -rf workspace pico-sdk mcuxpresso .cache .eclipse .p2 build
cd -
+1
View File
@@ -13,4 +13,5 @@ $(PROJECTS): FORCE
PROJNAME=`xq -r .projectDescription.name $@/.project` && \
($(DOCKER) $(IMAGE) $(HEADLESS_BUILD) -data workspace -import wizard -cleanBuild $$PROJNAME/$(TARGET) || true) && \
test -f $(@F)/$(TARGET)/$$PROJNAME.axf )
FORCE: