Skip to content

Commit 6b3443e

Browse files
Improve support for hand-written asm source files in PIO
Closes: espressif/arduino-esp32#6817 Co-Authored-By: Ivan Kravets <me@ikravets.com>
1 parent be120d3 commit 6b3443e

File tree

2 files changed

+11
-1
lines changed

2 files changed

+11
-1
lines changed

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ idf_build_get_property(elf EXECUTABLE GENERATOR_EXPRESSION)
1111

1212
add_custom_command(
1313
OUTPUT "idf_libs"
14-
COMMAND ${CMAKE_SOURCE_DIR}/tools/copy-libs.sh ${IDF_TARGET} "${CONFIG_ESPTOOLPY_OCT_FLASH}" "${CONFIG_SPIRAM_MODE_OCT}"
14+
COMMAND ${CMAKE_SOURCE_DIR}/tools/copy-libs.sh ${IDF_TARGET} "${CONFIG_ESPTOOLPY_OCT_FLASH}" "${CONFIG_SPIRAM_MODE_OCT}" "${CONFIG_IDF_TARGET_ARCH_XTENSA}"
1515
DEPENDS ${elf}
1616
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
1717
VERBATIM

tools/copy-libs.sh

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
# config
33

44
IDF_TARGET=$1
5+
IS_XTENSA=$4
56
OCT_FLASH=
67
OCT_PSRAM=
78
if [ "$2" = "y" ]; then
@@ -281,6 +282,15 @@ cat pio_start.txt > "$AR_PLATFORMIO_PY"
281282
rm pio_end.txt 1pio_start.txt pio_start.txt
282283

283284
echo " ASFLAGS=[" >> "$AR_PLATFORMIO_PY"
285+
if [ "$IS_XTENSA" = "y" ]; then
286+
echo " \"-mlongcalls\"" >> "$AR_PLATFORMIO_PY"
287+
else
288+
echo " \"-march=rv32imc\"" >> "$AR_PLATFORMIO_PY"
289+
fi
290+
echo " ]," >> "$AR_PLATFORMIO_PY"
291+
echo "" >> "$AR_PLATFORMIO_PY"
292+
293+
echo " ASPPFLAGS=[" >> "$AR_PLATFORMIO_PY"
284294
set -- $PIO_AS_FLAGS
285295
for item; do
286296
echo " \"$item\"," >> "$AR_PLATFORMIO_PY"

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy