|
@ -34,6 +34,18 @@ def clr(color, text): |
|
|
# Callbacks |
|
|
# 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): |
|
|
def cpp_check(source, target, env): |
|
|
print("Started cppcheck...\n") |
|
|
print("Started cppcheck...\n") |
|
|
call(["cppcheck", os.getcwd()+"/espurna", "--force", "--enable=all"]) |
|
|
call(["cppcheck", os.getcwd()+"/espurna", "--force", "--enable=all"]) |
|
@ -63,6 +75,8 @@ def add_build_flags(source, target, env): |
|
|
# Hooks |
|
|
# Hooks |
|
|
# ------------------------------------------------------------------------------ |
|
|
# ------------------------------------------------------------------------------ |
|
|
|
|
|
|
|
|
|
|
|
remove_float_support() |
|
|
|
|
|
|
|
|
#env.AddPreAction("buildprog", cpp_check) |
|
|
#env.AddPreAction("buildprog", cpp_check) |
|
|
env.AddPreAction("$BUILD_DIR/src/espurna.ino.o", add_build_flags) |
|
|
env.AddPreAction("$BUILD_DIR/src/espurna.ino.o", add_build_flags) |
|
|
env.AddPostAction("$BUILD_DIR/${PROGNAME}.bin", check_size) |
|
|
env.AddPostAction("$BUILD_DIR/${PROGNAME}.bin", check_size) |