Commit graph

42556 commits

Author SHA1 Message Date
Ioannis Glaropoulos 6d9d60ce60 boards: nrf5340: update help text for BOARD_ENABLE_CPUNET symbol
We enhance the help text of the BOARD_ENABLE_CPUNET Kconfig
option, to stress that if the option is used when building
a Non-Secure Application MCU firmware image, the Secure
image counterpart also needs to perform the required GPIO
allocation.

Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
2020-07-23 14:07:16 +02:00
Ioannis Glaropoulos 4051f277ef boards: nrf5340: do not attempt to boot NETWORK MCU from Secure image
Building Zephyr with CONFIG_TRUSTED_EXECUTION_SECURE=y implies
building also a Non-Secure image. The Non-Secure image will, in
this case do the remainder of actions to properly configure and
boot the Network MCU. So the (strictly) secure firmware image
does not need to execute the configuration and the booting of
the Network MCU, except for the part that does security
attribution. In the absence of any TrustZone awareness, the
single Application MCU firmware will do all the required
steps to configure and boot the Network MCU.

Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
2020-07-23 14:07:16 +02:00
Peter Bigot f45f72c9a4 doc: development_process: document that CI style checks can fail
The CI style checking solution can produce false positives when it's
given code that it mis-parses, or that follows conventions it doesn't
allow.  Document a couple examples, and explicitly note that
maintainers should override the -1 vote if they're encountered.

For those following along in the commit history:

   static uint8_t __aligned(PAGE_SIZE) page_pool[PAGE_SIZE * POOL_PAGES];

checkpatch sees "uint8_t __aligned(PAGE_SIZE)" and infers a prototype
for a function "__aligned" that takes an unnamed parameter of type
"PAGE_SIZE".  So it adds "PAGE_SIZE" as a known type name.

   IOPCTL_Type *base = config->base;

This is common in driver code where the vendor HAL allows typedefs for
structure types.  checkpatch was designed for an environment with
limited use of typedefs; "struct IPCTL_Type" would have been handled
properly.

Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
2020-07-23 14:04:44 +02:00
Jan Van Winkel 716eea0b65 scripts: Increased minimal pyelftools version
Increased minimal pyelftools version to 0.26 else
scripts/footprint/size_report will fail to import LocationExpr from
elftools.dwarf.locationlists

Signed-off-by: Jan Van Winkel <jan.van_winkel@dxplore.eu>
2020-07-23 07:49:35 -04:00
Kumar Gala 77a56fd725 dts: remove incorrect use of device_type property
For true mmio-sram, arc,iccm, arc,dccm nodes we should not be setting
device_type = "memory".  This should be used for true DRAM regions of
memory and not on SoC SRAMs.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2020-07-23 06:37:41 -05:00
Maksim Masalski 9ccbfbd84e tests: code review changes
Code review changes.

Signed-off-by: Maksim Masalski <maksim.masalski@intel.com>
2020-07-23 12:55:47 +02:00
Maksim Masalski 32aa91d803 tests: add new futex test
Add new standalone futex test that verifies next requirements:
-Futex can be placed in user memory using ZTEST_BMEM
-User thread can write to futex value
-User threads can make wait/wake syscalls on it

Added detailed Doxygen tag with information about the test

Signed-off-by: Maksim Masalski <maksim.masalski@intel.com>
2020-07-23 12:55:47 +02:00
Vinayak Kariappa Chettimada 10142ab398 Bluetooth: controller: Added some comments for fields in node rx struct
Added internal comments about the use of some of the fields
in the node rx structure.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2020-07-23 11:39:47 +02:00
Vinayak Kariappa Chettimada 61e7eb907c Bluetooth: controller: Define struct in node rx for adv term event
Defined struct in node rx for passing event parameters of
Advertising Set Terminated Event.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2020-07-23 11:39:47 +02:00
Vinayak Kariappa Chettimada e0613b9638 tests: Bluetooth: bsim: Added tests for adv set terminate event
Added bsim testing for Advertising Set Terminated event.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2020-07-23 11:39:47 +02:00
Vinayak Kariappa Chettimada cd0e72a91e Bluetooth: controller: Reworked adv set terminate event
Reworked the implementation of Advertising Set Terminate
event.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2020-07-23 11:39:47 +02:00
Dag Bjarvin 46a622837d Bluetooth: controller: Release term event memory on timeout
Release memory allocated to ext adv terminate event, after timeout

