loveuav / eigen-stm32-demo Goto Github PK
View Code? Open in Web Editor NEWA demo project of how to use Eigen in STM32
License: GNU General Public License v3.0
A demo project of how to use Eigen in STM32
License: GNU General Public License v3.0
I ran your code and it worked, thanks for the effort! But I have a new question, how to use Eigen on PX4? It uses arm-none-eabi-g++, but fails to compile:
~/Mac_DF/PX4-Autopilot$ make px4_sitl
[0/1] Re-running CMake...
-- PX4 version: v1.11.0-rc3-1250-g121e84b8ba
-- PX4 config file: /home/parallels/Mac_DF/PX4-Autopilot/boards/px4/sitl/default.cmake
-- PX4 config: px4_sitl_default
-- PX4 platform: posix
-- PX4 lockstep: enabled
-- cmake build type: RelWithDebInfo
-- Building for code coverage
-- ccache enabled (export CCACHE_DISABLE=1 to disable)
-- build type is RelWithDebInfo
-- PX4 ECL: Very lightweight Estimation & Control Library v1.9.0-rc1-506-g99575d7
-- ROMFS: px4fmu_common
-- Configuring done
-- Generating done
-- Build files have been written to: /home/parallels/Mac_DF/PX4-Autopilot/build/px4_sitl_default
[5/5] Linking CXX executable bin/px4
parallels@ubuntu-linux-20-04-desktop:~/Mac_DF/PX4-Autopilot$ make px4_fmu-v5
[0/1] Re-running CMake...
-- PX4 version: v1.11.0-rc3-1250-g121e84b8ba
-- PX4 config file: /home/parallels/Mac_DF/PX4-Autopilot/boards/px4/fmu-v5/default.cmake
-- PX4 config: px4_fmu-v5_default
-- PX4 platform: nuttx
-- cmake build type: MinSizeRel
-- Enabling double FP precision hardware instructions
-- ccache enabled (export CCACHE_DISABLE=1 to disable)
-- Found PythonInterp: /usr/bin/python3 (found suitable version "3.8.10", minimum required is "3")
-- build type is MinSizeRel
-- PX4 ECL: Very lightweight Estimation & Control Library v1.9.0-rc1-506-g99575d7
-- Building and including px4_io-v2_default
-- Found PythonInterp: /usr/bin/python3 (found version "3.8.10")
-- Using C++11
-- Release build type: MinSizeRel
-- ROMFS: px4fmu_common
-- ROMFS: Adding rc.board_defaults
-- ROMFS: Adding rc.board_sensors
-- ROMFS: Adding rc.board_mavlink
-- Configuring done
-- Generating done
-- Build files have been written to: /home/parallels/Mac_DF/PX4-Autopilot/build/px4_fmu-v5_default
[0/26] Performing build step for 'px4io_firmware'
[0/1] Re-running CMake...
-- PX4 version: v1.11.0-rc3-1250-g121e84b8ba
-- PX4 config file: /home/parallels/Mac_DF/PX4-Autopilot/boards/px4/io-v2/default.cmake
-- PX4 config: px4_io-v2_default
-- PX4 platform: nuttx
-- cmake build type: MinSizeRel
-- ccache enabled (export CCACHE_DISABLE=1 to disable)
-- build type is MinSizeRel
-- PX4 ECL: Very lightweight Estimation & Control Library v1.9.0-rc1-506-g99575d7
-- Configuring done
-- Generating done
-- Build files have been written to: /home/parallels/Mac_DF/PX4-Autopilot/build/px4_fmu-v5_default/external/Build/px4io_firmware
ninja: no work to do.
[3/26] Building CXX object src/lib/mixer_module/CMakeFiles/mixer_module.dir/mixer_module.cpp.obj
FAILED: src/lib/mixer_module/CMakeFiles/mixer_module.dir/mixer_module.cpp.obj
/usr/bin/ccache /opt/gcc-arm-none-eabi-9-2020-q2-update/bin/arm-none-eabi-g++ -DCONFIG_ARCH_BOARD_PX4_FMU_V5 -DMODULE_NAME=\"mixer_module\" -D_SYS_CDEFS_H_ -D_SYS_REENT_H_ -D__CUSTOM_FILE_IO__ -D__PX4_NUTTX -D__STDC_FORMAT_MACROS -I../../boards/px4/fmu-v5/src -I../../platforms/nuttx/src/px4/common/include -I. -Isrc/lib -I../../platforms/nuttx/src/px4/stm/stm32f7/include -I../../platforms/common/include -I../../src -I../../src/include -I../../src/lib -I../../src/lib/matrix -I../../src/modules -INuttX/nuttx/arch/arm/src/armv7-m -INuttX/nuttx/arch/arm/src/chip -INuttX/nuttx/arch/arm/src/common -INuttX/apps/include -Iexternal/Install/include -I../../src/lib/mixer_module/../Eigen -isystem ../../platforms/nuttx/NuttX/include/cxx -isystem NuttX/nuttx/include/cxx -isystem NuttX/nuttx/include -mcpu=cortex-m7 -mthumb -mfpu=fpv5-d16 -mfloat-abi=hard -Os -DNDEBUG -g -fdata-sections -ffunction-sections -fomit-frame-pointer -fmerge-all-constants -fno-signed-zeros -fno-trapping-math -freciprocal-math -fno-math-errno -fno-strict-aliasing -fvisibility=hidden -include visibility.h -Wall -Wextra -Werror -Warray-bounds -Wcast-align -Wdisabled-optimization -Wdouble-promotion -Wfatal-errors -Wfloat-equal -Wformat-security -Winit-self -Wlogical-op -Wpointer-arith -Wshadow -Wuninitialized -Wunknown-pragmas -Wunused-variable -Wno-missing-field-initializers -Wno-missing-include-dirs -Wno-unused-parameter -fdiagnostics-color=always -Wno-stringop-truncation -fno-builtin-printf -fno-strength-reduce -Wformat=1 -Wunused-but-set-variable -Wno-format-truncation -fcheck-new -fno-exceptions -fno-rtti -fno-threadsafe-statics -Wreorder -Wno-overloaded-virtual -nostdinc++ -fno-sized-deallocation -std=gnu++14 -MD -MT src/lib/mixer_module/CMakeFiles/mixer_module.dir/mixer_module.cpp.obj -MF src/lib/mixer_module/CMakeFiles/mixer_module.dir/mixer_module.cpp.obj.d -o src/lib/mixer_module/CMakeFiles/mixer_module.dir/mixer_module.cpp.obj -c ../../src/lib/mixer_module/mixer_module.cpp
In file included from ../../src/lib/mixer_module/../Eigen/Dense:1,
from ../../src/lib/mixer_module/../Eigen/Eigen:1,
from ../../src/lib/mixer_module/mixer_module.cpp:40:
../../src/lib/mixer_module/../Eigen/Core:96:10: fatal error: complex: No such file or directory
96 | #include <complex>
| ^~~~~~~~~
compilation terminated.
ninja: build stopped: subcommand failed.
make: *** [Makefile:226: px4_fmu-v5] Error 1
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.