Why is the preprocessor check #if ( UCHAR_MAX != (0xFFU) ) || ( SCHAR_MAX != (0x7F) ) being generated in private.h?
75 ビュー (過去 30 日間)
古いコメントを表示
MathWorks Support Team
2019 年 2 月 25 日
編集済み: MathWorks Support Team
2024 年 2 月 2 日
In the generated code for my model, I have noticed that the following code is generated in the "model_private.h" file:
#if ( UCHAR_MAX != (0xFFU) ) || ( SCHAR_MAX != (0x7F) )
#error Code was generated for compiler with different sized uchar/char. \
Consider adjusting Test hardware word size settings on the \
Hardware Implementation pane to match your compiler word sizes as \
defined in limits.h of the compiler. Alternatively, you can \
select the Test hardware is the same as production hardware option and \
select the Enable portable word sizes option on the Code Generation > \
Verification pane for ERT based targets, which will disable the \
preprocessor word size checks.
#endif
Why is this code being generated?
採用された回答
MathWorks Support Team
2024 年 2 月 2 日
編集済み: MathWorks Support Team
2024 年 2 月 2 日
The above code is being generated because a signal or block with a fixed-point data type is being used in your model. Please refer to the documentation for more details.
Please run the below command in the MALTAB R2018a command window to get the release specific documentation:
web(fullfile(docroot, 'dsp/fixed-point-data-types.html'))
Please follow the below link to search for the required information regarding the current release:
0 件のコメント
その他の回答 (0 件)
参考
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!