Hi
I am using Matlab 2023b together with the dSPACE release 2024A and a MicroAutoBox III. I followed the steps for dSPACE DS1401 and DS1403 in the ACADOS Embedded Workflow.
As already mentioned by an other thread (Compiling Acados for Microautobox 3) I replaced the -J
with a -I
in the Toolchain-dSpaceDS1403.cmake file.
Calling: cmake -D CMAKE_TOOLCHAIN_FILE=../cmake/Toolchain-dSPACEDS1401.cmake -G "Unix Makefiles" -S ../ -B ./
works fine.
When calling cmake --build ./
everything runs through successfully, however, I receive some warnings during certain building steps (78%, 89%, 90%, 96%):
'[ 78%] Building C object acados/CMakeFiles/acados.dir/dense_qp/dense_qp_hpipm.c.obj
C:/Users/Kn/Documents/GitLab/acados/acados/dense_qp/dense_qp_hpipm.c:299:9: warning: implicit declaration of function 'd_print_exp_tran_mat' [-Wimplicit-function-declaration]
299 | d_print_exp_tran_mat(stat_m, mem->iter+1, stat, stat_m);
| ^~~~~~~~~~~~~~~~~~~~
[ 79%] Building C object acados/CMakeFiles/acados.dir/ocp_nlp/ocp_nlp_common.c.obj
[ 79%] Building C object acados/CMakeFiles/acados.dir/ocp_nlp/ocp_nlp_constraints_bgh.c.obj
[ 80%] Building C object acados/CMakeFiles/acados.dir/ocp_nlp/ocp_nlp_constraints_bgp.c.obj
[ 80%] Building C object acados/CMakeFiles/acados.dir/ocp_nlp/ocp_nlp_constraints_common.c.obj
[ 81%] Building C object acados/CMakeFiles/acados.dir/ocp_nlp/ocp_nlp_cost_common.c.obj
[ 81%] Building C object acados/CMakeFiles/acados.dir/ocp_nlp/ocp_nlp_cost_conl.c.obj
[ 82%] Building C object acados/CMakeFiles/acados.dir/ocp_nlp/ocp_nlp_cost_external.c.obj
[ 82%] Building C object acados/CMakeFiles/acados.dir/ocp_nlp/ocp_nlp_cost_ls.c.obj
[ 83%] Building C object acados/CMakeFiles/acados.dir/ocp_nlp/ocp_nlp_cost_nls.c.obj
[ 83%] Building C object acados/CMakeFiles/acados.dir/ocp_nlp/ocp_nlp_ddp.c.obj
[ 84%] Building C object acados/CMakeFiles/acados.dir/ocp_nlp/ocp_nlp_dynamics_common.c.obj
[ 84%] Building C object acados/CMakeFiles/acados.dir/ocp_nlp/ocp_nlp_dynamics_cont.c.obj
[ 85%] Building C object acados/CMakeFiles/acados.dir/ocp_nlp/ocp_nlp_dynamics_disc.c.obj
[ 85%] Building C object acados/CMakeFiles/acados.dir/ocp_nlp/ocp_nlp_reg_common.c.obj
[ 86%] Building C object acados/CMakeFiles/acados.dir/ocp_nlp/ocp_nlp_reg_convexify.c.obj
[ 86%] Building C object acados/CMakeFiles/acados.dir/ocp_nlp/ocp_nlp_reg_mirror.c.obj
[ 87%] Building C object acados/CMakeFiles/acados.dir/ocp_nlp/ocp_nlp_reg_noreg.c.obj
[ 87%] Building C object acados/CMakeFiles/acados.dir/ocp_nlp/ocp_nlp_reg_project.c.obj
[ 88%] Building C object acados/CMakeFiles/acados.dir/ocp_nlp/ocp_nlp_reg_project_reduc_hess.c.obj
[ 88%] Building C object acados/CMakeFiles/acados.dir/ocp_nlp/ocp_nlp_sqp.c.obj
[ 89%] Building C object acados/CMakeFiles/acados.dir/ocp_nlp/ocp_nlp_sqp_rti.c.obj
C:/Users/Kn/Documents/GitLab/acados/acados/ocp_nlp/ocp_nlp_sqp_rti.c: In function 'ocp_nlp_sqp_rti_feedback_step':
C:/Users/Kn/Documents/GitLab/acados/acados/ocp_nlp/ocp_nlp_sqp_rti.c:650:46: warning: 'qp_status' may be used uninitialized [-Wmaybe-uninitialized]
650 | mem->stat[mem->stat_n * mem->sqp_iter+0] = qp_status;
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~
C:/Users/Kn/Documents/GitLab/acados/acados/ocp_nlp/ocp_nlp_sqp_rti.c:558:9: note: 'qp_status' was declared here
558 | int qp_status, line_search_status;
| ^~~~~~~~~
[ 89%] Building C object acados/CMakeFiles/acados.dir/ocp_qp/ocp_qp_common.c.obj
[ 89%] Building C object acados/CMakeFiles/acados.dir/ocp_qp/ocp_qp_common_frontend.c.obj
[ 90%] Building C object acados/CMakeFiles/acados.dir/ocp_qp/ocp_qp_full_condensing.c.obj
[ 90%] Building C object acados/CMakeFiles/acados.dir/ocp_qp/ocp_qp_hpipm.c.obj
C:/Users/Kn/Documents/GitLab/acados/acados/ocp_qp/ocp_qp_hpipm.c: In function 'ocp_qp_hpipm':
C:/Users/Kn/Documents/GitLab/acados/acados/ocp_qp/ocp_qp_hpipm.c:329:9: warning: implicit declaration of function 'd_print_exp_tran_mat' [-Wimplicit-function-declaration]
329 | d_print_exp_tran_mat(stat_m, mem->iter+1, stat, stat_m);
| ^~~~~~~~~~~~~~~~~~~~
[ 91%] Building C object acados/CMakeFiles/acados.dir/ocp_qp/ocp_qp_partial_condensing.c.obj
[ 91%] Building C object acados/CMakeFiles/acados.dir/ocp_qp/ocp_qp_xcond_solver.c.obj
[ 92%] Building C object acados/CMakeFiles/acados.dir/sim/sim_collocation_utils.c.obj
[ 92%] Building C object acados/CMakeFiles/acados.dir/sim/sim_common.c.obj
[ 93%] Building C object acados/CMakeFiles/acados.dir/sim/sim_erk_integrator.c.obj
[ 93%] Building C object acados/CMakeFiles/acados.dir/sim/sim_gnsf.c.obj
[ 94%] Building C object acados/CMakeFiles/acados.dir/sim/sim_irk_integrator.c.obj
[ 94%] Building C object acados/CMakeFiles/acados.dir/sim/sim_lifted_irk_integrator.c.obj
[ 95%] Building C object acados/CMakeFiles/acados.dir/utils/external_function_generic.c.obj
[ 95%] Building C object acados/CMakeFiles/acados.dir/utils/math.c.obj
[ 96%] Building C object acados/CMakeFiles/acados.dir/utils/mem.c.obj
[ 96%] Building C object acados/CMakeFiles/acados.dir/utils/print.c.obj
C:/Users/Kn/Documents/GitLab/acados/acados/utils/print.c:563:13: warning: 'int_print_mat_to_file' defined but not used [-Wunused-function]
563 | static void int_print_mat_to_file(FILE *file, int row, int col, int *A, int lda)
| ^~~~~~~~~~~~~~~~~~~~~
[ 97%] Building C object acados/CMakeFiles/acados.dir/utils/timing.c.obj
[ 98%] Building C object acados/CMakeFiles/acados.dir/__/interfaces/acados_c/ocp_nlp_interface.c.obj
[ 99%] Building C object acados/CMakeFiles/acados.dir/__/interfaces/acados_c/ocp_qp_interface.c.obj
[ 99%] Building C object acados/CMakeFiles/acados.dir/__/interfaces/acados_c/condensing_interface.c.obj
[100%] Building C object acados/CMakeFiles/acados.dir/__/interfaces/acados_c/sim_interface.c.obj
[100%] Linking C static library libacados.a
[100%] Built target acados
cmake --install ./
works fine.
In Simulink I added:
"...\acados\buildDS1403\install\include"
"...\acados\buildDS1403\install\include\blasfeo\include"
"...\acados\buildDS1403\install\include\hpipm\include"
to the āinclude directoriesā and:
"...\acados\buildDS1403\install\lib\libacados.a"
"...\acados\buildDS1403\install\lib\libblasfeo.a"
"...\acados\buildDS1403\install\lib\libhpipm.a"
to the āLibrariesā (ending is .a instead of .lib, for whatever reason).
The source files I added are all files in make_sfun.m
and make_sfun_sim.m
. except for S-functions acados_solver_sfunction_{...}.c
and acados_sim_solver_sfunction_{...}.c
, because in this topic Building Issue ConfigurationDesk 2022-A - #3 by soeren it was mentioned that they should not be added.
When I build the Simulink model in ConfigurationDesk I receive the following error:
Making library "dSPACE_HyFCD_MPC.a" finished
Creating application image file ...
C:/Program Files/Common Files/dSPACE/CFD Compiler 24.1/target/arm-linux-gnueabihf/bin/../lib/gcc/arm-linux-gnueabihf/13.2.0/../../../../arm-linux-gnueabihf/bin/ld.exe: C:\Users\Kn\Documents\GitLab\acados\buildDS1403\install\lib\libacados.a(dense_qp_hpipm.c.obj): in function `dense_qp_hpipm':
dense_qp_hpipm.c:(.text+0x2cc): undefined reference to `d_print_exp_tran_mat'
C:/Program Files/Common Files/dSPACE/CFD Compiler 24.1/target/arm-linux-gnueabihf/bin/../lib/gcc/arm-linux-gnueabihf/13.2.0/../../../../arm-linux-gnueabihf/bin/ld.exe: C:\Users\Kn\Documents\GitLab\acados\buildDS1403\install\lib\libacados.a(ocp_qp_hpipm.c.obj): in function `ocp_qp_hpipm':
ocp_qp_hpipm.c:(.text+0x32c): undefined reference to `d_print_exp_tran_mat'
collect2.exe: error: ld returned 1 exit status
OPUS MAKE: Shell line exit status 1. Stop.
The make phase failed for the following application process: dSPACE_HyFCD_MPC.
==== Build Summary =============================================================
Application process Build time Status
--------------------------------------------------------------------------------
dSPACE_HyFCD_MPC 00:00:06 Failed
--------------------------------------------------------------------------------
TOTAL 00:00:03 FAILED
--------------------------------------------------------------------------------
==== Build process aborted =====================================================
This might have something to do with the warning I receive during the Cmake build process
warning: implicit declaration of function 'd_print_exp_tran_mat' [-Wimplicit-function-declaration]
329 | d_print_exp_tran_mat(stat_m, mem->iter+1, stat, stat_m);
because in both d_print_exp_tran_mat
is mentioned.
Thanks for the support.
Jannis