Embedded coder 'Generate code only' not including toolbox files
8 次查看(过去 30 天)
显示 更早的评论
I am using the CAN Pack/Unpack blocks from the Embedded Coder toolbox. In my model, I generate C++ using ert.tlc and custom settings.
With 'Generate code only' checked, I generate code but the can_message.h is not in my build directory. The Makefile references the file on the system.
Setting PakNGo the can_message.h file is saved in the .zip file but this doesn't work for me. I don't know how to get can_message.h included with my normal build files in the sharedutils directory.
How do I get system included/required files in my normal build directory, not in the zip folder?
Thanks in advance!
EDIT:
Currently this is what I do in my .m build script with the PakNGo feature enabled. It seems like a setting that should be included somewhere in the configuration.
% Remove the "extracted" files and build from the fully packaged directory
if isfolder('build/CANDecoder')
movefile 'build/CANDecoder/CANDecoder.zip' 'build/CANDecoder.zip'
rmdir('build/CANDecoder','s');
unzip('build/CANDecoder.zip','build/CANDecoder');
fileattrib('build/CANDecoder','+w','','s');
delete('build/CANDecoder.zip');
end
0 个评论
回答(1 个)
Benjamin Thompson
2022-7-13
If you have some other toolchain to compile the source code, you can locate the file in the MATLAB program files folder and include that folder in your compiler include path. Or you can copy it somewhere else in your file system where you want it to be.
2 个评论
Benjamin Thompson
2022-7-14
If you use an M file to build your model, you can add copyfile commands to that in order to place the header files from the Program Files MATLAB folder in the place that you want.
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!