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.

CCSTUDIO: CCS 20.3.1, Code highlighting with pre defined macro names doesn't work properly

Part Number: CCSTUDIO

Hi folks,

I was trying out some DSP functions and noticed that code highlighting with pre defined macro names doesn't work properly. First I though my DSP(TMU) setup (tmu on, fpu32, float relaxed) was not right and further tested. My code worked with CCS Theia 1.5.1, but doesn't seem to work with CCS 20.3.1 (Theia based) at first.

But after further testing disassambly shows the expected code lines, so DSP is working (but not the highlighting)!

Sadly, I found nohing (expect 8 year old posts) on the fly regarding this topic in this forum. So, if you stumble over my thread, don't get confused like myself.

image.png

image.png

Table 2-30 Predefined C28x Macro Names

Macro Name Description
__DATE__(1) Expands to the compilation date in the form mmm dd yyyy
__FILE__(1) Expands to the current source filename
__LINE__(1) Expands to the current line number
__little_endian__ Always defined to 1.
__PTRDIFF_T_TYPE__ Set to the type of ptrdiff_t.
__SIZE_T_TYPE__ Set to the type of size_t.
__STDC__(1) Defined to 1 to indicate that compiler conforms to ISO C Standard. See Section 6.1 for exceptions to ISO C conformance.
__STDC_VERSION__ C standard macro.
__STDC_HOSTED__ C standard macro. Always defined to 1.
__STDC_NO_THREADS__ C standard macro. Always defined to 1.
__TI_COMPILER_VERSION__ Defined to a 7-9 digit integer, depending on if X has 1, 2, or 3 digits. The number does not contain a decimal. For example, version 3.2.1 is represented as 3002001. The leading zeros are dropped to prevent the number being interpreted as an octal.
__TI_EABI__ Defined to 1 if --abi=eabi is used.
__TI_GNU_ATTRIBUTE_SUPPORT__ Defined to 1 if GCC extensions are enabled (which is the default)
__TI_STRICT_ANSI_MODE__ Defined to 1 if strict ANSI/ISO mode is enabled (the --strict_ansi option is used); otherwise, it is defined as 0.
__TI_STRICT_FP_MODE__ Defined to 1 if --fp_mode=strict is used (default); otherwise, it is defined as 0.
__TIME__(1) Expands to the compilation time in the form "hh:mm:ss"
__TMS320C2000__ Defined for C28x processor
__TMS320C28XX__ Defined if target is C28x
__TMS320C28XX_CLA__ Defined to 1 if any --cla_support option was used and the source file is a .cla file.
__TMS320C28XX_CLA0__ Defined to 1 if the --cla_support=cla0 option was used and the source file is a .cla file.
__TMS320C28XX_CLA1__ Defined to 1 if the --cla_support=cla1 option was used and the source file is a .cla file.
__TMS320C28XX_CLA2__ Defined to 1 if the --cla_support=cla2 option was used and the source file is a .cla file.
__TMS320C28XX_FPU32__ Defined to 1 if either the --float_support=fpu32 or fpu64 option was used.
__TMS320C28XX_FPU64__ Defined to 1 if the --float_support=fpu64 option was used.
__TMS320C28XX_IDIV__ Defined to 1 if the --idiv_support=idiv0 option was used.
__TMS320C28XX_TMU__ Defined to 1 if the --tmu_support option was used with any setting.
__TMS320C28XX_TMU0__ Defined to 1 if the --tmu_support option was used with any setting.
__TMS320C28XX_TMU1__ Defined to 1 if the --tmu_support=tmu1 option was used.
__TMS320C28XX_VCU0__ Defined to 1 if the --vcu_support option was used with any setting.
__TMS320C28XX_VCU2__ Defined to 1 if the --vcu_support=vcu2 option was used.
__TMS320C28XX_VCRC__ Defined to 1 if the --vcu_support=vcrc option was used.
__WCHAR_T_TYPE__ Set to the type of wchar_t.
_INLINE Expands to 1 if optimization is used (--opt_level or -O option); undefined otherwise.
(1) Specified by the ISO standard

 

CCS Details (Theia based)

Version: 20.3.1.5__1.9.1

Default VS Code API: 1.96.0

VS Code Compatibility

