Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Removes PIO in IDF 5.3 - Arduino Core 3.1.x #252

Closed
wants to merge 4 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 0 additions & 11 deletions build.sh
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Rename every appearance of Platformio to pioarduino
PIO is no trademark and can never be one since it is a usual term for Parallel Input Output
Both files are mandantory and needed to build support for pioarduinoand only should be renamed

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

since it is a usual term for Parallel Input Output

... or Programmable Input/Output.
Which only makes your point even stronger. :)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well remembers me of my beginning with computers the first PIO i used was from Zilog for the Z80 https://www.zilog.com/docs/z80/ps0180.pdf

Original file line number Diff line number Diff line change
Expand Up @@ -305,17 +305,6 @@ if [ "$BUILD_TYPE" = "all" ]; then
if [ $? -ne 0 ]; then exit 1; fi
fi

# Generate PlatformIO manifest file
if [ "$BUILD_TYPE" = "all" ]; then
echo "* Generating PlatformIO manifest file..."
pushd $IDF_PATH
ibr=$(git describe --all 2>/dev/null)
ic=$(git -C "$IDF_PATH" rev-parse --short HEAD)
popd
python3 ./tools/gen_platformio_manifest.py -o "$TOOLS_JSON_OUT/" -s "$ibr" -c "$ic"
if [ $? -ne 0 ]; then exit 1; fi
fi

# copy everything to arduino-esp32 installation
if [ $COPY_OUT -eq 1 ] && [ -d "$ESP32_ARDUINO" ]; then
echo "* Copying to Arduino..."
Expand Down
144 changes: 0 additions & 144 deletions tools/copy-libs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -67,14 +67,6 @@ LD_LIBS_SEARCH=""
LD_SCRIPTS=""
LD_SCRIPT_DIRS=""

PIO_CC_FLAGS=""
PIO_C_FLAGS=""
PIO_CXX_FLAGS=""
PIO_AS_FLAGS=""
PIO_LD_FLAGS=""
PIO_LD_FUNCS=""
PIO_LD_SCRIPTS=""

TOOLCHAIN_PREFIX=""
if [ "$IS_XTENSA" = "y" ]; then
TOOLCHAIN="xtensa-$IDF_TARGET-elf"
Expand Down Expand Up @@ -120,8 +112,6 @@ for item in "${@:2:${#@}-5}"; do
if [[ "${item:2:7}" != "ARDUINO" ]] && [[ "$item" != "-DESP32=ESP32" ]]; then #skip ARDUINO defines
DEFINES+="$item "
fi
elif [ "$prefix" = "-O" ]; then
PIO_CC_FLAGS+="$item "
elif [[ "$item" != "-Wall" && "$item" != "-Werror=all" && "$item" != "-Wextra" ]]; then
if [[ "${item:0:23}" != "-mfix-esp32-psram-cache" && "${item:0:18}" != "-fmacro-prefix-map" && "${item:0:20}" != "-fdiagnostics-color=" && "${item:0:19}" != "-fdebug-prefix-map=" ]]; then
C_FLAGS+="$item "
Expand All @@ -139,11 +129,6 @@ for item in "${@:2:${#@}-5}"; do
if [[ "$prefix" != "-I" && "$prefix" != "-D" && "$item" != "-Wall" && "$item" != "-Werror=all" && "$item" != "-Wextra" && "$prefix" != "-O" ]]; then
if [[ "${item:0:23}" != "-mfix-esp32-psram-cache" && "${item:0:18}" != "-fmacro-prefix-map" && "${item:0:20}" != "-fdiagnostics-color=" && "${item:0:19}" != "-fdebug-prefix-map=" ]]; then
AS_FLAGS+="$item "
if [[ $C_FLAGS == *"$item"* ]]; then
PIO_CC_FLAGS+="$item "
else
PIO_AS_FLAGS+="$item "
fi
fi
fi
done
Expand All @@ -158,19 +143,11 @@ for item in "${@:2:${#@}-5}"; do
if [[ "$prefix" != "-I" && "$prefix" != "-D" && "$item" != "-Wall" && "$item" != "-Werror=all" && "$item" != "-Wextra" && "$prefix" != "-O" ]]; then
if [[ "${item:0:23}" != "-mfix-esp32-psram-cache" && "${item:0:18}" != "-fmacro-prefix-map" && "${item:0:20}" != "-fdiagnostics-color=" && "${item:0:19}" != "-fdebug-prefix-map=" ]]; then
CPP_FLAGS+="$item "
if [[ $PIO_CC_FLAGS != *"$item"* ]]; then
PIO_CXX_FLAGS+="$item "
fi
fi
fi
done

