cancel
Showing results for 
Search instead for 
Did you mean: 

Hi, can anyone tell me how I can make HAL functions highlighted in bold purple?

LHuan.4
Associate II

I checked syntax coloring and it will highlight external SDK function in bold purple. But when I created my own project, these HAL functions are not highlighted in bold purple as shown in ST example projects. You may see the difference below.

0693W00000YADd7QAH.jpg0693W00000YADdHQAX.jpgMany thanks if detailed steps are provided. I searched and found similar questions, but the answer is quite general regarding syntax coloring but didn't show how to make HAL functions in my own project highlighted.

Best,

Leon

1 ACCEPTED SOLUTION

Accepted Solutions
mattias norlander
ST Employee

Hi Leon,

Your observation is correct. Below is a screenshot that explains the work-around:

0693W00000YAFi9QAH.pngNotice that you are able to customize the color and style syntaxing for different "elements".

There is a difference between Functions and External SDK calls elements...

  • When you create a new projects: All code (HAL included) is copied into the project. Making a call to an HAL function means the syntax coloring will rely on the Functions element.

  • When you import a project: Most of the code (HAL for example) is linked into the project. HAL is thereby treated as an External SDK calls element.

Root-cause of the difference: Project structure difference in examples vs created projects.

View solution in original post

2 REPLIES 2
mattias norlander
ST Employee

Hi Leon,

Your observation is correct. Below is a screenshot that explains the work-around:

0693W00000YAFi9QAH.pngNotice that you are able to customize the color and style syntaxing for different "elements".

There is a difference between Functions and External SDK calls elements...

  • When you create a new projects: All code (HAL included) is copied into the project. Making a call to an HAL function means the syntax coloring will rely on the Functions element.

  • When you import a project: Most of the code (HAL for example) is linked into the project. HAL is thereby treated as an External SDK calls element.

Root-cause of the difference: Project structure difference in examples vs created projects.

Thanks a lot for the detailed explanation, Mattias. Finally can get the thing off my head :D