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

C99 Setting - Strange Behavior in uVision 5

I'm working on a C project on a Windows 10 Pro 18363 and uVision v5.24.2.0 (computer A) targeting an STM32F405 Cortex M4 processor.

I inherited the project from another colleague who developed it on a similar Windows 10 machine, same uVision.

This weekend I brought up another Windows 10 computer, same uVision, and the project failed to compile (computer B)

The error messages were due to the code using C99 features, and C99 wasn't selected in uVision.

Selecting the C99 option eliminated the errors, not surprisingly.

So computer B makes sense, but computer A was a puzzle.  Why was it compiling in C99 mode even though C99 wasn't selected?

After digging into the batch file and the .__i files which uVision creates, I discovered what was happening on Computer A.

  • Toggling the C99 setting in the IDE caused the compiler flag --c99 to be set properly, as expected
  • It also caused a separate user preprocessor variable --C99 to appear, in opposition to the IDE setting!

As far as I know, computers A and B are identical.  

The project code and the uvprojx files are the same, both being pulled from the same git repository.

I compared the uvprojx and didn't see anything to cause this.

The only difference at all is the DFP file, which seems unlikely to be the issue.

  • computer A: v2.13
  • computer B: v2.14

Any idea what could be happening?

Here are two images of main.__i demonstrating the issue:

0