An EVRYTHNG SDK for Marvell IoT SoC boards (based on WMSDK).
The EVRYTHNG Marvell SDK contains an MQTT SDK to work with the EVRYTHNG cloud as well as sample applications and unit tests.
You can find a programming guide in the following file:
lib/core/README.md
See our release page.
Ensure you use the --recursive
option as this project depends on the EVRYTHNG C library:
git clone git@github.com:evrythng/evrythng-marvell-sdk.git --recursive
- In order to compile the library and run the tests you should install the following dependencies on your local machine:
sudo apt-get install gcc-arm-none-eabi
- Download the latest Marvell WMSDK. This SDK was tested with WMSDK version 3.5.25 but newer versions should be supported as well.
Copy the config.mk.example
file to config.mk
and configure it for your environment.
To build the library, demo application and tests just run:
make
To build the demo application only run:
make demo
To build the tests only run:
make tests
Additionally you can set NOISY to 1 to see more output (0 by default)
make NOISY=1
To clean the build files run:
make clean
Additionally you can use targets ending with _flashprog
, _ramload
, _footprint
.
For example:
make demo_flashprog
to flash the demo app to the board,
make demo_ramload
to load the demo to the device RAM and run
make demo_footprint
to check the demo application footprint
When you are connected to your Marvell board via serial terminal press enter. You should then see the prompt #
. Try psm-dump
to see the current network and EVRYTHNG configurations.
The following commands configure the network:
psm-set network ssid <<SSID>>
psm-set network passphrase <<Passphrase>
psm-set network security 4
psm-set network configured 1
After setting psm-set network configured 1
, the network is configured. Press the reboot button on the device.
The following commands configure the Marvell device to connect to EVRYTHNG:
psm-set evrythng url ssl://mqtt.evrythng.com:443
psm-set evrythng thng_id <<ThngId>>
psm-set evrythng api_key <<DeviceApiKey>>
Press the reboot button on the device.
The source of the demo application is located in apps/demo/main.c
. This app is a good example of using the EVRYTHNG Cloud API.
The key features of the application are:
- Subscribing to the LED Action to control the LEDs when an Action notification is sent via the EVRYTHNG Cloud.
- Publishing Properties when the buttons are pressed.
- Publish an Action when the buttons are pressed.
- Go to the
apps
folder, copy and rename the demo application - Open the Makefile and copy-paste the
demo(_clean/_flashprog/_ramload/_footprint)
targets omitting the ones that are not relevant for your use case.. - You can now start building/flashing and running your application by calling targets you've just created.