Mex compilation : How to set legacy_code endianness ?

1 次查看(过去 30 天)
I'm using Simulink for a model that builds data for a CAN protocol, reusing a working applicative C code which are stored in the C code (imported using legacy_code) in a bitfield structure.
The problem is the endianness of the mex compiler (I'm using Windows SDK 7.1) is set to the opposite of what I want, thus every field and bitfield is in the reverse order in the CAN data.
Swapping the fields' declaration order is not an option because some fields are arrays and in those, the data will still be flipped after field order swapping.
I've also looked into my mex options file, named mex_C_win64.xml in my case and into the legacy_code('generate',XXX) compiler options but to no success.
How can I set the endianness of the mex compiler (Windows SDK 7.1) ?

回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Troubleshooting in MATLAB Compiler SDK 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by