How can I configure Simulink to consider its built-in 'boolean' type to be unsigned int 32 bit?
My scenario is Simulink-only (no code-generation etc), but using utility library blocks that we create using the legacy code tool…
lct_spec.OutputFcnSpec = 'void GetBoolean(uint8 u1[], uint32 u2, uint32 u3, uint32 u4, boolean y1[1])'
On the legacy code side that y1 return-by-reference value uses a boolean typedef that uses a 32-bit representation. This compiles fine, but as one would expect leads to some nasty run-time problems, because presumably the simulink boolean type is mapped to a single byte.
The two things I cannot/don't want to do: – change my legacy code to use an 8-bit boolean type – change my Simulink models to use an AliasType for boolean
I have read the documentation on data type replacement and Simulink.AliasType, but those seem to be only available to solve the problem if the Coder product is involved.
Thank you!
Best Answer