I have a nmpc in matlab simulink workign and simulating just fine. Now i want to generate C code to run it on a dSpace board (CP1104).
The problem is that code generation always fails as it can’t find or open some source file.
I tried editing nmpc_cl_stc_v3_HW_usr.mk to include all the folders of the various source files that are reported to be unable to be found or opend, but that just shifts it to another file that can’t be opened or didnt do anything.
I tried to manually add #include “acados/utils/types.h” to the sfunction c code in response to the errors but that led down a rabbit hole adding so many lines to no avail, which will all be automatically erased once i run my
one time it can’t find print.h, then can’t find the declarationof modf from math.h, or not find some function from a hpipm file, now like in this instance types.h in the same folder as math.h.
the error message in Simulink diagnostic viewer always looks like a variation of this:
... COMPILING "nmpc_cl_stc_v3_HW.c" (F) C0005; "C:\acados_master\acados\utils\math.h", line 41 pos 32; could not open source file "acados/utils/types.h" #include "acados/utils/types.h" ^ COMPILING FAILED (1) MAKE PROCESS ABORTED
Did anyone encounter something like this?
Thanks in advance for giving my issue a read