From f1af8bae0d2df6ffba7f2709ddca550ff4c3e43e Mon Sep 17 00:00:00 2001 From: David Buzz Date: Tue, 2 May 2023 09:53:22 +1000 Subject: [PATCH] Tools: on esp32 force constants to single-precision like chibios port does. --- Tools/ardupilotwaf/boards.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Tools/ardupilotwaf/boards.py b/Tools/ardupilotwaf/boards.py index 7d34ae42ea..0ac7760350 100644 --- a/Tools/ardupilotwaf/boards.py +++ b/Tools/ardupilotwaf/boards.py @@ -841,6 +841,7 @@ class esp32(Board): env.CFLAGS += [ '-fno-inline-functions', '-mlongcalls', + '-fsingle-precision-constant', ] env.CFLAGS.remove('-Werror=undef') @@ -856,6 +857,8 @@ class esp32(Board): '-Wno-sign-compare', '-fno-inline-functions', '-mlongcalls', + '-fsingle-precision-constant', # force const vals to be float , not double. so 100.0 means 100.0f + '-fno-threadsafe-statics', '-DCYGWIN_BUILD'] env.CXXFLAGS.remove('-Werror=undef') env.CXXFLAGS.remove('-Werror=shadow')