Introducing CMake is an important step in a larger effort to make
Zephyr easy to use for application developers working on different
platforms with different development environment needs.
Simplified, this change retains Kconfig as-is, and replaces all
Makefiles with CMakeLists.txt. The DSL-like Make language that KBuild
offers is replaced by a set of CMake extentions. These extentions have
either provided simple one-to-one translations of KBuild features or
introduced new concepts that replace KBuild concepts.
This is a breaking change for existing test infrastructure and build
scripts that are maintained out-of-tree. But for FW itself, no porting
should be necessary.
For users that just want to continue their work with minimal
disruption the following should suffice:
Install CMake 3.8.2+
Port any out-of-tree Makefiles to CMake.
Learn the absolute minimum about the new command line interface:
$ cd samples/hello_world
$ mkdir build && cd build
$ cmake -DBOARD=nrf52_pca10040 ..
$ cd build
$ make
PR: zephyrproject-rtos#4692
docs: http://docs.zephyrproject.org/getting_started/getting_started.html
Signed-off-by: Sebastian Boe <sebastian.boe@nordicsemi.no>
Currently, we check the length of an option value in the
coap_packet_append_option() function. This isn't required as
we're appending to a net_pkt and not using struct coap_option
where the limitation is imposed.
Instead, we should check the option value length in
parse_option() where we assign the value to a struct
coap_option.
Signed-off-by: Michael Scott <michael.scott@linaro.org>
From RFC 7252, section 3
"The absence of the Payload Marker denotes a zero-length payload.
The presence of a marker followed by a zero-length payload MUST
be processed as a message format error."
Check empty payload when COAP_MARKER is found and add a test case to
cover it
Signed-off-by: Robert Chou <robert.ch.chou@acer.com>
Options parsing helpers functions unable to handle the malformed
packets and dropping it. Improved parsing functionality to handle
malformed packets. Also payload marker is not mandatory in CoAP
packets when there is no payload. Exit gracefully when CoAP
packet contains only options.
Fixes#4396.
Coverity-ID: 178060
Signed-off-by: Ravi kumar Veeramally <ravikumar.veeramally@linux.intel.com>
This calculation reads the length portion of the COAP header to determine
the length of the coap packet. However, when encrypted via DTLS this
value seems to be getting corrupted. Let's change this calculation so
that it will work for when DTLS is both enabled and disabled. Use the
total length of the fragment data and substract back out the headers
to get a correct value.
Signed-off-by: Michael Scott <michael.scott@linaro.org>
Current coap library fails to parse or prepare if packet is more
than one fragment. Added support to handle multi fragment packet.
Also well-known/core api used to prepare coap packet and send it
through net context api immediately. This is goind to be problematic
if user doesn't enable net context. Also user can not encrypt coap
packets. Now api will return prepared coap packet to application.
Application will send it to peer.
Jira: ZEP-2210
Signed-off-by: Ravi kumar Veeramally <ravikumar.veeramally@linux.intel.com>
ZOAP library has certain limitations in parsing and preparation of
coap messages. It can handle only on single network fragment. If
network packet is split between multiple fragments it fails. This
patch is just copy and rename of 'zoap' to 'coap'.
Signed-off-by: Ravi kumar Veeramally <ravikumar.veeramally@linux.intel.com>