Skip to content

Commit d58dcf8

Browse files
authored
remove PIO file creation from copy-libs.sh
1 parent e5c52ef commit d58dcf8

File tree

1 file changed

+0
-117
lines changed

1 file changed

+0
-117
lines changed

tools/copy-libs.sh

Lines changed: 0 additions & 117 deletions
Original file line numberDiff line numberDiff line change
@@ -286,82 +286,8 @@ done
286286

287287
mkdir -p "$AR_SDK"
288288

289-
# start generation of platformio-build.py
290-
AR_PLATFORMIO_PY="$AR_SDK/platformio-build.py"
291-
cat configs/pio_start.txt > "$AR_PLATFORMIO_PY"
292-
293-
echo " ASFLAGS=[" >> "$AR_PLATFORMIO_PY"
294-
if [ "$IS_XTENSA" = "y" ]; then
295-
echo " \"-mlongcalls\"" >> "$AR_PLATFORMIO_PY"
296-
else
297-
echo " \"-march=rv32imc\"" >> "$AR_PLATFORMIO_PY"
298-
fi
299-
echo " ]," >> "$AR_PLATFORMIO_PY"
300-
echo "" >> "$AR_PLATFORMIO_PY"
301-
302-
echo " ASPPFLAGS=[" >> "$AR_PLATFORMIO_PY"
303-
set -- $PIO_AS_FLAGS
304-
for item; do
305-
echo " \"$item\"," >> "$AR_PLATFORMIO_PY"
306-
done
307-
echo " \"-x\", \"assembler-with-cpp\"" >> "$AR_PLATFORMIO_PY"
308-
echo " ]," >> "$AR_PLATFORMIO_PY"
309-
echo "" >> "$AR_PLATFORMIO_PY"
310-
311-
echo " CFLAGS=[" >> "$AR_PLATFORMIO_PY"
312-
set -- $PIO_C_FLAGS
313-
last_item="${@: -1}"
314-
for item in "${@:0:${#@}}"; do
315-
if [ "${item:0:1}" != "/" ]; then
316-
echo " \"$item\"," >> "$AR_PLATFORMIO_PY"
317-
fi
318-
done
319-
echo " \"$last_item\"" >> "$AR_PLATFORMIO_PY"
320-
echo " ]," >> "$AR_PLATFORMIO_PY"
321-
echo "" >> "$AR_PLATFORMIO_PY"
322-
323-
echo " CXXFLAGS=[" >> "$AR_PLATFORMIO_PY"
324-
set -- $PIO_CXX_FLAGS
325-
last_item="${@: -1}"
326-
for item in "${@:0:${#@}}"; do
327-
if [ "${item:0:1}" != "/" ]; then
328-
echo " \"$item\"," >> "$AR_PLATFORMIO_PY"
329-
fi
330-
done
331-
echo " \"$last_item\"" >> "$AR_PLATFORMIO_PY"
332-
echo " ]," >> "$AR_PLATFORMIO_PY"
333-
echo "" >> "$AR_PLATFORMIO_PY"
334-
335-
echo " CCFLAGS=[" >> "$AR_PLATFORMIO_PY"
336-
set -- $PIO_CC_FLAGS
337-
for item; do
338-
echo " \"$item\"," >> "$AR_PLATFORMIO_PY"
339-
done
340-
echo " \"-MMD\"" >> "$AR_PLATFORMIO_PY"
341-
echo " ]," >> "$AR_PLATFORMIO_PY"
342-
echo "" >> "$AR_PLATFORMIO_PY"
343-
344-
echo " LINKFLAGS=[" >> "$AR_PLATFORMIO_PY"
345-
set -- $PIO_LD_FLAGS
346-
for item; do
347-
echo " \"$item\"," >> "$AR_PLATFORMIO_PY"
348-
done
349-
set -- $PIO_LD_SCRIPTS
350-
for item; do
351-
echo " \"-T\", \"$item\"," >> "$AR_PLATFORMIO_PY"
352-
done
353-
set -- $PIO_LD_FUNCS
354-
for item; do
355-
echo " \"-u\", \"$item\"," >> "$AR_PLATFORMIO_PY"
356-
done
357-
echo " '-Wl,-Map=\"%s\"' % join(\"\${BUILD_DIR}\", \"\${PROGNAME}.map\")" >> "$AR_PLATFORMIO_PY"
358-
359-
echo " ]," >> "$AR_PLATFORMIO_PY"
360-
echo "" >> "$AR_PLATFORMIO_PY"
361-
362289
# include dirs
363290
REL_INC=""
364-
echo " CPPPATH=[" >> "$AR_PLATFORMIO_PY"
365291

