Data Type Support
Texas Instruments C2000™ MCUs support 16-bit and 32-bit data types, but do not support native 8-bit data types. Simulink® models and Embedded Coder® software support many data types, including 8-bit data types.
If you select
uint8 in your
model, your simulation runs with 8-bit data, but in the generated code this data is
represented as 16-bit. This may cause instances where data overflow and wraparound occurs in
the simulation, but not in the generated code.
For example, to make the overflow behavior of the simulation and generated code match for a Simulink Add (Simulink) block in your model, select Saturate on integer overflow in that block.
In C2000 devices, in the generated code,
doubledata type is represented as single precision floating point values (32-bit) when configured with COFF ABI format.
doubledata type is represented as double precision floating point values (64-bit) when configured with ELF ABI format.
This representation results in a difference in data values in the simulation and the generated code. For more information on ABI format selection, refer to the toolchain section in Configuring Additional Options for Code Generation