Browse Source

Disable floating point support when building using PIO

rfm69
Xose Pérez 6 years ago
parent
commit
9ee7ffa795
2 changed files with 14 additions and 5 deletions
  1. +0
    -5
      code/espurna/config/build.h
  2. +14
    -0
      code/extra_scripts.py

+ 0
- 5
code/espurna/config/build.h View File

@ -1,5 +0,0 @@
// DO NOT EDIT THIS FILE MANUALLY
// This file is modified by PlatformIO
// This file should not be pushed when modified, untrack changes with:
// git update-index --assume-unchanged code/espurna/config/build.h
#define APP_BUILD_FLAGS ""

+ 14
- 0
code/extra_scripts.py View File

@ -34,6 +34,18 @@ def clr(color, text):
# Callbacks
# ------------------------------------------------------------------------------
def remove_float_support():
flags = " ".join(env['LINKFLAGS'])
print flags
flags = flags.replace("-u _printf_float", "")
flags = flags.replace("-u _scanf_float", "")
newflags = flags.split()
env.Replace(
LINKFLAGS = newflags
)
def cpp_check(source, target, env):
print("Started cppcheck...\n")
call(["cppcheck", os.getcwd()+"/espurna", "--force", "--enable=all"])
@ -63,6 +75,8 @@ def add_build_flags(source, target, env):
# Hooks
# ------------------------------------------------------------------------------
remove_float_support()
#env.AddPreAction("buildprog", cpp_check)
env.AddPreAction("$BUILD_DIR/src/espurna.ino.o", add_build_flags)
env.AddPostAction("$BUILD_DIR/${PROGNAME}.bin", check_size)

Loading…
Cancel
Save