This forum has been archived. All content is frozen. Please use KDE Discuss instead.

Error using Eigen on ARM Cortex M4 via Keil compiler

Tags: None
(comma "," separated)
mabdelaal
Registered Member
Posts
1
Karma
0
Hello,
I'm trying to use EIgen on ARM Cortex M4 compiler using Keil. My preprocessor directives are as follow:
Code: Select all
#include "TM4C123.h"
#define EIGEN_NO_DEBUG
#define EIGEN_DONT_ALIGN
#define EIGEN_MALLOC_ALREADY_ALIGNED
#define EIGEN_NO_MALLOC
#include <stdlib.h>
using namespace std;
#include "Dense"
using namespace Eigen;


When compiling i got the following warnings :
.\Eigen\src/Core/util/Memory.h(90): warning: #68-D: integer conversion resulted in a change of sign
std::size_t huge = -1;
.\Eigen\src/Core/TriangularMatrix.h(100): warning: #550-D: variable "mode" was set but never used
const int mode = int(Mode) & ~SelfAdjoint;
.\Eigen\src/Core/products/Parallelizer.h(20): warning: #550-D: variable "m_maxThreads" was set but never used
static EIGEN_UNUSED int m_maxThreads = -1;
.\Eigen\src/Core/products/GeneralMatrixVector.h(414): warning: #1041-D: alignment for an auto object may not be larger than 8
EIGEN_ALIGN16 ResScalar tmp0 = ResScalar(0);
.\Eigen\src/Core/products/GeneralMatrixVector.h(523): warning: #1041-D: alignment for an auto object may not be larger than 8
EIGEN_ALIGN16 ResScalar tmp0 = ResScalar(0);
.\Eigen\src/LU/Inverse.h(291): warning: #550-D: variable "Size" was set but never used
const int Size = EIGEN_PLAIN_ENUM_MIN(MatrixType::ColsAtCompileTime,Dest::ColsAtCompileTime);

in addiiton to the error " fatal error in include chain (core): 'malloc.h' file not found", and when i got this file from the internet i got the error "invalid token at start of a preprocessor expression "


How can i solve this problem ?

Thanks in advance
User avatar
ggael
Moderator
Posts
3447
Karma
19
OS
regarding the malloc() thing, you can workaround by defining empty definitions:

void* malloc(std::size_t) { return 0; }

and maybe do the same for free/realloc.

Note that EIGEN_NO_MALLOC is only for debugging purpose to help tracking calls to malloc, not to disable the usage of malloc.


Bookmarks



Who is online

Registered users: Bing [Bot], Evergrowing, Google [Bot], rockscient