[embedded]Port mqtt client to arm platform

2017-5-23 写技术

1.Build openssl.

Download openssl-1.0.2.tar.gz

tar openssl-1.0.2.tar.gz

cd openssl-1.0.2

vi Makefile, let:

CC = arm-linux-gcc
AR = arm-linux-ar
RANLIB = arm-linux-ranlib
INSTALLTOP = /home/nicholas/workspace/project/mosquitto/run/for_arm/openssl_install
OPENSSLDIR = /home/nicholas/workspace/project/mosquitto/run/for_arm/openssl_install

make

make install


2.Build mqtt.

Download eclipse-paho-mqtt-c-src-1.0.3.tar.gz

tar eclipse-paho-mqtt-c-src-1.0.3.tar.gz -C mqtt

cd mqtt

vi Makefile, let:

CC = arm-linux-gcc
CFLAGS += -I/home/nicholas/workspace/project/mosquitto/run/for_arm/openssl_instal/include
LDFLAGS += -L/home/nicholas/workspace/project/mosquitto/run/for_arm/openssl_instal/lib
make CC=arm-linux-gcc

cp build/output/* busybox/_install/usr/lib/ -a


3.In arm board, run testing program.

/usr/lib/sample/pubsync

标签: embedded

发表评论:

Powered by anycle 湘ICP备15001973号-1