I have successfully cross-compiled ACADOS for VxWorks 6.9, a 32-bit system running on PPC CPU. Here are the settings
The target is set to GENERIC
EXT_DEP is turned off
LA uses REFERENCE
MF uses COLMAJ
The compilation is successful, despite a few warnings. Then I successfully compiled locally the c code of the bicycle model generated from the Python interface. For simplicity, I tested the integrator first.
When I try to run the executable, I got the following output
So basically the code is not working. Ok, I start debug, and found that the error came from the struct mem in the integrator.
When I try to give values to the mem->time_ad, mem->time_la and mem->time_sim, the error shows. Then I found that these three double variables are not created, or their memory is not assigned properly.
Finally, I simply comment these three lines, and the integrator works!
My question is, why is the case? There seems memory alignment or assignment issues, but weirdly everything works fine on Ubuntu 64bit system, and on Speedgoat.
To further locate the problem, I test the OCP example as well, and the code stuck at model->scaling=1.0
The similarity of these two tests is that: both sim_irk_memory and model struct contains a few double pointers and a few double variables. The pointers work fine, but the double variables are crashed. I guess, this is the problem of align_char_to(8, &c_ptr), or any thing related to this?
Thank you for the reply. The guide you gave is very helpful.
However, after adapting the memory alignment guide to our architecture, we still got some errors. The errors indicate that HPIPM structs have memory problems, and this kind of struct is not explained in the guide you provided.
Specifically, we found that the first error lied in the function
Now I’m not sure if this can be a PR (does it work for other architectures?), and why the memory of a single vector is not assigned inside HPIPM create function correctly so that we have to do it manually in ACADOS create function.