applies to both Keil 5 and Keil 6 (Information in this knowledgebase article applies to:)
In Arm Compiler 5, the default size of the wchar_t type is unsigned short, which is two bytes. In Arm Compiler 6, the default size of the wchar_t type is unsigned int, which is four bytes. The difference can be represented by the following default options:
Arm Compiler 5: --wchar16 //unsigned short
Arm Compiler 6: -fno-short-wchar //unsigned int
I'd love to try to compile myself, but unfortunatley I don't have a license for the ARM DS.
The link provided may work or may not, it's just provided as a couteous reference in the hope it help, but I think it is very relevant and worth a try by someone who has a ARM DS license, as far as I remember, a similar issue was solved a few years ago when I did have an ARM compiler license.