leomar01 8 Posted July 7, 2014 Share Posted July 7, 2014 Hi there, I'm in the process of developing some wireless system. I want to have more than one transmitter - behaving just a little bit different from each other. Using Code Composer Studio I've discovered the ability to have different "build configurations". I made three different "main.c" files: main_transmitter1.c main_transmitter2.c main_transmitter3.c In build config 1 the second and third are excluded from build. In build config 2 the first and third are excluded... I think you get it. Now my question: To configure the peripherals I used Grace. Now I have a new idea where I need to change some of that Grace configuration in transmitter1 but not in the others. Is there a possibility to make the Grace config dependent of the current build config? Regards, Leo Quote Link to post Share on other sites
roadrunner84 466 Posted July 7, 2014 Share Posted July 7, 2014 Uhm... yes... include two separate Grace configurations in your project. Alternatively, use a single Grace configuration and manually override it for the different configuration. leomar01 1 Quote Link to post Share on other sites
leomar01 8 Posted July 7, 2014 Author Share Posted July 7, 2014 I didn't know the grace config only depends on the raw text in that single cfg file, thanks @@roadrunner84 :-) I just copied the default main.cfg and renamed the second file. How does CCS determine what cfg file to use (when renamed)? Or does it just use the first *.cfg file it finds? Quote Link to post Share on other sites
roadrunner84 466 Posted July 8, 2014 Share Posted July 8, 2014 Well... I don't know But you do know which function is to be called to init the Grace configuration, could you look into that and see what's actually happening? Quote Link to post Share on other sites
leomar01 8 Posted July 8, 2014 Author Share Posted July 8, 2014 It executes the c-files that are being generated out of the grace.cfg during the compile process. Looking through the project settings I can't find where this gets done during compiling... Quote Link to post Share on other sites
Fred 453 Posted July 8, 2014 Share Posted July 8, 2014 I like Grace - it's a real time saver when you jump to a device and want to get peripherals set up quickly. However, once it has done its work, you have C code that you can do what you like with. Why not take the relevant code that Grace has generated and move it to wherever suits you? This will mean a manual step if you run Grace again, but I find it's not something you need to do once you're done with the initial configuration work. The other alternative is to put custom code in the Grace-generated files between the "your code goes here" comments. This may or may not be able to do what you need but it's worth considering. Quote Link to post Share on other sites
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.