36 lines
565 B
Bash
Executable File
36 lines
565 B
Bash
Executable File
|
|
case $1 in
|
|
"rx")
|
|
IC="esp32c3"
|
|
opts="-D IC=$IC -D target=rx"
|
|
;;
|
|
"tx")
|
|
IC="esp32c6"
|
|
opts="-D IC=$IC -D target=tx"
|
|
;;
|
|
*)
|
|
echo "Use 'rx' or 'tx'."
|
|
return
|
|
;;
|
|
esac
|
|
|
|
if [ -f sdkconfig.$IC ]
|
|
then
|
|
rm sdkconfig dependencies.lock
|
|
|
|
idf.py fullclean
|
|
|
|
cp sdkconfig.$IC sdkconfig
|
|
jinja2 $opts dependencies.lock.j2 >dependencies.lock
|
|
jinja2 $opts src/config.h.j2 >src/config.h
|
|
|
|
idf.py --version &>/dev/null || {
|
|
. $IDF_TOOLS_PATH/esp-idf/export.sh
|
|
}
|
|
|
|
idf.py set-target $IC
|
|
# idf.py build $2
|
|
else
|
|
echo "SDK config file for $IC not found."
|
|
fi
|