2022-09-02 03:59 AM
Hello!
I'm having the exact same issue than the one described here: https://community.st.com/s/question/0D53W00001YbCCCSA3/invalid-initializer-and-initializer-element-is-not-constant-errors-in-stmcubeai?t=1662110397892
Wrapping ai_network_params inside a function didn't solve the issue, and also it doesn't make much sense.
OP suggests to adjust settings for the compiler and linker. Anyone can give some guidelines on how to do this properly without breaking anything, or knows any workaround?
Thank you in advance
Regards!
Solved! Go to Solution.
2022-09-03 02:42 PM
My problem solved when I modified the error occurrences in sin_model.h from this:
AI_DEPRECATED
#define AI_SIN_MODEL_IN \
ai_sin_model_inputs_get(AI_HANDLE_NULL, NULL)
to this:
AI_DEPRECATED
#define AI_SIN_MODEL_IN { \
{ai_sin_model_inputs_get(AI_HANDLE_NULL, NULL)} \
}
Occurrences were on lines 38-41 and 55-58
2022-09-03 02:42 PM
My problem solved when I modified the error occurrences in sin_model.h from this:
AI_DEPRECATED
#define AI_SIN_MODEL_IN \
ai_sin_model_inputs_get(AI_HANDLE_NULL, NULL)
to this:
AI_DEPRECATED
#define AI_SIN_MODEL_IN { \
{ai_sin_model_inputs_get(AI_HANDLE_NULL, NULL)} \
}
Occurrences were on lines 38-41 and 55-58
2022-09-06 02:46 AM
This removed the compiling error, but still the code does not work.
2023-02-28 08:34 AM
X-CUBE-AI 7.0 code example doesn't work with later versions. In my case 7.3.0.
Completely disregard example code for 7.0 version and use code from ST example: "How to perform motion sensing on STM32L4 IoTnode".
Section 6: "Create an STM32Cube.AI application using X-CUBE-AI".
2024-06-13 03:10 AM
solved for me. thanks