I want to be able to interface some sensors and send the sensor data to Thingspeak cloud using Contiki-OS. C libraries are available for interfacing sensors and the libthingspeak library is available for updating the feed on Thingspeak. I'm able to perform communication between two motes using the examples provided in examples/udp-ipv6 folder, setting one node as client and another as the server. How do I now include the required library code in my application and build it. What changes need to be made in the Makefile? I'm using cc2538 development kit.
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试):
问题:
回答1:
Use TARGET_LIBFILES
variable. For example, to link with standard math library:
TARGET_LIBFILES += -lm
If necessary, add the path where the library resides to LDFLAGS
:
LDFLAGS += -L/path/to/libraries