mirror of
https://github.com/xoseperez/espurna.git
synced 2026-03-06 08:24:27 +01:00
Disable floating point support when building using PIO
This commit is contained in:
@@ -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 ""
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user