Clear Filters
Clear Filters

Mex compilation : How to set legacy_code endianness ?

2 views (last 30 days)
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) ?

Answers (0)

Categories

Find more on Troubleshooting in MATLAB Compiler SDK in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!