Skip to content
This repository was archived by the owner on Feb 2, 2023. It is now read-only.

Commit 58e532e

Browse files
committed
Improve support for assembly programming
1 parent 1233092 commit 58e532e

File tree

2 files changed

+15
-16
lines changed

2 files changed

+15
-16
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# ASR Microelectronics ASR605x (ASR6501, ASR6502): development platform for [PlatformIO](http://platformio.org)
1+
# ASR Microelectronics ASR605x (ASR6501, ASR6502): development platform for [PlatformIO](https://platformio.org)
22

33
[![Build Status](https://github.com/HelTecAutomation/platform-asrmicro650x/workflows/Examples/badge.svg)](https://github.com/HelTecAutomation/platform-asrmicro650x/actions)
44

@@ -9,7 +9,7 @@ ASR Microelectronics ASR605x series is highly integrated and ultra low power SoC
99

1010
# Usage
1111

12-
1. [Install PlatformIO](http://platformio.org)
12+
1. [Install PlatformIO](https://platformio.org)
1313
2. Create PlatformIO project and configure a platform option in [platformio.ini](https://docs.platformio.org/page/projectconf.html) file:
1414

1515
## Stable version

builder/frameworks/arduino.py

Lines changed: 13 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,18 @@
3939
CORE_DIR = os.path.join(FRAMEWORK_DIR, "cores", core)
4040
assert os.path.isdir(FRAMEWORK_DIR)
4141

42+
machine_flags = [
43+
"-mcpu=%s" % board.get("build.cpu"),
44+
"-mthumb",
45+
"-mthumb-interwork",
46+
"-mapcs-frame",
47+
]
48+
4249
env.Append(
43-
ASPPFLAGS=["-x", "assembler-with-cpp"],
50+
ASFLAGS=machine_flags,
51+
ASPPFLAGS=[
52+
"-x", "assembler-with-cpp",
53+
],
4454

4555
CPPDEFINES=[
4656
("ARDUINO", 10815),
@@ -55,14 +65,10 @@
5565
("F_CPU", "$BOARD_F_CPU"),
5666
"SOFT_SE",
5767
],
58-
CCFLAGS=[
68+
CCFLAGS=machine_flags + [
5969
"-w",
6070
"-Wall",
6171
"-Os",
62-
"-mcpu=%s" % board.get("build.cpu"),
63-
"-mthumb",
64-
"-mthumb-interwork",
65-
"-mapcs-frame",
6672
"-ffunction-sections",
6773
"-fdata-sections",
6874
"-ffat-lto-objects",
@@ -77,16 +83,13 @@
7783
"-fno-exceptions",
7884
"-fno-rtti",
7985
],
80-
LINKFLAGS=[
86+
LINKFLAGS=machine_flags + [
8187
"-Os",
8288
"-Wl,--gc-sections",
83-
"-mcpu=%s" % board.get("build.cpu"),
8489
"-Wl,--wrap=printf",
8590
"-Wl,--wrap=fflush",
8691
"-Wl,--wrap=sprintf",
8792
"-Wl,--wrap=snprintf",
88-
"-mthumb",
89-
"-mthumb-interwork",
9093
"-specs=nano.specs",
9194
"-specs=nosys.specs",
9295
"-ffat-lto-objects",
@@ -233,7 +236,3 @@
233236
)
234237

235238
env.Prepend(LIBS=libs)
236-
237-
# Duplicate preprocessor flags to the assembler
238-
# for '.S', '.spp', '.SPP', '.sx' source files
239-
env.Append(ASPPFLAGS=env.get("CCFLAGS", []))

0 commit comments

Comments
 (0)