set -- $C_FLAGS
for item; do
if [[ $PIO_CC_FLAGS != *"$item"* ]]; then
PIO_C_FLAGS+="$item "
fi
done

#parse link command to extract libs and flags
add_next=0
Expand All @@ -195,7 +172,6 @@ else
fi
if [ "$IDF_TARGET" = "esp32" ]; then
LD_SCRIPTS+="-T esp32.rom.redefined.ld "
PIO_LD_SCRIPTS+="esp32.rom.redefined.ld "
fi
set -- $str
for item; do
Expand Down Expand Up @@ -230,7 +206,6 @@ for item; do
is_dir=0
elif [[ "${item:0:23}" != "-mfix-esp32-psram-cache" && "${item:0:18}" != "-fmacro-prefix-map" && "${item:0:19}" != "-fdebug-prefix-map=" && "${item:0:17}" != "-Wl,--start-group" && "${item:0:15}" != "-Wl,--end-group" ]]; then
LD_FLAGS+="$item "
PIO_LD_FLAGS+="$item "
fi
fi
else
Expand All @@ -242,10 +217,8 @@ for item; do
elif [ "$is_script" = "1" ]; then
is_script=0
LD_SCRIPTS+="$item "
PIO_LD_SCRIPTS+="$item "
else
LD_FLAGS+="$item "
PIO_LD_FUNCS+="$item "
fi
else
if [ "${item:${#item}-2:2}" = ".a" ]; then
Expand Down Expand Up @@ -313,82 +286,8 @@ done

mkdir -p "$AR_SDK"

# start generation of platformio-build.py
AR_PLATFORMIO_PY="$AR_SDK/platformio-build.py"
cat configs/pio_start.txt > "$AR_PLATFORMIO_PY"

echo " ASFLAGS=[" >> "$AR_PLATFORMIO_PY"
if [ "$IS_XTENSA" = "y" ]; then
echo " \"-mlongcalls\"" >> "$AR_PLATFORMIO_PY"
else
echo " \"-march=rv32imc\"" >> "$AR_PLATFORMIO_PY"
fi
echo " ]," >> "$AR_PLATFORMIO_PY"
echo "" >> "$AR_PLATFORMIO_PY"

echo " ASPPFLAGS=[" >> "$AR_PLATFORMIO_PY"
set -- $PIO_AS_FLAGS
for item; do
echo " \"$item\"," >> "$AR_PLATFORMIO_PY"
done
echo " \"-x\", \"assembler-with-cpp\"" >> "$AR_PLATFORMIO_PY"
echo " ]," >> "$AR_PLATFORMIO_PY"
echo "" >> "$AR_PLATFORMIO_PY"

echo " CFLAGS=[" >> "$AR_PLATFORMIO_PY"
set -- $PIO_C_FLAGS
last_item="${@: -1}"
for item in "${@:0:${#@}}"; do
if [ "${item:0:1}" != "/" ]; then
echo " \"$item\"," >> "$AR_PLATFORMIO_PY"
fi
done
echo " \"$last_item\"" >> "$AR_PLATFORMIO_PY"
echo " ]," >> "$AR_PLATFORMIO_PY"
echo "" >> "$AR_PLATFORMIO_PY"

echo " CXXFLAGS=[" >> "$AR_PLATFORMIO_PY"
set -- $PIO_CXX_FLAGS
last_item="${@: -1}"
for item in "${@:0:${#@}}"; do
if [ "${item:0:1}" != "/" ]; then
echo " \"$item\"," >> "$AR_PLATFORMIO_PY"
fi
done
echo " \"$last_item\"" >> "$AR_PLATFORMIO_PY"
echo " ]," >> "$AR_PLATFORMIO_PY"
echo "" >> "$AR_PLATFORMIO_PY"

echo " CCFLAGS=[" >> "$AR_PLATFORMIO_PY"
set -- $PIO_CC_FLAGS
for item; do
echo " \"$item\"," >> "$AR_PLATFORMIO_PY"
done
echo " \"-MMD\"" >> "$AR_PLATFORMIO_PY"
echo " ]," >> "$AR_PLATFORMIO_PY"
echo "" >> "$AR_PLATFORMIO_PY"

