how to include other application's file

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

cross mob
Anonymous
Not applicable

I'd like to include the files which are in other application.

For example, I'd like to include Ws_upgrade_uart.h in ram/uart_firmware_upgrade into rom/health_thermometer_plus.

How should I change the makefile ?

0 Likes
1 Solution

> Should I add all files which I need to intended folder?

Yes.

View solution in original post

0 Likes
6 Replies
Anonymous
Not applicable

Hello eyan,

We have an example of the ws_upgrade_uart in the hello_sensor application.

Please see line 391 in hello_sensor.c file where the function ws_upgrade_uart_init is called.

The associated make file uart_firmware_updgrade App shows the Addition of sources in its makefile.mk:

APP_SRC = hello_sensor.c ws_upgrade_uart.c ws_upgrade.c

Please let me know if this helps

JT

0 Likes
Anonymous
Not applicable

Hi, j.t

I copied ws_upgrade_uart.c to another name like b_uart.c to add other functionality.

I already did modify makefile like APP_SRC =health_thermometer_plus b_uart.c ,

but some header files like ws_upgrade_uart.h in b_uart.c was errored while compiling.

When I add ws_upgrade_uart.c into makefile, then another error message comes up.

==============================================================================

"C:\\Users\\320006579\\Documents\\WICED\\WICED-Smart-SDK-1.1.0\\WICED-Smart-SDK\\make.exe" ROM.health_thermometer_plus-BCM920732TAG_Q32 download

make.exe[1]: *** No rule to make target '../../build/health_thermometer_plus-BCM920732TAG_Q32-rom-ram-Wiced-release/ws_upgrade_uart.o', needed by '../../build/health_thermometer_plus-BCM920732TAG_Q32-rom-ram-Wiced-release/A_20732A0-health_thermometer_plus-rom-ram-spar.elf'.  Stop.

===============================================================================

I'd like to know to include other headerfiles which is already implemented in other applications.

Thank you.

0 Likes

> I already did modify makefile like APP_SRC =health_thermometer_plus b_uart.c ,but some header files like ws_upgrade_uart.h in b_uart.c was errored while compiling.

You should be able to copy over the header files too.

> When I add ws_upgrade_uart.c into makefile, then another error message comes up.

Where did you put ws_upgrade_uart.c? Is it in Apps/ROM/health_thermometer_plus/?

0 Likes
Anonymous
Not applicable

Hi, arvinds,

When I add ws_upgrade_uart.c into the health_thermometer_plus folder, it compiled without error.

Should I add all files which I need to intended folder?

Thank you.

0 Likes

> Should I add all files which I need to intended folder?

Yes.

0 Likes
Anonymous
Not applicable

OK, thank you.

0 Likes