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- & GNU-based Targets in Same Project?

There's something I'm not clear on ... is it possible to have both a Keil Tools-based target and a GNU Tools-based target in the same project?

I tried it, and it seems that because of the substantially different Startup.s for Keil vs GNU, it's not possible to do this.

E.g. I had a project with only a Keil-based target. In this project I created a new / additional target for use with GNU. Building the GNU target failed because of lots of syntax errors in Startup.s (which came from a Keil project, of course). So In the GNU target, I removed Startup.s and replaced it with the one from the GNU Blinky, so that it would build under GNU. But now it fails under Keil because of the same problem ...

Are the files in the filelist always the same across all of the targets? I.e. a project's filelist is not target-specific?

Thanks,

  • "Are the files in the filelist always the same across all of the targets? I.e. a project's filelist is not target-specific?"

    The file list is the same across all Targets in the Project, but you can set/clear the 'Include In Build' option on a per-Target basis.
    That oughta do it?

  • I hadn't noticed the "Include in Target Build" options -- thanks.

    But it doesn't work in the sense that uVision won't allow two identical filenames (never mind that they're in different directories) to coexist in the same project, even if they are mutually excluded from the various target builds ...

    Also, I doubt the Configuration Wizard will work if I start renaming Startup.s files ...

  • "it doesn't work in the sense that uVision won't allow two identical filenames (never mind that they're in different directories) to coexist in the same project"

    Yes, that's true. :-(

    This, and other weaknesses of uVision's project management, have been frequently discussed here.

    Perhaps you should consider a proper configuration control system?

  • Perhaps you should consider a proper configuration control system?

    Well, I need to kep things in the basic uV2 project mode, as new Keil users are gonna be pretty confused by overly complex example projects, etc.

    One nice thing about the uV2 file format is that it's pretty easy to duplicate projects, so once a "base" project is done, creating similar projects isn't too hard.

    It would be nice, though, if uVision had a Save Project As... menu item ...

  • You may add two files STARTUP_GNU.S and STARTUP_Keil.S to your project. The config Wizard will still work.

    We will take away the filename limitation in the next uVision version, so that you no longer need to rename it. This was introduced, because the tools itself are using the filename to derive a module name. If a project has two identical module names, it cannot be linked or debugged.

  • By the way: the Config Wizard is based on tags in the source file only and might be useful also for other configuration files (like RTOS config).

    The features of the Config Wizard are documented in the uVision User's Guide, uVision3 Utilities, Configuration Wizard.