How can one create debug/release configuration in Keil uVision 5.14? I have single target in my project and I want to easily switch compiler optimization, pin mappings on my MCU etc by switching between debug and release configuration.
Sorry, my mistake. However, I have another issue with targets: My project has many preprocessor include paths, defines and compiler options. There is no problem if I have single target project, however with multi-target project - if I want to add e.g. new preprocessor include path, do I have to add it to every single target my project contains manually?
One thing to consider when playing with exotic directory trees is to have a master include file.
some_file.c:
... #include "global.h" ...
global.h
... #include "../lib/zlib/zconf.h" #include "../lib/zlib/zlib.h" #include "../lib/ssl-1.0.1i/bio.h" #include "../lib/ssl-1.0.1i/ssl.h" #include "../lib/ssl-1.0.1i/err.h" #include "../lib/jansson/v2.7/jansson.h" ...
You use Keil uVision 5.14.
I use Keil uVision 4.79 and I have a problem with it.
I need to return the value from a dynamic object to more than one different place but I can't see a way to do it with the version I have.
I have to wait for a whole sensor packet to be read serially, then passed into an array of 123 elements, then that array can be read for the necessary bit. I thought I could use this whole class and object thing to put the array in place, use a getSensor() thing to just return the value needed so the program doesn't bother wasting time polling stuff I'm not going to use at the moment.
Can you do it with Keil uVision 5.14
The sky is the limit.
You can do object-oriented programming in C.
You most definitely can do it in C++.
You can encapsulate and work with methods as much as you like.
In the end, your skills and the amount of time and processing resources will be the limiting factors (assuming you have a full license, so the compiler isn't codesize-limited).
But the biggest question here is why you do not start your own thread and instead jump into a thread that debates how best to configure a project for supporting different builds for debug and release.
if I want to add e.g. new preprocessor include path, do I have to add it to every single target my project contains manually?
I'm afraid you will. But at two targets that's surely a manageable amount of extra effort. After all the whole point of having multiple targets is that they can have different configurations. The price you pay for that is that they will have different configurations, and it's up to you to make them the same where you need them to be.
Now more modern IDEs like Eclipse go to great lengths to distinguish between settings that are synchronized between different build targets, and those which have been split up. That's a powerful feature, but it does also make those IDEs a good deal harder to use. Keil kept uVision simpler than that.
As far as having a great many include paths is concerned, it can be easier to just collect them all into a much smaller set of directories, possibly just a single one.
Thank you. That's all I wanted to know.