echo " LINKFLAGS=[" >> "$AR_PLATFORMIO_PY"
set -- $PIO_LD_FLAGS
for item; do
echo " \"$item\"," >> "$AR_PLATFORMIO_PY"
done
set -- $PIO_LD_SCRIPTS
for item; do
echo " \"-T\", \"$item\"," >> "$AR_PLATFORMIO_PY"
done
set -- $PIO_LD_FUNCS
for item; do
echo " \"-u\", \"$item\"," >> "$AR_PLATFORMIO_PY"
done
echo " '-Wl,-Map=\"%s\"' % join(\"\${BUILD_DIR}\", \"\${PROGNAME}.map\")" >> "$AR_PLATFORMIO_PY"

echo " ]," >> "$AR_PLATFORMIO_PY"
echo "" >> "$AR_PLATFORMIO_PY"

# include dirs
REL_INC=""
echo " CPPPATH=[" >> "$AR_PLATFORMIO_PY"

set -- $INCLUDES

Expand All @@ -415,13 +314,6 @@ for item; do
out_sub="${item#*$ipath}"
out_cpath="$AR_SDK/include/$fname$out_sub"
REL_INC+="-iwithprefixbefore $fname$out_sub "
if [ "$out_sub" = "" ]; then
echo " join($PIO_SDK, \"include\", \"$fname\")," >> "$AR_PLATFORMIO_PY"
else
pio_sub="${out_sub:1}"
pio_sub=`echo $pio_sub | sed 's/\//\\", \\"/g'`
echo " join($PIO_SDK, \"include\", \"$fname\", \"$pio_sub\")," >> "$AR_PLATFORMIO_PY"
fi
for f in `find "$item" -name '*.h'`; do
rel_f=${f#*$item}
rel_p=${rel_f%/*}
Expand All @@ -447,10 +339,6 @@ for item; do
fi
fi
done
echo " join($PIO_SDK, board_config.get(\"build.arduino.memory_type\", (board_config.get(\"build.flash_mode\", \"dio\") + \"_$OCT_PSRAM\")), \"include\")," >> "$AR_PLATFORMIO_PY"
echo " join(FRAMEWORK_DIR, \"cores\", board_config.get(\"build.core\"))" >> "$AR_PLATFORMIO_PY"
echo " ]," >> "$AR_PLATFORMIO_PY"
echo "" >> "$AR_PLATFORMIO_PY"

AR_LIBS="$LD_LIBS"
PIO_LIBS=""
Expand All @@ -467,38 +355,6 @@ for item; do
cp "$item" "$AR_SDK/lib/"
done

echo " LIBPATH=[" >> "$AR_PLATFORMIO_PY"
echo " join($PIO_SDK, \"lib\")," >> "$AR_PLATFORMIO_PY"
echo " join($PIO_SDK, \"ld\")," >> "$AR_PLATFORMIO_PY"
echo " join($PIO_SDK, board_config.get(\"build.arduino.memory_type\", (board_config.get(\"build.flash_mode\", \"dio\") + \"_$OCT_PSRAM\")))" >> "$AR_PLATFORMIO_PY"
echo " ]," >> "$AR_PLATFORMIO_PY"
echo "" >> "$AR_PLATFORMIO_PY"

echo " LIBS=[" >> "$AR_PLATFORMIO_PY"
echo " $PIO_LIBS" >> "$AR_PLATFORMIO_PY"
echo " ]," >> "$AR_PLATFORMIO_PY"
echo "" >> "$AR_PLATFORMIO_PY"

echo " CPPDEFINES=[" >> "$AR_PLATFORMIO_PY"
set -- $DEFINES
for item; do
item="${item:2}" #remove -D
if [[ $item == *"="* ]]; then
item=(${item//=/ })
re='^[+-]?[0-9]+([.][0-9]+)?$'
if [[ ${item[1]} =~ $re ]]; then
echo " (\"${item[0]}\", ${item[1]})," >> "$AR_PLATFORMIO_PY"
else
echo " (\"${item[0]}\", '${item[1]}')," >> "$AR_PLATFORMIO_PY"
fi
else
echo " \"$item\"," >> "$AR_PLATFORMIO_PY"
fi
done

# end generation of platformio-build.py
cat configs/pio_end.txt >> "$AR_PLATFORMIO_PY"

# replace double backslashes with single one
DEFINES=`echo "$DEFINES" | tr -s '\'`

Expand Down
86 changes: 0 additions & 86 deletions tools/gen_platformio_manifest.py

This file was deleted.