List of extensions

  • @ccs/ccstudio 20.3.0
  • @ccs/ccstudio-debug 20.3.0
  • @ccs/ccstudio-getting-started 20.3.0
  • @ccs/ccstudio-guicomposer 20.3.0
  • @ccs/ccstudio-plugin 20.3.0
  • @ccs/ccstudio-project 20.3.0
  • @ccs/ccstudio-support 20.3.0
  • @ccs/ccstudio-trace-config 20.3.0
  • @ccs/ccstudio-trace-viewer 20.3.0
  • @ccs/ccstudio-updater 20.3.0
  • @theia/ai-anthropic 1.58.4
  • @theia/ai-chat 1.58.4
  • @theia/ai-chat-ui 1.58.4
  • @theia/ai-code-completion 1.58.4
  • @theia/ai-core 1.58.4
  • @theia/ai-history 1.58.4
  • @theia/ai-huggingface 1.58.4
  • @theia/ai-llamafile 1.58.4
  • @theia/ai-mcp 1.58.4
  • @theia/ai-ollama 1.58.4
  • @theia/ai-openai 1.58.4
  • @theia/ai-scanoss 1.58.4
  • @theia/ai-terminal 1.58.4
  • @theia/ai-workspace-agent 1.58.4
  • @theia/bulk-edit 1.58.4
  • @theia/callhierarchy 1.58.4
  • @theia/collaboration 1.58.4
  • @theia/console 1.58.4
  • @theia/core 1.58.4
  • @theia/debug 1.58.4
  • @theia/dev-container 1.58.4
  • @theia/editor 1.58.4
  • @theia/editor-preview 1.58.4
  • @theia/electron 1.58.4
  • @theia/external-terminal 1.58.4
  • @theia/file-search 1.58.4
  • @theia/filesystem 1.58.4
  • @theia/keymaps 1.58.4
  • @theia/markers 1.58.4
  • @theia/messages 1.58.4
  • @theia/metrics 1.58.4
  • @theia/mini-browser 1.58.4
  • @theia/monaco 1.58.4
  • @theia/navigator 1.58.4
  • @theia/notebook 1.58.4
  • @theia/outline-view 1.58.4
  • @theia/output 1.58.4
  • @theia/plugin-dev 1.58.4
  • @theia/plugin-ext 1.58.4
  • @theia/plugin-ext-headless 1.58.4
  • @theia/plugin-ext-vscode 1.58.4
  • @theia/preferences 1.58.4
  • @theia/preview 1.58.4
  • @theia/process 1.58.4
  • @theia/property-view 1.58.4
  • @theia/remote 1.58.4
  • @theia/scanoss 1.58.4
  • @theia/scm 1.58.4
  • @theia/scm-extra 1.58.4
  • @theia/search-in-workspace 1.58.4
  • @theia/secondary-window 1.58.4
  • @theia/task 1.58.4
  • @theia/terminal 1.58.4
  • @theia/test 1.58.4
  • @theia/timeline 1.58.4
  • @theia/toolbar 1.58.4
  • @theia/typehierarchy 1.58.4
  • @theia/userstorage 1.58.4
  • @theia/variable-resolver 1.58.4
  • @theia/vsx-registry 1.58.4
  • @theia/workspace 1.58.4
 
With best regards,
 
Martin
  • Hi Martin,

    My code worked with CCS Theia 1.5.1, but doesn't seem to work with CCS 20.3.1 (Theia based) at first.

    Are you saying that the code highlighting worked in CCS Theia 1.5.1 but not CCS 20.3.1? Or did you just mean that you were trying to troubleshoot why your code is not working in 20.3.1 and this code highlighting issue led you astray?

    I ask because I see the same exact issue in CCS Theia 1.5.1 and CCS 20.3.1.

    Thanks

    ki

  • Hi Ki,

    first thanks for checking and verfing the issue.

    "Are you saying that the code highlighting worked in CCS Theia 1.5.1 but not CCS 20.3.1?

    I ask because I see the same exact issue in CCS Theia 1.5.1 and CCS 20.3.1."

    "Or did you just mean that you were trying to troubleshoot why your code is not working in 20.3.1 and this code highlighting issue led you astray?"

    Second, you got me there, which made me thinking. So I checked once more with 1.5.1 Theia, and I can confirm, code highlighting doesn´t work there either with with pre defined macro names. To be honest, on Theia 1.5.1 i just tried out a simple "__sqrtf()" instruction, glanced at the headers and thought the pre defined macros are working there. Then a colleague told me about CCS 20.3.1, installed and I switched to this IDE. There I tried if "sinf()" will be replaced with the TMU provided "__releaxed_sinf()". I added the #ifdef __TMS320C28XX_TMU__ around the sinf(). Thought at first my TMU setup was wrong and then tried out different things. The #warning TMU detected confirmerd it for me, TMU is working and something must be wrong with code highlighting.

    In short: I was troubleshooting why my code seemed to be not working (Side note: Set optimization to 3 - Interprocedure and 5 - Speed made it more confusing too... my bad) and a not working code highlighting just made it more confusing.

    Nevertheless, I´m now using 20.3.1 and the TMU ist working, but it would be nice if this issue could be fixed in the future.

    Also I wanted to create this post, so someone with the same problem, can find a quick Google answer. ;-)

    With best regards, Martin

  • Nevertheless, I´m now using 20.3.1 and the TMU ist working, but it would be nice if this issue could be fixed in the future.

    I am pretty sure this is a known issue with a plan to fix. I'll need to confirm this.

  • I am pretty sure this is a known issue with a plan to fix. I'll need to confirm this.

    The are a few known issues with the syntax highlighting, including this one. We are looking to address in a future release.