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

BUG with build system

I found the bug in uVision v5
1. add a segment of code
#ifdef XYZ
...
#endif

2. make sure there is no preprocessor symbol XYZ
3. save all and rebuild
4. check code size
5. edit preprocessor symbol, add XYZ
6. click BUILD (F7) -> keil figured out that you changed compile options and it's doing what looks like a rebuild and not only build of changed files (showing that it's compiling all c files in project)
7. check code size, it's same as without symbol, the whole block of txt between ifdef XYZ and endif is NOT compiled?!?! - BUG
8. click REBUILD -> the code is now built, the codesize increased

so the rebuild done from build in step6 does not properly work, it's a serious bug :(

Parents
  • 6. click BUILD (F7) -> keil figured out that you changed compile options and it's doing what looks like a rebuild and not only build of changed files (showing that it's compiling all c files in project)

    Doesn't look from your logs to be compiling *all* C file.

    Pretty sure when I change compiler target, or change command line options, I want to be using "Rebuild all target files" so there is no ambiguity about what I expect to happen.

    That sort of rebuild is required on the Linux kernel build, when making subtle changes, which doesn't use Keil at all.

    Keil should perhaps do a better job of marking the entire project as tainted, but then we'd likely see more complaints about it taking longer to build with "minor" changes.

Reply
  • 6. click BUILD (F7) -> keil figured out that you changed compile options and it's doing what looks like a rebuild and not only build of changed files (showing that it's compiling all c files in project)

    Doesn't look from your logs to be compiling *all* C file.

    Pretty sure when I change compiler target, or change command line options, I want to be using "Rebuild all target files" so there is no ambiguity about what I expect to happen.

    That sort of rebuild is required on the Linux kernel build, when making subtle changes, which doesn't use Keil at all.

    Keil should perhaps do a better job of marking the entire project as tainted, but then we'd likely see more complaints about it taking longer to build with "minor" changes.

Children
  • @Westonsupermare Pier, yup not all, as I wrote "..looks like a rebuild..", obviously not a rebuild otherwise it would work as expected :)

    also, yes, I tend to click rebuild whenever I change config (both proj and hardware.h and similar) but it's a trap as you can miss-click (easy done with high res screens if you go for a click instead of f7 on keyb) make and it "looks like a rebuild" as it starts to build bunch of files..

    changes in project properties imo should mark the whole project tainted as really changing compiler preferences etc requires a full rebuild

    @Hans-Bernhard Broeker, I'm *very* unexperienced with Keil (I'm gcc user and vi is my editor of choice and I work on development of system software, database servers, telco backends etc, this is just a hobby and I'm just trying out Keil, gui's like eclipse, visual studio, atmel studio, microchip mplab/mplab-x I havent used for many many years) so what you wrote hides some potentially interesting info, I'd appreciate if you can elaborate or point me to a documentation segment :D.. talking about "source group of the project that most of the files of the project are in --- but main.c is not.". What is a source group and how are they controlled from the project settings? Can they have different compiler options? This is a super basic app - 10 clicks trough stm32cubemx, open project, add 3 lines into main.c compile, edit properties, compile ... no "project settings" made by me nor edited by me.. Why is everything except startup_stm32f407xx.s and main.c part of that "group" that's marked "tainted" after project properties are changed? What group is that, how I change what's in it? Thanks in advance!!

    I still believe this is a bug, not a "serious one" but definitely a bug