The problem likely is that the standard register maps in Codewarrior are using bit field types of uint8_t which is implementation-defined and non-portable.
If you are writing portable code, bit fields cannot be used, they are non-portable, useless, superfluous crap. This is true for any C language compiler. The following is not specified by the standard:
- whether bit field int is treated as signed or unsigned int
- the bit order (lsb is where?)
- whether the bit field can reach past the memory alignment of the CPU or not
- the alignment of non-bit field members of the struct
- the memory alignment of bit fields (to the left or to the right?)
- the endianess of bit fields larger than one byte
- whether plain int values assigned to them are interpreted as signed or unsigned
- how bit fields are promoted implicitly by the integer promotions
- whether signed bit fields are one’s compliment or two’s compliment
- padding bytes
- padding bits
- values of padding bits.
- and so on.
Feel free to send a service request to Freescale and ask them why they can't deliver C standard compliant, MISRA-compliant, portable headers for the register maps.