error: pointer value used where a floating-point was expected
18 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Hello,
I'm using Simulink Embedded Coder to generate C code from my model to be deployed on an STM32 Nucleo-H753ZI board via the STM32CubeIDE. I've attached the Simulink Configuration file I have been using below.
Shown in Simulink_Implementation.png is a function in Simulink that is fed with inputs from a non-virtual bus. Generated_Code.png shows this function in the generated C file. For some reason, input variables that are not arrays are being specified as pointers. The code generates without error in Simulink but when I then attempt to build and deploy this to the board in the STM32CubeIDE I get the error shown in STM32CubeIDE_Error.png.
Does anyone know what is causing this difference between single values and arrays in the function inputs in the generated code? Is it a setting in my configuration file or the way I have implemented the model? I would appreciate any help people can provide!
0 Kommentare
Antworten (1)
Pratyush
am 20 Aug. 2024
Hi Ben,
When generating C code from Simulink models using Embedded Coder for deployment on an STM32 board, inputs may appear as pointers due to configuration settings or model implementation. To address this:
1. Configuration Parameters:
- Check Code Interface settings to ensure inputs are passed correctly.
- Verify data types and signal attributes.
- Review Optimization settings that might affect input representation.
2. Model Implementation:
- Ensure non-virtual buses are defined correctly.
- Use Signal Conversion blocks if needed.
- Verify function block configurations.
3. STM32CubeIDE Debugging:
- Review compiler settings and error messages.
- Simplify the model to isolate issues.
I hope this could help you resolve issues with input representation in the generated code.
0 Kommentare
Siehe auch
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!