-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #11 from felixgateru/esp32_coap_zephyr
NOISSUE - Add zephyr target with CoAP capability
- Loading branch information
Showing
4 changed files
with
708 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
cmake_minimum_required(VERSION 3.20.0) | ||
find_package(Zephyr REQUIRED HINTS $ENV{ZEPHYR_BASE}) | ||
project(coap_client) | ||
|
||
FILE(GLOB app_sources src/*.c) | ||
target_sources(app PRIVATE ${app_sources}) | ||
target_include_directories(app PRIVATE ${ZEPHYR_BASE}/subsys/net/ip) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
MQTTS- esp32 target | ||
## Requirements | ||
1. Mainflux broker details including: hostname, ThingID, Thing Credentials and Channel ID | ||
2. [Zephyr](https://www.zephyrproject.org/) | ||
|
||
|
||
## Configure | ||
1. Edit the [config file](include/config.h) with your broker details. | ||
|
||
## Build | ||
The project can be built by utilising the make file within the target directory | ||
|
||
```bash | ||
west build -p always -b <your-board-name> mqtt | ||
``` | ||
## Flash | ||
Platform io generate a build directory with the fimware.bin within it. Use the make command to flash to board | ||
```bash | ||
west flash | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
# Generic networking options | ||
CONFIG_NETWORKING=y | ||
CONFIG_NEWLIB_LIBC=y | ||
CONFIG_NET_IPV6=y | ||
CONFIG_NET_UDP=y | ||
|
||
CONFIG_NET_SOCKETS=y | ||
CONFIG_NET_SOCKETS_POSIX_NAMES=y | ||
CONFIG_NET_SOCKETS_POLL_MAX=4 | ||
|
||
CONFIG_COAP=y | ||
|
||
# Kernel options | ||
CONFIG_ENTROPY_GENERATOR=y | ||
CONFIG_TEST_RANDOM_GENERATOR=y | ||
|
||
# Logging | ||
CONFIG_PRINTK=y | ||
CONFIG_NET_LOG=y | ||
|
||
# Network Shell | ||
CONFIG_NET_SHELL=y | ||
|
||
CONFIG_NET_CONFIG_SETTINGS=y | ||
CONFIG_NET_CONFIG_NEED_IPV6=y | ||
CONFIG_NET_CONFIG_MY_IPV6_ADDR="2001:db8::2" | ||
CONFIG_NET_CONFIG_PEER_IPV6_ADDR="2001:db8::1" | ||
|
||
CONFIG_HEAP_MEM_POOL_SIZE=2048 |
Oops, something went wrong.