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

Keil uVision3 keeps loosing compiler/linker cmdline options

Hello,

I am using Keil uVision 3.x to develop code for ST's ARM9 processor. In the uVision's Project->Options for 'target" window, the "C/C++" Tab, I have an option --feedback "myfile.fed". This option tells the compiler to generate file myfile.fed. In the "Linker" Tab, I have the same option as for the compiler, but to read the file. This --feedback option is to inform the compiler and the linker to share the myfile.fed for reducing memory space of unused code.

However, when I do a "build clean", the tool will delete that file and the uVision will sense the missing of the file and remove the option. I must use the option in order for my code to fit in the memory.

Does anyone have similar experience or knowledge on how to fix the problem, I would very grateful.

(FYI, I can manually copy the file back to the folder to cheat on uVision and it works. But I prefer a real fix.)

I noticed that the "Compiler control string" window in the C/C++ tab is not modifiable directly. But can not find a place where I can configure it. Please help.

Thanks a lot.

Jianbai

  • Hello,

    Not sure if this feature is present on your toolchain - v3.x long predates me (current version is 5.28), but you could implement a post build step (Project Options -> User tab) to copy the linker outputted feedback file to a "safe" location, and then use this as the input to the compiler.

    Modifying the compiler control string would be done in the Misc Controls window (again, not sure what is present in 3.x).

    Regards

    Ronan

  • Not sure if this feature is present on your toolchain

    This ancient App Note has some screenshots from uVision-2:

    http://www.keil.com/appnotes/files/apnt_159.pdf

    page 4 shows that post-build steps were available then, so I'd be pretty sure they did persist into uVision-3 ...

    As both the tool and the Target are really ancient, it seems odd to be just reporting this now! Surely, it must be a legacy project - so how did the previous generations of developers & maintainers manage this?

  • when I do a "build clean", the tool will delete that file

    That would be intended behaviour - a "clean" build should remove all dependencies on previous builds.

    uVision will sense the missing of the file and remove the option.

    Really?!

    That doesn't sound right!

    I'd expect an error message saying that the file could not be found - but that shouldn't cause uVision to modify the project settings!

    I prefer a real fix

    You're not going to get any fixes for such an ancient version!

    A workaround would be to just not use the uVision 'Build Clean'. Instead, write yourself a .bat file which cleans your build output folder(s) - and puts a "dummy" feedback file in place.

    You could run that .bat file from the uVision 'Tools' menu.

  • Thanks to both Ronan and Andy. It's been a while since I last posted this question and I owe you guys a big "thank you".

    I fixed problem using Ronan's suggestion - writing a inter-pass (post-compile, before linking) script. I would like to think that the toolschain should be smart enough that this step is unnecessary.