my ACADOS NMPC is running in a simulink model, giving good outputs.
It fails the Simulink Mex Compile Check with lots of undefined reference errors (acados-create, etc)
Are the S-Functions made by acados not intented to use for compiling on embedded systems?
Do I need to compile a certain library seperately to make it run?
sorry for the late reply.
I actually had some misunderstandings, I didnt know which source files and libs I had to implement. That was the reason I was creating these errors.
I am now trying to get the three libs compiled for my 32 bit scalexio system so I dont get “undefined references” errors anymore.
Right now I am struggling hard to compile the blasfeo library. Is there any way to create it from the acados folders with those cmake files?
The target compiler is QNX 3.0 with OPUS Make and x86_32 (Sclaexio Rt System).
I cant get this done, the dSpace Support doesnt have a proper solution besides rebuilding the makefile by hand in their makefile syntax.
I am stopping this developement now since I dont have the time anymore. I cant get the blasfeo and hpipm libraries working on the dSpace Sclaexio.
Its not a problem of 32 Bit or 64 Bit, only about binary incompatibility of the target language compiler and missing makefile workarounds / toolchain-files.
Following a hint from dspace support I successfully cross compiled the libraries (If anyone needs the toolchain file, feel free to contact me).
Now I have problems with the blasfeo c code, since the code has only been optimized for the dspace Autobox - next to “normal” system architectures like windows. I get errors regarding the missing <brtenv.h> of the scalexio, the timing files and at the memory allocating. @FreyJo, @giaf what would you think, how long would it take to get those things changed to the Scalexio architecture? Are you interested in this topic?
I have to finish my thesis soon, so I would appreciate a recommendation.
regarding BLASFEO, if you use the generic target, it is almost completely self contained C code so there should be little to no issues in porting to any architecture.
In particular, you can start by turning off the EXT_DEP flag, that is e.g. here
This flag allows the use of some additional routines for printing and memory allocation, which are not strictly necessary and can be safely removed.
This should already fix most of your issues.
If a few are still there, it should be easy for you to go though the source code and replace e.g. missing headers with the ones provided by your embedded toolchain, or comment out print-and-exit for not-yet-implemented routines (which are most likely not used anyway in HPIPM/acados).
Again, the core of BLASFEO with generic target is essentially self contained C code.
@giaf you are my hero. Its working, I just cant believe it. Two months ago I did not know anything about C Code and Compilation. You guys helped a lot, thanks, especially to @FreyJo, @DennisWeir and ofc @giaf