366292
set -- $INCLUDES
367293

@@ -388,13 +314,6 @@ for item; do
388314
out_sub="${item#*$ipath}"
389315
out_cpath="$AR_SDK/include/$fname$out_sub"
390316
REL_INC+="-iwithprefixbefore $fname$out_sub "
391-
if [ "$out_sub" = "" ]; then
392-
echo " join($PIO_SDK, \"include\", \"$fname\")," >> "$AR_PLATFORMIO_PY"
393-
else
394-
pio_sub="${out_sub:1}"
395-
pio_sub=`echo $pio_sub | sed 's/\//\\", \\"/g'`
396-
echo " join($PIO_SDK, \"include\", \"$fname\", \"$pio_sub\")," >> "$AR_PLATFORMIO_PY"
397-
fi
398317
for f in `find "$item" -name '*.h'`; do
399318
rel_f=${f#*$item}
400319
rel_p=${rel_f%/*}
@@ -420,10 +339,6 @@ for item; do
420339
fi
421340
fi
422341
done
423-
echo " join($PIO_SDK, board_config.get(\"build.arduino.memory_type\", (board_config.get(\"build.flash_mode\", \"dio\") + \"_$OCT_PSRAM\")), \"include\")," >> "$AR_PLATFORMIO_PY"
424-
echo " join(FRAMEWORK_DIR, \"cores\", board_config.get(\"build.core\"))" >> "$AR_PLATFORMIO_PY"
425-
echo " ]," >> "$AR_PLATFORMIO_PY"
426-
echo "" >> "$AR_PLATFORMIO_PY"
427342

428343
AR_LIBS="$LD_LIBS"
429344
PIO_LIBS=""
@@ -440,38 +355,6 @@ for item; do
440355
cp "$item" "$AR_SDK/lib/"
441356
done
442357

443-
echo " LIBPATH=[" >> "$AR_PLATFORMIO_PY"
444-
echo " join($PIO_SDK, \"lib\")," >> "$AR_PLATFORMIO_PY"
445-
echo " join($PIO_SDK, \"ld\")," >> "$AR_PLATFORMIO_PY"
446-
echo " join($PIO_SDK, board_config.get(\"build.arduino.memory_type\", (board_config.get(\"build.flash_mode\", \"dio\") + \"_$OCT_PSRAM\")))" >> "$AR_PLATFORMIO_PY"
447-
echo " ]," >> "$AR_PLATFORMIO_PY"
448-
echo "" >> "$AR_PLATFORMIO_PY"
449-
450-
echo " LIBS=[" >> "$AR_PLATFORMIO_PY"
451-
echo " $PIO_LIBS" >> "$AR_PLATFORMIO_PY"
452-
echo " ]," >> "$AR_PLATFORMIO_PY"
453-
echo "" >> "$AR_PLATFORMIO_PY"
454-
455-
echo " CPPDEFINES=[" >> "$AR_PLATFORMIO_PY"
456-
set -- $DEFINES
457-
for item; do
458-
item="${item:2}" #remove -D
459-
if [[ $item == *"="* ]]; then
460-
item=(${item//=/ })
461-
re='^[+-]?[0-9]+([.][0-9]+)?$'
462-
if [[ ${item[1]} =~ $re ]]; then
463-
echo " (\"${item[0]}\", ${item[1]})," >> "$AR_PLATFORMIO_PY"
464-
else
465-
echo " (\"${item[0]}\", '${item[1]}')," >> "$AR_PLATFORMIO_PY"
466-
fi
467-
else
468-
echo " \"$item\"," >> "$AR_PLATFORMIO_PY"
469-
fi
470-
done
471-
472-
# end generation of platformio-build.py
473-
cat configs/pio_end.txt >> "$AR_PLATFORMIO_PY"
474-
475358
# replace double backslashes with single one
476359
DEFINES=`echo "$DEFINES" | tr -s '\'`
477360

0 commit comments

Comments
 (0)