You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am trying to build these 2 libraries for optimization on microcontrollers such as Arduino Teensy or STM32, using ARM Cortex-M7. Is it possible? If yes, could you give me some pointers?
Thank you very much!
The text was updated successfully, but these errors were encountered:
I don't have direct experience with that but in principle BLASFEO and HPIPM have been designed to be as much as possible self contained and with low requirements regarding the supported C version.
The first question would be: does the ARM Cortex M7 in these microcontrollers have a double precision floating point unit? I see that this is optional.
If this is the case, I would compile BLASFEO with the following options (from Makefile.rule, CMake should be similar but it is possible that some are still missing there):
TARGET: GENERIC
LA: REFERENCE (you can also try out HIGH_PERFORMANCE but this requires more available registers to perform well, and in some routines it internally uses malloc - even though likely not the routine you would employ in HPIPM).
MF: COLMAJ if you went for REFERENCE LA, PANELMAJ if you went for HIGH_PERFORMANCE LA
BLAS_API to LAPACKE_API: 0
EXTERNAL_BLAS_API: 0
OS: this affects the assembly language conventions (that is not used for the GENERIC TARGET that is pure C), and the choice of the compilation flags (that you may have to customize yourself)
USE_C99_MATH: here you can give a try, if 1 gives you problems you can try to turn this off at the cost of a little performance deficit in some special cases.
EXT_DEP: setting to 0 you avoid the compilation of functions with external dependencies for printing and memory allocation.
afterwards you will need to customize C compiler, CFLAGS and the like.
For HPIPM:
TARGET: GENERIC
USE_C99_MATH: same story as BLASFEO's one
OS: only affects compilation flags and the like as there is no assembly here
again afterwards you will need to customize C compiler, CFLAGS and the like.
If you don't have double precision floating point unit, then its software emulation is going to be very slow, while the single precision version of HPIPM is often cases not reliable as typically computations in interior point methods get quite ill conditioned close to the solution (clearly it also depends on the conditioning of the problem to be solved, difficult problems make it even harder).
As of now I don't recall other stuff.
It would be very appreciated if you can share your findings about what works and what doesn't.
Hi,
I am trying to build these 2 libraries for optimization on microcontrollers such as Arduino Teensy or STM32, using ARM Cortex-M7. Is it possible? If yes, could you give me some pointers?
Thank you very much!
The text was updated successfully, but these errors were encountered: