Some places were still using the old allocator. Using the new one does
not change any behavior. This will help to remove the useless data_len
attribute in net_pkt which legacy allocator was still setting.
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
Use DT_FLASH_ERASE_BLOCK_SIZE prefixed defined instead of
FLASH_ERASE_BLOCK_SIZE as the non-DT version is deprecated.
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
Currently OpenThread commands have to be prefixed in the shell by "ot
cmd", for example "ot cmd state". With the new shell, it is possible to
remove one subcommand level and change it to "ot state".
At the same time validate the number of arguments using
SHELL_CMD_ARG_REGISTER and improve the help message.
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
Following the introduction of the new shell, the OpenThread shell
wrapper is not well integrated. It outputs the answer to a command using
printk(), which is not necessarily using the same device than the shell
if "zephyr,console" does not match "zephyr,shell-uart".
OpenThread calls the otConsoleOutputCallback() function to output the
answer to the shell. It can provide a callback argument, but defined
when OpenThread is initialized, not when the command is submitted.
Workaround that by taking a copy of the shell argument in a static
variable and use it for the call to shell_fprintf(). It is not perfect
if two or more shells issue concurrent commands, but is already an
improvement compared to printk().
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
Update zephyr integration of openthread to latest api as of 2018-12-17:
2a75d30684
Both echo_server and echo_client compile and are operational.
Signed-off-by: Martin Turon <mturon@google.com>
Removed printing command help from help handler. It is now
realized by the shell engine. This change saves a lot of flash
but still allows to print help in command handler with function
shell_help_print.
Signed-off-by: Jakub Rzeszutko <jakub.rzeszutko@nordicsemi.no>
Removing help "options" from shell API.
Currently SHELL_OPT macro is not used by users. What is more
commit: a89690d10f ignores possible options created in
command handler by the user. As a result they are not printed
in help message.
Second, currntly implemented "options" in command handlers options are
implemented without SHELL_OPT macro.
And last but not least this change will allow to implement
help handler in a way that user will not need to think about calling
functions printing help in a command handler.
Signed-off-by: Jakub Rzeszutko <jakub.rzeszutko@nordicsemi.no>
These changes were obtained by running a script created by
Ulf Magnusson <Ulf.Magnusson@nordicsemi.no> for the following
specification:
1. Read the contents of all dts_fixup.h files in Zephyr
2. Check the left-hand side of the #define macros (i.e. the X in
#define X Y)
3. Check if that name is also the name of a Kconfig option
3.a If it is, then do nothing
3.b If it is not, then replace CONFIG_ with DT_ or add DT_ if it
has neither of these two prefixes
4. Replace the use of the changed #define in the code itself
(.c, .h, .ld)
Additionally, some tweaks had to be added to this script to catch some
of the macros used in the code in a parameterized form, e.g.:
- CONFIG_GPIO_STM32_GPIO##__SUFFIX##_BASE_ADDRESS
- CONFIG_UART_##idx##_TX_PIN
- I2C_SBCON_##_num##_BASE_ADDR
and to prevent adding DT_ prefix to the following symbols:
- FLASH_START
- FLASH_SIZE
- SRAM_START
- SRAM_SIZE
- _ROM_ADDR
- _ROM_SIZE
- _RAM_ADDR
- _RAM_SIZE
which are surprisingly also defined in some dts_fixup.h files.
Finally, some manual corrections had to be done as well:
- name##_IRQ -> DT_##name##_IRQ in uart_stm32.c
Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
New shell implementation is on the way. For now old one and all
references are kept to be gradually replaced by new shell.
Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
This finishes refactor of splitting off net_config library name from
net_app library, started in c60df1311, c89a06dbc. This commit makes
sure that Kconfig options are prefixed with CONFIG_NET_CONFIG_
instead of CONFIG_NET_APP_, and propagates these changes thru the
app configs in the tree.
Also, minor dependency, etc. tweaks are made.
Signed-off-by: Paul Sokolovsky <paul.sokolovsky@linaro.org>
Current implementation hardcoded channel in received frame structure.
With this change channel can be retrieved from a OpenThread platform,
and put in the frame. In result procedures like Discovery can be
executed correctly. Change was tested with OpenThread Border Router.
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
This commit contains bugfix for Joiner eui-64 handling and setting radio
in correct mode after calling thread stop.
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
L2 could take advantage of such hardware capability, when supported by
the device. This is also required for OpenThread.
Fixes#5714
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
- Changed define for SETTINGS_CONFIG_PAGE_SIZE from a hard coded value
to reference build system generated FLASH_ERASE_BLOCK_SIZE. This value
comes from 'erase-block-size' found in the dtsi file of devices.
- Modified nrf52840.dtsi to include definition for 'erase-block-size'
Fixes#7107
Signed-off-by: David Leach <david.leach@nxp.com>
- Removed OT_PLAT_RADIO_DEVICE_NAME
- Changed OpenThread binding to use NET_AP_IEEE802154_DEV_NAME
- Modified Kconfig chain to ensure NET_AP_IEEE802154_DEV_NAME
is enabled for both native 802.15.4 and OpenThread configurations
- Changed default setting of NET_L2_IEEE802154 in defconfig for mkw41z4.
- Fixed OpenThread api support code to use the state of mIsCcaEnabled
in the transmit frame to conditionally invoke radio_api->cc() on
transmits.
Signed-off-by: David Leach <david.leach@nxp.com>
Use ccache when building OpenThread. When the cache is warm, I was
able to observe that this patch sped up a clean build from 45 seconds
to 33 seconds.
Signed-off-by: Sebastian Bøe <sebastian.boe@nordicsemi.no>
OpenThread requires platform definition with standarized API
so we have to add wrappers to make it compatible with Zephyr.
OpenThread is based on autoconf, this requires
more specific CMakeLists.txt which allows to clone specific
commit or point to local copy of openthread.
Signed-off-by: Kamil Sroka <kamil.sroka@nordicsemi.no>