WICED make file

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
lola_1650581
Level 3
Level 3
First like received

Hi,all:

     Do you have any document can tell me how to make a .mk file to the project.

0 Likes
1 Solution
KS_96
Employee
Employee
10 sign-ins 5 sign-ins 10 replies posted

Hi,

It's actually quite simple. Here are the steps i see to create a .mk file.

Let us assume that you are creating application in apps/snip/user_app.

1. You name the file as user_app.mk. Define name of the app

NAME :=App_user_app

2. Add all the source file using

     $(NAME)_SOURCES +=user_app.c

3. Add required components, for instance

    $(NAME)_COMPONENTS += protocols/MQTT

3. If you use any other resources like certificate or html page then add them under

    $(NAME)_RESOURCES  := apps/aws_iot/rootca.cer

4. In case you want to define WLAN credentials separately then,

   WIFI_CONFIG_DCT_H := wifi_config_dct.h

5. if you have any Global define then define them here, for instance

   GLOBAL_DEFINES += NO_AP_INTERFACE

6. Optionally, you can also define if this for specific platform using

   VALID_PLATFORMS :=

Look at either apps/snip/scan/scan.mk or apps/test/console/console.mk for a more detailed example

View solution in original post

1 Reply
KS_96
Employee
Employee
10 sign-ins 5 sign-ins 10 replies posted

Hi,

It's actually quite simple. Here are the steps i see to create a .mk file.

Let us assume that you are creating application in apps/snip/user_app.

1. You name the file as user_app.mk. Define name of the app

NAME :=App_user_app

2. Add all the source file using

     $(NAME)_SOURCES +=user_app.c

3. Add required components, for instance

    $(NAME)_COMPONENTS += protocols/MQTT

3. If you use any other resources like certificate or html page then add them under

    $(NAME)_RESOURCES  := apps/aws_iot/rootca.cer

4. In case you want to define WLAN credentials separately then,

   WIFI_CONFIG_DCT_H := wifi_config_dct.h

5. if you have any Global define then define them here, for instance

   GLOBAL_DEFINES += NO_AP_INTERFACE

6. Optionally, you can also define if this for specific platform using

   VALID_PLATFORMS :=

Look at either apps/snip/scan/scan.mk or apps/test/console/console.mk for a more detailed example