Skip to content

Improve support for hand-written asm source files #6817

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

Closed
wants to merge 5 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
14 changes: 11 additions & 3 deletions tools/platformio-build-esp32.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,26 +35,34 @@
assert isdir(FRAMEWORK_DIR)

env.Append(
# common assembler flags for .s, .S, .asm, etc.
ASFLAGS=[
"-x", "assembler-with-cpp"
"-mlongcalls",
],

# .S flags (preprocessor)
ASPPFLAGS=[
"-x", "assembler-with-cpp",
],

# .c flags
CFLAGS=[
"-mlongcalls",
"-Wno-frame-address",
"-std=gnu99",
"-Wno-old-style-declaration"
],

# .cpp flags
CXXFLAGS=[
"-mlongcalls",
"-Wno-frame-address",
"-std=gnu++11",
"-fexceptions",
"-fno-rtti"
],

# common flags for .c & .cpp
CCFLAGS=[
"-mlongcalls",
"-ffunction-sections",
"-fdata-sections",
"-Wno-error=unused-function",
Expand Down
16 changes: 12 additions & 4 deletions tools/platformio-build-esp32c3.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,24 +35,32 @@
assert isdir(FRAMEWORK_DIR)

env.Append(
# common assembler flags for .s, .S, .asm, etc.
ASFLAGS=[
"-x", "assembler-with-cpp"
"-march=rv32imc",
],

# .S flags
ASPPFLAGS=[
"-x", "assembler-with-cpp",
],

# .c flags
CFLAGS=[
"-march=rv32imc",
"-std=gnu99",
"-Wno-old-style-declaration"
],

# .cpp flags
CXXFLAGS=[
"-march=rv32imc",
"-std=gnu++11",
"-fexceptions",
"-fno-rtti"
],

# common flags for .c & .cpp
CCFLAGS=[
"-march=rv32imc",
"-ffunction-sections",
"-fdata-sections",
"-Wno-error=unused-function",
Expand All @@ -76,8 +84,8 @@
],

LINKFLAGS=[
"-march=rv32imc",
"-nostartfiles",
"-march=rv32imc",
"--specs=nosys.specs",
"-Wl,--cref",
"-Wl,--gc-sections",
Expand Down
14 changes: 11 additions & 3 deletions tools/platformio-build-esp32s2.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,24 +35,32 @@
assert isdir(FRAMEWORK_DIR)

env.Append(
# common assembler flags for .s, .S, .asm, etc.
ASFLAGS=[
"-x", "assembler-with-cpp"
"-mlongcalls",
],

# .S flags (preprocessor)
ASPPFLAGS=[
"-x", "assembler-with-cpp",
],

# .c flags
CFLAGS=[
"-mlongcalls",
"-std=gnu99",
"-Wno-old-style-declaration"
],

# .cpp flags
CXXFLAGS=[
"-mlongcalls",
"-std=gnu++11",
"-fexceptions",
"-fno-rtti"
],

# common flags for .c & .cpp
CCFLAGS=[
"-mlongcalls",
"-ffunction-sections",
"-fdata-sections",
"-Wno-error=unused-function",
Expand Down
14 changes: 11 additions & 3 deletions tools/platformio-build-esp32s3.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,24 +35,32 @@
assert isdir(FRAMEWORK_DIR)

env.Append(
# common assembler flags for .s, .S, .asm, etc.
ASFLAGS=[
"-x", "assembler-with-cpp"
"-mlongcalls",
],

# .S flags (preprocessor)
ASPPFLAGS=[
"-x", "assembler-with-cpp",
],

# .c flags
CFLAGS=[
"-mlongcalls",
"-std=gnu99",
"-Wno-old-style-declaration"
],

# .cpp flags
CXXFLAGS=[
"-mlongcalls",
"-std=gnu++11",
"-fexceptions",
"-fno-rtti"
],

# common flags for .c & .cpp
CCFLAGS=[
"-mlongcalls",
"-ffunction-sections",
"-fdata-sections",
"-Wno-error=unused-function",
Expand Down