Signed-off-by: Dag Bjarvin <Dag.Bjarvin@nordicsemi.no>
2020-07-23 11:39:47 +02:00
Dag Bjarvin 0df34da5d7 Bluetooth: controller: Terminate event for ext adv
Update to free term event node

Signed-off-by: Dag Bjarvin <Dag.Bjarvin@nordicsemi.no>
2020-07-23 11:39:47 +02:00
Vinayak Kariappa Chettimada a4eead690d Bluetooth: controller: Adv Set Terminated Evt on duration
Implementation of Advertising Set Terminated Event on
duration sans use of additional variable in advertising
set context structure.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2020-07-23 11:39:47 +02:00
Dag Bjarvin 12fdddb80d Bluetooth: controller: Add terminate event for external advertising
Add terminate event for duration timeout, max number of events and
connection.

Signed-off-by: Dag Bjarvin <Dag.Bjarvin@nordicsemi.no>
2020-07-23 11:39:47 +02:00
Andrew Boie 7df42d7c25 include: libc-hooks: add comments
Clarify in documentation under what conditions this partition
is available.

Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2020-07-23 11:01:42 +02:00
Andrew Boie bb0c6dbf62 libc: newlib: remove impossible ifdef
This whole code block is ifdef'ed around
CONFIG_NEWLIB_LIBC_ALIGNED_HEAP_SIZE being NOT defined,
remove as this can never be true.

Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2020-07-23 11:01:42 +02:00
Andrew Boie ca1154d85a libc: newlib: simplfy malloc arena defn
We've come a long way since this was written to implement
generic ram bounds definitions and MPU capabilities,
use them here.

Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2020-07-23 11:01:42 +02:00
Kumar Gala 17d5a47fdc dts: x86: cleanup memory node
* Rename DT_SRAM_SIZE to DT_DRAM_SIZE since that is more correct
* Remove mmio-sram compatible since that is not correct for DRAM.
* Rename node label from sram0 to dram0

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2020-07-23 11:01:16 +02:00
Martí Bolívar 006319f043 scripts: kconfigfunctions: add a comment
I can never remember what the contents of the kconfigfunctions dict is
and have to look it up every time. I suspect I'm not alone, and not
everyone who uses these will know how to look up the answer. Add a
comment explaining the value.

Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
2020-07-23 11:00:39 +02:00
Martí Bolívar 24677f93bc kconfig: add dt_path_enabled, dt_alias_enabled
There is already a way to check if a node is enabled based on its node
label, but we don't have an equivalent way to do that for a path or an
alias. Add them. These rely on the same underlying edtlib machinery to
get their jobs done, but are being treated differently within Kconfig
in order to match distinctions between paths and aliases made in the
devicetree.h API.

Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
2020-07-23 11:00:39 +02:00
Luiz Augusto von Dentz 75f47a56b5 Bluetooth: Add config option to disable security checks
This adds CONFIG_BT_CONN_DISABLE_SECURITY which can be used to disable
security checks for incoming requests enabling to test accessing GATT
attributes and L2CAP channels that would otherwise require
encryption/authentication in order to be accessed.

It depends on BT_TESTING to indicate to the users that this is a
testing feature which shall not be used in production.

Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
2020-07-23 11:00:04 +02:00
Andrzej Kaczmarek 38997a5719 Bluetooth: host: Do not set AD on scannable ext adv
Advertising data is not supported on scannable extended advertising
instances.

Signed-off-by: Andrzej Kaczmarek <andrzej.kaczmarek@codecoup.pl>
2020-07-23 10:58:33 +02:00
Andrzej Kaczmarek d93489035c Bluetooth: host: Add flag to indicate ext adv set
It should be possible to identify whether advertising set uses legacy
or extended advertising to avoid performing operations that are not
supported on either of them.

For example, scannable advertising can have advertising data set only
if legacy PDUs are used.

Signed-off-by: Andrzej Kaczmarek <andrzej.kaczmarek@codecoup.pl>
2020-07-23 10:58:33 +02:00
Kamil Kasperczyk 06bf2ca707 net: openthread: Added config options for NCP vendor hooks.
New config option that can be used to enable vendor hooks
for NCP component.

