If net_context_recv() returns a error, net pkt will not be released. For
example, net_context_recv() returns -EBADF because the TCP connection is
closed by the peer.
Handle the return value instead of using SET_ERRNO().
Signed-off-by: Aska Wu <aska.wu@linaro.org>
If we cannot send a DHCP message, then unref the net_pkt
in order to avoid a buffer leak. Earlier we tried to
unref NULL net_pkt which is not correct.
Signed-off-by: june li <junelizh@foxmail.com>
patch removes the mem.h and marcos used in that file are
moved appropriate board files. As there are boards with
different flash configuration but of same soc, flash and
ram size are moved to dts file instead of dtsi
Signed-off-by: Savinay Dharmappa <savinay.dharmappa@intel.com>
This simplifies the API since there is no-longer a need to pass a huge
number of function arguments around.
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
This simplifies the API since there is no-longer a need to pass a huge
number of function arguments around.
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
Add a command for getting and setting the model publication. We also
have to adjust the app's configuration, since both the Model
Publication Set and Status messages are segmented messages, meaning we
need two TX and RX segment contexts.
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
The value 0xffff is reserved, so we can use that to indicate whether
there's a vendor model in question or not. Simplifies things over the
previously used separate boolean value.
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
For an unknown reason, various samples in KBuild were including
Makefile.test, this had some desired benefits, one of which is that
the popular BOOT_BANNER appears. The CMake-equivalent of including
Makefile.test is setting the flag IS_TEST. This commit reverts the
behaviour of the samples back to how it was pre-cmake.
Signed-off-by: Sebastian Boe <sebastian.boe@nordicsemi.no>
The Kbuild equivalent of IS_TEST was used for hello_world before, so
we revert back to the old behaviour. This resolves
https://github.com/zephyrproject-rtos/zephyr/issues/4904
Signed-off-by: Sebastian Boe <sebastian.boe@nordicsemi.no>
CONFIG_NET_L2_BT_ZEP1656 should only be used with older Linux up to
4.11 which by now should have been updated in all distros.
For those sticking with older distros should select it manually as
it does breaks IID address it should never be used in production.
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
Token is missing when we jump to the error and token is not yet setup.
To correct it, we grab the token from the input packet at the beginning
of the handle_request()
Signed-off-by: Robert Chou <robert.ch.chou@acer.com>
There were some needed changes missing after the update to have manual
control of PB-ADV & PB-GATT provisioning bearers. E.g. the test for
CONFIG_BT_MESH_LOW_POWER in net.c was no-longer indicative of scanning
being on or not.
Do the scan enabling selection within the LPN module if LPN is
supported, or otherwise enable scanning unconditionally in
bt_mesh_provision().
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
This is a temporary hack until #5006 is resolved (possibly using
https://github.com/zephyrproject-rtos/zephyr/issues/5006
Unit testing (BOARD == unit_testing) doesn't need the system call
definitions. Because we foward declare with __syscall them as "static
inline" (from common.h), the compilers will complain that the
definition is missing.
Change to only define __syscall as "static inline" if we are not
builing a unit test to avoid said warnings.
Signed-off-by: Inaky Perez-Gonzalez <inaky.perez-gonzalez@intel.com>
The '=' character was incorrectly getting passed to the JLinkGDBServer
device argument, and caused the server to fail to connect to the target.
Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
Semaphore state_sem initial count is set to 0 but k_sem_give()
is invoked first in sys_rand32_get() which will block the caller
forever.
Fix the issue by setting the initail count to count_limit.
Signed-off-by: Ramakrishna Pallala <ramakrishna.pallala@intel.com>
Note we've added a new Sphinx inline role for references to GitHub
issues, `1234` (along with the existing inline role for Jira
issues :jira:`ZEP-1234`)
Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
The Doxygen comments for the flash API refer to page and sector
interchangeably, without defining either. Fix the coments by providing
a definition of page and using that word consistently.
Signed-off-by: Marti Bolivar <marti@opensourcefoundries.com>
Rename the Atmel SAM I2C driver based on TWIHS module to match the
convention:
<driver class>_<SoC family>_<hardware module used by the driver>
Signed-off-by: Piotr Mienkowski <piotr.mienkowski@gmail.com>
Various minor changes to the Atmel SAM (TWIHS) driver
- clean up variable names, comments
- refactor i2c_clk_set function
- do not save configuration in dev_data
- improve ISR NACK handling
- print "Device initialized" string
Signed-off-by: Piotr Mienkowski <piotr.mienkowski@gmail.com>
olimexino_stm32 was not getting the flash base address from the Kconfig
variable. Since the board uses DTS that will get set, so we can use the
standard openocd.board.cmake.
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
Unlike other NXP SoCs currently in Zephyr, the mimxrt1052 has the ARM
MPU rather than the NXP MPU. Start out by enabling it with a simple set
of memory regions for "flash" (ITCM), "ram" (DTCM), and the peripheral
buses. More regions will need to be added when we implement support for
external memories.
Tested with:
- samples/mpu/mpu_stack_guard_test
- tests/kernel/mem_protect/protection
Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
The mimxrt1052 does not have any internal flash, therefore a reset after
load blows away the code when loaded into sram. Reverse the order of the
jlink commands such that the load follows the reset.
Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
Adds support for the NXP MIMXRT1050-EVK board, an entry-level
development board for the new mimxrt1052 Cortex-M7 SoC.
Adds pinmuxing, dts, documentation, and jlink debug support for the new
board. Note that pinmuxing uses the mcux pinmux driver directly rather
than the Zephyr pinmux interface. The mimxrt1052 SoC has complicated
pinmuxing that may require changing the Zephyr pinmux interface to
support, so for now let's use the mcux driver directly.
We are also not yet configuring the external flash, therefore a debugger
is required to load code to the internal sram. The on-board OpenSDA
circuit with jlink firmware is sufficient, and the 'make debug' build
target is supported.
Samples tested include: hello_world, philosophers, synchronization,
basic/blinky, and basic/button.
Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
Adds the mimxrt1052 SoC, which belongs to a new family (nxp_imx) and
series (rt) of SoCs. The mimxrt1052 integrates an Arm Cortex-M7 core,
512 KB TCM, and many peripherals including 2D graphics, an LCD display
controller, camera interface, SPDIF and I2S. Unlike other SoCs in
Zephyr, the mimxrt1052 has no internal flash.
This initial port to mimxrt1052 configures the system clock to operate
at 528 MHz, and enables the serial/uart and gpio interfaces to support
the hello_world and blinky samples. Support for additional Zephyr driver
interfaces will come later.
Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
Adds a new gpio driver for the NXP i.MX family of SoCs. Read, write,
configure, and callback API functions are all implemented.
Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
Adds mcux 2.3.0 drivers and device header files for the mimxrt1051 and
mimxrt1052. Updates several drivers that were already imported for other
SoCs but also apply to the mimxrt1051 and mimxrt1052.
Origin: NXP MCUXpresso SDK 2.3.0
URL: mcux.nxp.com
Maintained-by: External
Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
Event ISR checks if the TX/RX interrupts is enabled instead
of the TXIS/RXNE interrupt status flags. Use the TXIS/RXNE
interrupt status flags to check which interrupt event
happened.
Signed-off-by: Yannis Damigos <giannis.damigos@gmail.com>
Signed-off-by: Daniel Wagenknecht <wagenknecht@clage.de>
STM32 I2C driver doesn't use the I2C API flags STOP/RESTART,
instead it uses its own RESTART flag. As a result, I2C API's
i2c_burst_write* funtions doesn't work. This patch makes
STM32 I2C driver to use I2C API flags.
Tested on: 96b_carbon, olimexino_stm32 (i2c_ll_stm32_v1)
Tested on: stm32f3_disco, disco_l475_iot1 (i2c_ll_stm32_v2)
Fixes: #4459
Signed-off-by: Yannis Damigos <giannis.damigos@gmail.com>
Signed-off-by: Daniel Wagenknecht <wagenknecht@clage.de>
The interrupt priority on KW41Z is from 0..3. The value of 0x80 is
invalid, so lets set it to 0 for now as all the other interrupt
priorities default to 0 right now.
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
Added conditionally enabled event state tracing support.
Needed for enhanced debug visibility of tight timed events where
normal print debug messages affect the timing of things. This is a
simple buffer that allows post analysis via gdb of what sequencer
events occurred.
Signed-off-by: David Leach <david.leach@nxp.com>
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
- Removed some debug output and changed the level of others to reduce
the amount of information logged. The reason is that some of this is
causing false positive distractions.
- Removed enabling of FILTER error IRQ events. It isn't needed and is
only informational.
- Changed frame control AR bit inspection to use native retrieval
routine.
- Addressed some coding style issues.
Signed-off-by: David Leach <david.leach@nxp.com>
Changed the logic to reset the sequencer when a RX filter
failure has been detected. This also disables the RX timer
until the next watermark detection.
Signed-off-by: David Leach <david.leach@nxp.com>
- Reworked the driver logic around TX/RX to correctly handle the
expectations of the underlying 802.15.4 hardware IP.
- Fixed a problem with TX always reporting an error to the stack
which resulted in constant retries.
- Fixed bug in RX to TX transition which would occasionally cause the
driver to error the TX.
- Changed RX logic to ensure that invalid RX frames were not passed up
the stack.
- Simplified hardware timer usage to only use TMR3.
- Added RX watermark and TMR3 support to fix a hardware problem where
the hw IP can get stuck on a receive in noisy environments.
- Modified samples/net/echo_client and echo_server kw41z project config
files to provide enanced debug visibility into stacks and threads.
Signed-off-by: David Leach <david.leach@nxp.com>
This patch do following things :
- fix checkpatch warnings
- replace conditions with ztest apis wherever necessary
Signed-off-by: Punit Vara <punit.vara@intel.com>
Make legacy test case use of ztest apis to support
ztest framework.
Reduce ztest stack size to 512 otherwise region 'SRAM'
will overflow for nucleo board.
Signed-off-by: Punit Vara <punit.vara@intel.com>
the current zephyr sdk now includes openocd configurations for l4
boards, we can now update the boards and docs to reflect this
Signed-off-by: Arthur SFEZ <arthur.sfez@gmail.com>