This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

how to add a *.cfg file into a normal project?

Hi:

I have build a normal project without BIOS, and now I want build it with OS; So I add a *.cfg file into this project. but the compiler cann't recognize this file, and it is still build just like without the *.cfg file. what I can do next?

thank you very much!

Best Regards!

 

  • King,

    I think the easiest thing for you to do is to pick one of the SYS/BIOS example templates and then build and run the example.  Then go back to the project and remove the .c file, and add in your non-BIOS .c file.  And add a call to BIOS_start() at the end of main().  You’ll likely need to make other changes too, like moving some code to a Task, for example.  But you’ll have all the necessary elements and settings in place for a SYS/BIOS project first, and then can then modify the configuration as necessary for your application.

    Scott

  • Scott:

    thank you for your answer. I agree that it can work, but it is not the way I want.

    you konw, configurating a SYS/BIOS is very complex, the thing I want to do is that if I configure a SYS/BIOS file as a module, and then I can use the module to other projects. that means I don't need to modify any other .cfg file. do you konw whether it is possible?

    thank you very much!

    King

  • King,

    Yes, there are a lot of settings to get a SYS/BIOS project setup properly, that is why it is much easier to start with one of the example templates.

    Yes, it is possible (and common) to define a SYS/BIOS configuration in a .cfg file, and then use that file on multiple projects.  Once you have a .cfg file setup as you want it, you can simply copy and use that in other projects.  

    A couple of the SYS/BIOS examples ("Typical (with separate config project)" and "Task Mutex Example (separate config project)") show an additional method, where there is separate project (a “configuration project”) that is referenced (and maybe shared) for configuration settings.

    Scott

  • Scott:

    thank you for your advice. I understand that I need create a new project with RTSC and then copy my *.cfg file and source code into this project, then I can build and run.

    thank you very much!

    King