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.
> I have single target in my project
So make a second one, for debug. Done.
How can I make both targets to share same source code? Manually adding the same source code to both targets wouldn't be comfortable...
Suffice it to say that there's a reason I wrote "make a new target", not "make a new project."
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.
View all questions in Keil forum