1
0
Fork 0
mirror of https://github.com/iNavFlight/inav.git synced 2025-07-13 11:29:56 +03:00
Commit graph

12 commits

Author SHA1 Message Date
Scavanger
39bd781552 USB-Rescue 2024-05-23 10:51:41 -03:00
Jonathan Hudson
0d55d20bc8
fix cygwin/sitl build with cmake 3.28.3 (#9787) 2024-03-11 10:44:23 +00:00
Roman Lut
79e14749d5 add option to build sitl with debug information 2023-10-07 17:53:26 +02:00
Jonathan Hudson
8be9df062f [SITL] check gcc version for linker rwx warning 2023-07-06 16:38:36 +01:00
Jonathan Hudson
35ef692819 [SITL] suppress spurious linker warning with gcc12+ 2023-07-06 15:52:27 +01:00
Marcelo Bezerra
688a7e8480 Fix lldb debugging in OSX and improve OSX detection 2023-05-28 20:19:04 +02:00
Marcelo Bezerra
69bd3e9d93
[SITL OSX] Fix some of the warnings and add macosx SITL build to workflows (#9063)
clang can be verbose with warnings, but some of it is probably valid when building a 64bit binary.

Highlighted changes:

* Call float versions of math functions to avoid conversion to double by the compiler (absf, sqrtf, roundf, etc)
* Make sure floating point constants are marked as floats, to avoid conversion to double by the compiler. (1.0 is a double, 1.0f is a float and when doing math between float and double, all values get upgraded to double!)
* Changed memcpy_fn in unit test AND SITL builds to be a macro to memcpy (instead of inline function calling memcpy), this fixes linker errors for memcpy as macos compiler mangles the symbol in a different way and would not work with asm("memcpy") call.
* Some simulator code made heavy use of doubles, but since all the data in INAV is float, that is probably overkill and some functions/macros had float in the name, while upconvertting to double.

Open questions:

* Should scale in osdFormatCentiNumber be changed to float? It is currently uint32_t but some of the scale defines are, correctly, not integer numbers.
* I changed CENTIDEGREES_TO_DEGREES to use float on the division path, but the code seems to be ok, or assuming it would be converted to integer anyway. Is this the correct solution?
* This still does not fix the invalid settings issues, I suspect it is related to the lack of linker scripts in clang, to preserve the section data of settings.
* Binary is still not multi platform (arm/x86_64).
2023-05-25 13:12:03 +02:00
Marcelo Bezerra
30ec804c08
Fix SITL compilation on macosx (#9012)
Clean up cmake files for SITL and fix the compilation issues caused by tooling differences between gcc and clang (used in MacOSX).

SITL on MacOSX still has lots of compile time warnings that need to be addressed and some known issues that prevent it from working with simulators, but those will be addressed in 7.0.

At this point, I don't think MacOSX SITL is ready to be added to the configurator. That should be targeted for 7.0.
2023-04-26 12:27:57 +02:00
Jonathan Hudson
f3088aeb9b
[SITL] sitl specific cmake cleanup (Windows only linker option) (#8995)
* [SITL] sitl specific cmake cleanup (Windows only linker option)

* [SITL] sitl specific cmake cleanup (C17 for recent cmake)
2023-04-19 22:05:36 +01:00
Andi Kanzler
ea69f9c61d
Update sitl.cmake 2023-03-23 19:31:04 -03:00
Scavanger
a39b0a309a Formatting 2023-01-24 10:14:14 -03:00
Scavanger
61790c157f SITL 2023-01-24 09:47:27 -03:00