Files
charge-controller-firmware/linker_flags_newlib-nano.py
T
hogthrob 7ee248cf81 Reduced codesize: Switch to newlib-nano; Travis deploy on LibreSolar only (#37)
* Reduced codesize: Switch to newlib-nano

Figured out how to switch to newlib-nano in a simple way.
Reduced build size by about 29k. Applied this to all STM32 builds.
Please test with the STM32L072 hardware, I don't have one of those,
only STM32F072

Also "upgraded" the compiler accepted language standard to gnu c++11 (from gnu++98).

And finally defined that all floating point constants are to be treated
as "floats" and not as double (which is the default). Reduces the number
of implicit double promotions almost to the required minimum.

In some places the double functions are applied to floats which also
causes some unwanted time and code growth. But this is not fixed yet.

* Change travis to try to deploy only on "master" repo

* Fixed typo

gnu++11 was not really enabled, due to copy'n'paste typo.
2019-07-01 14:30:11 +02:00

18 lines
527 B
Python

# Custom settings, as referred to as "extra_script" in platformio.ini
#
# See http://docs.platformio.org/en/latest/projectconf.html#extra-script
# and https://docs.platformio.org/en/latest/projectconf/advanced_scripting.html#extra-linker-flags-without-wl-prefix
#
# We are setting the required linker flags for use of newlib-nano
Import("env")
env.Append(
LINKFLAGS=[
"-Wl,-u,_printf_float",
"--specs=nano.specs",
"--specs=nosys.specs"
]
)