SPRAD88A march 2023 – april 2023 TMS320C28341 , TMS320C28342 , TMS320C28343 , TMS320C28343-Q1 , TMS320C28344 , TMS320C28345 , TMS320C28346 , TMS320C28346-Q1 , TMS320F28P550SJ , TMS320F28P559SJ-Q1
In C28x CPU-based projects, 8-bit data types are not supported. char is 16 bits wide and the types uint8_t and int8_t are not defined by the C28x compiler. C2000Ware remaps these to uint16_t and int16_t data types. For more details on the data types, see the TMS320C28x Optimizing C/C++ Compiler v22.6.0.LTS User's Guide.
However, the C28x compiler provides intrinsic __byte() for byte accesses. For more details, see the https://software-dl.ti.com/ccs/esd/documents/c2000_byte-accesses-with-the-c28x-cpu.html.
Example:
struct
{
uint8_t a;
uint8_t b;
uint16_t c;
} myStruct;
In an Arm device, the size of myStruct would be 8 + 8 + 16 = 32 bits. Whereas, in C28x, the size would be 16 + 16 + 16 = 48 bits.
Example:
uint8_t a = 0xFF;
a += 1;
if (a == 0)
{
//Condition is true for Arm and false for C28x
}