Mex compilation : How to set legacy_code endianness ?

조회 수: 1 (최근 30일)
Franck Yin
Franck Yin 2017년 9월 7일
편집: Franck Yin 2017년 9월 7일
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