Dear acados developers,
I am currently working on porting Acados (with the hpipm solver) to the RK2206 (Cortex-M4) platform running OpenHarmonyOS 3.0-LTS LiteOS-M. The compilation and linking processes have been successful, but the system crashes when running the ocp_qp.c example. Below are the detailed information:
-
Target Platform: RK2206 (Cortex-M4), OpenHarmonyOS 3.0-LTS LiteOS-M
-
Problem: when running ocp_qp.c. The fault address is 0xabababab, indicating an access to uninitialized memory
-
Limitation: OpenHarmonyOS 3.0-LTS LiteOS-M does not support calloc and only supports malloc.
Memory Allocation Logs:
-
Size of dims structure: zu bytes → Suspected format string error (%zu not supported).
-
Config memory size: 0.21 KB → The allocated memory size is small, but the crash may be caused by uninitialized memory.
My question:
-
What is the cause for the error? Our team suspect the memory initialization issue.
-
Is it possible to replace calloc with malloc plus manual initialization in Acados? If so, how to do this in a systematic way? (probably modifying the utils/mem.c ?)
-
Should the same modification apply to HPIPM?
Thank you so much in advance.
Best regards,
Yutao