-
Notifications
You must be signed in to change notification settings - Fork 66
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update iotivity-lite port for Zephyr 3.0.0 #235
base: master
Are you sure you want to change the base?
Conversation
The CMake variable TARGET_SUPPORTS_SHARED_LIBS provides this information. E.g. Zephyr does not support dynamic libraries.
TinyCBor queries compile definitions in its header files for overrides that may needed for a target platform (e.g. Zephyr).
The Zephyr SDK generates some platform header files in a CMake target, which has to be completed before the compilation of iotivity-lite can start. Defining dependencies for our targets delays the targets until the dependent targets have finished.
If iotivity-lite is used as a CMake subproject in a Zephyr application, detect the Zephyr SDK with the ZEPHYR_BASE variable and setup the build for the Zephyr port: * Set the Zephyr CMake task zephyr_interface as target dependency. * Set the Zephyr include directories globally. * Add the Zephyr compile definitions and options.
TinyCBOR 0.6.0 allows to disable floating point support with a compile definition CBOR_NO_FLOATING_POINT. It seems that floating point support is only needed in src/cborpretty.c to use functions from the math.h header, which are not available in Zephyr.
…yCBOR The Zephyr minimal libc doesn't provide a strtod function implementation.
Those functions use the sscanf function, which is not implemented in the minimal libc of Zephyr.
* Replace netlink sockets with Zephyr network manager * Replace shutdown_pipe pipe with a Zephyr socketpair * Use Zephyr functions for multicast address and group management
~format |
Update TinyCBOR to version 0.6 to be able to disable floating point support with Zephyr's minimal libc can we do this in a seperate pull request, e.g. to check if anything breaks? |
@Oxymoron79 Please, could you add example server + README which uses zephyr ? |
@jkralik I have now added a README for the Zephyr port and how I used it. Sorry that it took so long - I didn't find the time to write it... |
Update the port of iotivity-lite for the latest Zephyr RTOS (3.0.0) using the ST STM32H747I Discovery board.
#if defined(ZEPHYR)
to util/oc_atomic.hoc_send_discovery_request