This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

How to set the proper execution (target) character set for TMS320F28xxx?

Hello All,

 

The "TMS320C28x Optimizing C/C++ Compiler v5.0.0" User's Guide (SPRU514C) states on page 80 the following: "The source (host) and execution (target) character sets are assumed to be ASCII. There are no multibyte characters. (ANSI/ISO 2.2.1, K&R A12.1)". This is a clear statement. The K&R A12.1 page adds that the character set is contained within seven-bit ASCII, but is a superset of the ISO646-1983 Invariant Code Set. It says: "In order to enable programs to be represented in the reduced set, all occurences of the trigraph sequences are replaced by the corresponding single character. This replacement occurs before any other processing".

And if I am properly informed, TI uses the ISO8859 ASCII character set for this. But, I would like to be able to set-up a different ASCII character set to be used by the compiler/assembler for generating TMS320F28xxx code. The currently generated "translations" from text-files inputted as strings to 7/8-bit ASCII numbers do not match with the ASCII character accepting LCD device I hooked up to my target. My question applies to the execution (target) character set only...

  • Does anybody know if it's at all possible to change the character set used for generating code on the target?
  • If yes, how to change the character set used by the compiler/assembler?

 

Looking forward to all suggestions....

 

Best regards, Johan.

  • PE1PUP said:
    Does anybody know if it's at all possible to change the character set used for generating code on the target?

    I don't think so.  But I have asked other experts to take a look.

    Thanks and regards,

    -George

  • What stated in the SPRU514C is a defensive statement and it is correct.

    On the host side, you have to use the standard ASCII set characters for your identifier and all other input characters. (0x0-0x7F)

    On the target side, we also assume you have a standard ASCII character set to guarantee that our RTS library can be executed correctly.(0x0-0x7)

    TI compiler does not support wchar although the header files are provided. The wchar is treated the same as single byte char.

    However, you can write comments in the source code in whatever character set you want. That's a different story.

    Even our compiler does not support wchar, I saw cases that simple wchar constant string got passed from compiler to the assembly code without any problem. In your case, I think your host character set and your target character set may not be the same. So what you input in your source code, even the compiler does not change it, got mapped to a different character on your target. You can confirm this by double check the input character value and make sure on your target it points to the same character.

     

  • Hello Wei and George,

     

    Thank you very much for these answers. I'll give the wchar (possible) solution a go, and any findings I'll report back here on this E2E forum page.

     

    Best regards, Johan.