This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

uVision2 - Content of C51.ini

Hello,

As far as I understand, the content of the file C51.ini is used to determine:

1. the kind of color of the keywords.
Under the section [Colors], depending on the extension of the filename (.h, .c, .cpp, ...), the color is given in (most probably?) the RGB format.

2. the keywords.
Under the section [Keywords], the keywords are given to be taken into account for coloring for a certain file extension

Problems/Questions:

1. When I change the RGB value of whatever file extension given in the [Colors] section, the color in uVision2 does not change when I re-open the application. Should this not affect the color highlighting?

2. Depending on the file extension, the keywords to be colored can be defined. However, when I use for example the word new in a plain .c file, it is colored in blue, despite the fact that the definition in the C51.ini file is new=CPP. Does this mean that the .c file extention is a subset of .cpp wrt keyword coloring?

Rgds,

Geert

  • In uVision2, select Options from the View menu. Then, click on colors and fonts to change the colors for syntax highlighting.

    Jon

  • 2. Depending on the file extension, the keywords to be colored can be defined. However, when I use for example the word new in a plain .c file, it is colored in blue, despite the fact that the definition in the C51.ini file is new=CPP. Does this mean that the .c file extention is a subset of .cpp wrt keyword coloring?

    uVision2 works with compilers for the 8051, 251, 166, and ARM7. It supports only the C compiler for the 8051, the C compiler for the 251, and C and C++ compilers for the ARM7. The specified file extension has no meaning for keywords specified for 8051 and 251.

    These INI files are not intended for user-modification and any changes you make will likely be overwritten by updates or ignored entirely in future releases.

    Jon

  • C51.INI has been discussed here before - use the search.

    As I've said before, it'd be really useful if uVision's syntax colouring could distinguish between ANSI-standard keyords, and Keil-specific extensions.

    CodeWright can do this.