From 35c2ae1cbba70a90a88609022fbb266392397796 Mon Sep 17 00:00:00 2001 From: Ivan Kravets Date: Sat, 28 May 2022 20:56:13 +0300 Subject: [PATCH] Improve support for hand-written asm source files (#8583) --- tools/platformio-build.py | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/tools/platformio-build.py b/tools/platformio-build.py index a462ff391..56d5e8464 100644 --- a/tools/platformio-build.py +++ b/tools/platformio-build.py @@ -59,7 +59,13 @@ if gzip_fw: gzip_switch = ["--gzip", "PIO"] env.Append( - ASFLAGS=["-x", "assembler-with-cpp"], + ASFLAGS=[ + "-mlongcalls", + "-mtext-section-literals", + ], + ASPPFLAGS=[ + "-x", "assembler-with-cpp", + ], # General options that are passed to the C compiler (C only; not C++) CFLAGS=[ @@ -166,9 +172,6 @@ env.Append( ) ) -# copy CCFLAGS to ASFLAGS (-x assembler-with-cpp mode) -env.Append(ASFLAGS=env.get("CCFLAGS", [])[:]) - flatten_cppdefines = env.Flatten(env['CPPDEFINES']) #