Signed-off-by: Kamil Kasperczyk <kamil.kasperczyk@nordicsemi.no>
2020-07-23 10:44:19 +02:00
Maureen Helm 8c7cef6da0 runners: Implement --erase option in pyocd runner
Implements the common runner option to mass erase before flashing in the
pyocd runner.

Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
2020-07-23 10:30:47 +02:00
Anas Nashif e47866c530 sanitycheck: fix --device-testing without serial-pty
serial-pty is an extension that is not supported in the hardware map, so
we need to work around the fact that it is not part of the map when
dealing with normal serial.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2020-07-22 16:57:14 -05:00
Daniel Leung 8fe7fbf7ee doc: coding_guidelines: sort list in natural order
Sort the MISRA lists in a more natural ascending numeric order.
So instead of 1.1 - 1.10 - 1.11 - 1.2 - 1.3, we now have
1.1 - 1.2 - 1.3 - 1.10 - 1.11.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2020-07-22 17:36:33 -04:00
Marek Porwisz 740e0ccc9e net: openthread: Allow use of custom mbedtls
To allow hardware crypto acceleration custom mbedtls library needs to be
prepared. However current implementation forces the default library to
be used.
This patch allows not using the default library and passing custom
mbedtls target to use with openthread.

Signed-off-by: Marek Porwisz <marek.porwisz@nordicsemi.no>
2020-07-22 15:32:30 -05:00
Francois Ramu 4339183292 west.yml: Update to stm32cube/stm32xx latest branches
Updating SHA1 for the modules/hal/stm32 revision

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2020-07-22 15:24:57 -05:00
Dominik Ermel e3d733f1ba mgmt: smp: Missing socket close in error path
Missing close of socket may cause resource leak, in form of orphaned
socket descriptor, when bind fails.

Coverity CID: 210072
Fixes #26991

Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
2020-07-22 15:22:50 -05:00
Alexander Kozhinov c485207044 boards: arm: yaml: nucleo_h745zi_q_m4
add netif:eth to supported devices
change ram size to 288 as it the size of
  sram0 in h745 SoC

Signed-off-by: Alexander Kozhinov <AlexanderKozhinov@yandex.com>
2020-07-22 15:19:38 -05:00
Alexander Kozhinov dd9e9c2e71 boards: arm: dts: nuleo_h745zi_q_m4
bringing model and compatible descriptors
  to same style as in case of M7 core
enable UART8 for Cortex-M4 in it's dts

Signed-off-by: Alexander Kozhinov <AlexanderKozhinov@yandex.com>
2020-07-22 15:19:38 -05:00
Alexander Kozhinov 3b115be91f boards: arm: dts: nuleo_h745zi_q_m7
updating comment on resources

Signed-off-by: Alexander Kozhinov <AlexanderKozhinov@yandex.com>
2020-07-22 15:19:38 -05:00
Peter Bigot a1babb7f1f drivers: eeprom_slave: add const qualifier to read-only data
The EEPROM device doesn't mutate the source data it's given, so update
the API signature to reflect this fact.

Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
2020-07-22 21:41:12 +02:00
Jukka Rissanen 2705a9d61b net: if: Network interface was missing for offloaded drivers
The NET_IF_OFFLOAD_INIT() macro was not converted to use
Z_STRUCT_SECTION_ITERABLE() macros in commit 62580748e5
("net: Use section foreach macros"). This meant that for those boards
that use offloaded network stack, the network interface was not created
and network connectivity was lost.

Fixes #27037

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2020-07-22 14:17:37 -04:00
Michael Hope b046ca5409 net: tcp2: fix unaligned access in the TCP2 stack
The TCP2 stack does operations directly on the packet data which may
or may not be aligned.  The unaligned access causes a fault on the
Cortex-M0+ so use the UNALIGNED_* macros instead.

Signed-off-by: Michael Hope <mlhx@google.com>
2020-07-22 15:08:31 +03:00
Tobias Svehagen 71e7cd3f99 drivers: wifi: esp: Fix issue with incorrect tx timeout
It can happen that the command '>' is received between
modem_cmd_send_nolock and modem_cmd_handler_update_cmds. Since the
command handler for '>' is not set, sem_tx_ready will not be given
and _sock_send will timeout. Make sure the command handlers are set
before the send by also passing them to modem_cmd_send_nolock.

Signed-off-by: Tobias Svehagen <tobias.svehagen@gmail.com>
2020-07-22 15:06:41 +03:00
Michael Hope 045cc2eb2a boards: arm: configure and document the bootloader on the Trinket M0
The Trinket M0 has a Adafruit UF2 bootloader.  Configure and document
how to use it.

