Embedded Coder - header file for storage class not generated

3 views (last 30 days)
Hello,
I added following Storage class in the Embedded Code dictionary (see screenshot below) and set this class for model outputs via the Code Mappings - Component interface. When I try to build a code (see code setting screenshot below) there is an error:
Error:C: /.../ MF02_Detect_7000lux_RL_on_ert_rtw/MF02_Detect_7000lux_RL_on.c:19:10: fatal error: StorageClass1_get.h: No such file or directory
So I assume that StorageClass1_get.h is not being generated. Moreover, even when I Generate code (without building), StorageClass1_get functions (see red circrle on the screenshot below) are not generated anywhere.
So may I ask how how to update the setting to build code sucessfully and generate get functions for the model outputs?
Thank you in advance!

Accepted Answer

prabhat kumar sharma
prabhat kumar sharma on 3 Jun 2024
Hi Oldrich,
Here are some steps you can take to troubleshoot and resolve this issue:
  1. Check the Storage Class Configuration: Ensure that the storage class you’ve created is configured to generate get and set functions. You may need to specify the header and source file names in the storage class definition.
  2. Verify Code Mappings: In the Code Mappings - Component interface, confirm that the model outputs are correctly mapped to the storage class you’ve defined.
  3. Check the Build Process: Sometimes, the build process might not include certain steps that generate the necessary files. Make sure that the build process is configured to generate all the required files.
  4. Inspect the Build Directory: Look into the directory where the code is being generated to see if the StorageClass1_get.h file is being created but not placed in the correct location.
You can refer this documentation to create a custom storage class: https://www.mathworks.com/help/ecoder/ug/design-custom-storage-classes-and-memory-sections.html
I hope it helps to resolve your issue!

More Answers (0)

Products


Release

R2023b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!