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

Build a project from a makefile

Hi,
I am looking for a way to build a project from a makefile with Keil uVision4.
Is there any way (simple the better)?

Thx

  • Maybe use the IDE to design the project and build once.

    Build with list files enabled.

    Extract info from the top of the *.txt files:

    ; generated by ARM/Thumb C/C++ Compiler with , RVCT3.1 [Build 919] for uVision
    ; commandline ArmCC [--split_sections --debug -c --asm --interleave -o.\Flash\uart2.o --depend=.\Flash\uart2.d --device=DARMP --apc
    s=interwork -Otime -IC:\Keil\ARM\INC\Philips -D__RTX --omf_browse=.\Flash\uart2.crf uart2.c]
    


    to get compilation options for individual source files.

    Look at the *.d file for dependancy information you want to add to your makefile, unless you design the makefile to automatically capture dependancy information.

    Look at file *.lpn (preferable) or *.tra for linker parameters.

  • Oops. To fast pressing post there.

    The preferable way to get the compile parameters is the *.__i files - easier than extracting from the top of the *.txt files.

  • Not sure I am clear...
    I have a standard makefile built with external tool.
    I want to create a project in uVision, include all sources I need, and point to that makefile in order to configure the following:
    1. Macro definition.
    2. Files to compile.
    3. include path.

    Preferabely, I thought of providing a makefile as the only entry point, in which the IDE will know which source files are needed based on that makefile.

  • Sorry, I discussed the different direction. A way to start using a Makefile. I have to leave it to someone else how to best make the IDE make use of a Makefile.

  • I understand I can build it this way, but it gives me nothing.
    I need to be able to use this makefile in order to create a Keil project, in a way that I can debug it using Keil's C166 simulator

  • "I understand I can build it this way"

    You didn't mention that in your original post

    "but it gives me nothing"

    Yes, it does!
    It gives you, "a way to build a project from a makefile with Keil uVision4" - which is precisely what you asked for in your opening post!

    "I need to be able to use this makefile in order to create a Keil project"

    You didn't make that clear.

    "in a way that I can debug it using Keil's C166 simulator"

    You can do that without having to create a uVision project!

    You can load any compatible executable image into the Keil debugger - see: http://www.keil.com/support/man/docs/uv4/uv4_cm_load.htm

    However, if you do still need to make a uVision Project, I'm afraid there's no automated way that I know of to do that - you would just have to enter all the necessary settings via the GUI.

    The UV4 project file is supposed to be "open" - so, in theory, it should be possible to create an automatic conversion utility.
    Unfortunately, I have never seen any description or documentation of the so-called "open" format (other than that it's XML-based) - so that doesn't really help.

    :-(

    If you spoke to Keil support, they might be able to give you some information that is not published (yet)...