Signed-off-by: Michael Hope <mlhx@google.com>
2020-07-22 13:24:37 +02:00
Michael Hope 8c1f1865af soc: sam0: add support for the BOSSA bootloader
This adds a new config option for SAM0 targets that use the BOSSA
bootloader.  If the CDC ACM driver is also enabled, then the
programmer can automatically reset the board into the bootloader for
programming.

Signed-off-by: Michael Hope <mlhx@google.com>
2020-07-22 13:24:37 +02:00
Michael Hope 62a236e546 usb: cdc_acm: add a DTE rate changed callback
This is called when the USB host changes the virtual baud rate.

This is used by Arduino style boards to signal that the board should
reset into the bootloader.

Signed-off-by: Michael Hope <mlhx@google.com>
2020-07-22 13:24:37 +02:00
Andries Kruithof f434beb2bf doc: Coding Guideline: correct reference for rule 18.6 examples
Rule 18.6 has the examples split in two files. This PR adds
the correct reference to the example files in the gitlab
repository

Signed-off-by: Andries Kruithof <Andries.Kruithof@nordicsemi.no>
2020-07-22 12:43:08 +02:00
David Leach 5803ec1bf0 arch: arm: mpu: Use temporary MPU mapping while reprogramming NXP MPU
Race conditions exist when remapping the NXP MPU. When writing the
start, end, or attribute registers of a MPU descriptor, the hardware
will automatically clear the region's valid bit. If that region gets
accessed before the code is able to set the valid bit, the core will
fault.

Issue #20595 revealled this problem with the code in region_init()
when the compiler options are set to no optimizations. The code
generated by the compiler put local variables on the stack and then
read those stack based variables when writing the MPU descriptor
registers. If that region mapped the stack a memory fault would occur.
Higher compiler optimizations would store these local variables in
CPU registers which avoided the memory access when programming the
MPU descriptor.

Because the NXP MPU uses a logic OR operation of the MPU descriptors,
the fix uses the last descriptor in the MPU hardware to remap all of
dynamic memory for access instead of the first of the dynamic memory
descriptors as was occuring before. This allows reprogramming of the
primary discriptor blocks without having a memory fault. After all
the dynamic memory blocks are mapped, the unused blocks will have
their valid bits cleared including this temporary one, if it wasn't
alread changed during the mapping of the current set.

Fixes #20595

Signed-off-by: David Leach <david.leach@nxp.com>
2020-07-22 11:27:40 +02:00
Erwan Gouriou 60f1d70fa3 buildkite: Increase timeout
Some jobs require more than 120 minutes to complete.
But 180 appears to be long enough.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2020-07-22 11:02:40 +02:00
Kumar Gala 49d32fbb67 samples: adxl362: Fix building sample with sanitycheck
Tweak sample.yaml so we at least build this sample on one platform.

Fixes #16790

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2020-07-22 10:26:54 +02:00
Kamil Kasperczyk f061400b37 net: openthread: platform: Removed double-buffering in UART send.
Putting data to local buffer before transmission was removed
to optimize operation. Local buffering was not needed, as passed
buffer cannot be modified until sending is finished.

Signed-off-by: Kamil Kasperczyk <kamil.kasperczyk@nordicsemi.no>
2020-07-22 11:08:21 +03:00
David Leach 1b192df030 samples: drivers: Fix unitialized spi_cfg in spi_fujitsu_fram sample
Fixes #19670

Signed-off-by: David Leach <david.leach@nxp.com>
2020-07-22 09:59:51 +02:00
Peter Bigot 0d480e78f8 settings: disallow modifying the content of a subtree name
There may be value in being able to rename a subtree, but there is no
identified need to be able modify the text of an assigned subtree
name.

Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
2020-07-21 21:54:40 -04:00
Ningx Zhao 06ce1e4c32 tests: stack modifying and adding test case
1.Add some comments to describe functions performance
2.add a new testcase to implement push can be waited
when there are no items available.

Signed-off-by: Ningx Zhao <ningx.zhao@intel.com>
2020-07-21 21:54:11 -04:00
Andrei Emeltchenko d8b845be4e sanitycheck: Add serial_pty script command line option
Add option to provide to sanitycheck argument for creating
pseudoterminal. Used with hardware without serial console connected.
A pseudoterminal is used to make a sanitycheck believe that it
interacts with a terminal although it actually interacts with the
script.

E.g "sanitycheck --device-testing --device-serial-pty <script>"

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2020-07-21 20:19:33 -04:00