This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

How to make Makefile for sources that were compiled only with Keil?

I have sources with only Keil environment

How can I prepare Makfile so it could be compiled with gcc (to avoid the 32k limitation)?

Parents
  • Hi.

    I don't think there is any easy and quick way to do this.

    It is probably best to start from the Makefile closest to the Keil project you started from, for example like this:

    There are Makefile's for the different boards, and I see in the tag of this question that you have marked nRF52832, so it would be natural to select the Makefile found in the s132 folder and work from that. You have to include and remove files you don't want in your project by adding og removing "include lines":

    Here you put the path to folders that contain headerfiles.

    Here you put the path to source files.

    $(SDK_ROOT) is just a macro used to specify a part of the path to the different files.

    You also have to make sure that the path to the SDK config file is correct:

     ...

    It is really just trial and error.

    Best regards,

    Andreas

Reply
  • Hi.

    I don't think there is any easy and quick way to do this.

    It is probably best to start from the Makefile closest to the Keil project you started from, for example like this:

    There are Makefile's for the different boards, and I see in the tag of this question that you have marked nRF52832, so it would be natural to select the Makefile found in the s132 folder and work from that. You have to include and remove files you don't want in your project by adding og removing "include lines":

    Here you put the path to folders that contain headerfiles.

    Here you put the path to source files.

    $(SDK_ROOT) is just a macro used to specify a part of the path to the different files.

    You also have to make sure that the path to the SDK config file is correct:

     ...

    It is really just trial and error.

    Best regards,

    Andreas

Children
No Data
Related