Commit graph

47400 commits

Author SHA1 Message Date
Kumar Gala 3befd7d45f cleanup: rename sanitycheck references to twister
Cleanup references to sanitycheck that should now be twister.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2021-01-14 07:50:52 -06:00
Katsuhiro Suzuki fadef43433 kernel: describe detailed means of K_FP_REGS flag
Current brief of the flag is ambiguous. This patch adds more details
about K_FP_REGS flag.

Signed-off-by: Katsuhiro Suzuki <katsuhiro@katsuster.net>
2021-01-14 14:24:51 +01:00
Hake Huang 129ddfe5c6 tests: fpu_sharing fix print size issue
As FPU enalbed the printf code size is changed,
so increase main stack size to make test pass on NXP RT platforms

Signed-off-by: Hake Huang <hake.huang@oss.nxp.com>
2021-01-14 07:30:30 -05:00
Martí Bolívar 7745f3edba west boards: add --name filter
This is an optional regular expression that can be used to filter the
output.

Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
2021-01-14 12:39:21 +01:00
Ioannis Glaropoulos c6c14724ba arch: arm: cortex_m: fix stack overflow error detection
In rare cases when a thread may overflow its stack, the
core will not report a Stacking Error. This is the case
when a large stack array is created, making the PSP cross
beyond the stack guard; in this case a MemManage fault
won't cause a stacking error (but only a Data Access
Violation error). We fix the fault handling logic so
such errors are reported as stack overflows and not as
generic CPU exceptions.

Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
2021-01-14 12:35:47 +01:00
Ioannis Glaropoulos 202c2fde54 arch: arm: cortex_m: do not read MMFAR if MMARVALID is not set
When the MMARVALID bit is not set, do not read the MMFAR
register to get the fault address in a MemManage fault.
This change prevents the fault handler to erroneously
assume MMFAR contains a valid address.

Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
2021-01-14 12:35:47 +01:00
Jakub Rzeszutko 889e37b8d9 shell: shell_utils internal api update
Add prefix z_ to internal functions provided by the shell_utils
module.

Signed-off-by: Jakub Rzeszutko <jakub.rzeszutko@nordicsemi.no>
2021-01-14 12:07:25 +01:00
Jakub Rzeszutko 31bc7d2d1e shell: make shell_root_cmd_find function static
Function shell_root_cmd_find was only used in shell_utils.c file.
Hence it is changed to static and renamed to root_cmd_find.

Signed-off-by: Jakub Rzeszutko <jakub.rzeszutko@nordicsemi.no>
2021-01-14 12:07:25 +01:00
Jakub Rzeszutko 0738e1f04d shell: remove unused function shell_command_add
This function is not used at all.

Signed-off-by: Jakub Rzeszutko <jakub.rzeszutko@nordicsemi.no>
2021-01-14 12:07:25 +01:00
Jakub Rzeszutko 0eea85bf08 shell: shell_ops internal api update
Add prefix z_ to internal functions provided by the shell_ops module.

Signed-off-by: Jakub Rzeszutko <jakub.rzeszutko@nordicsemi.no>
2021-01-14 12:07:25 +01:00
Jakub Rzeszutko 52c999210f shell: internal api update in shell.h
Add Z_ prefix for internal macros.
Remove obsolete defines.

Signed-off-by: Jakub Rzeszutko <jakub.rzeszutko@nordicsemi.no>
2021-01-14 12:07:25 +01:00
Jakub Rzeszutko 14022083b2 shell: internal api update: uart backend
Add prefix Z_ to internal macros.
Remove obsolete and not used macros.

Signed-off-by: Jakub Rzeszutko <jakub.rzeszutko@nordicsemi.no>
2021-01-14 12:07:25 +01:00
Jakub Rzeszutko 37e8d825bf shell: internal api update: log backend
Add prefix z_ to internal functions and macros handling log backend.

Signed-off-by: Jakub Rzeszutko <jakub.rzeszutko@nordicsemi.no>
2021-01-14 12:07:25 +01:00
Jakub Rzeszutko 91b01ce703 shell: internal api update: history module
Add prefix z_ to internal functions handling history feature.

Signed-off-by: Jakub Rzeszutko <jakub.rzeszutko@nordicsemi.no>
2021-01-14 12:07:25 +01:00
Jakub Rzeszutko 58c7114c17 shell: internal api update: wildcards
Mark global wildcard functions with z_ prefix.

Signed-off-by: Jakub Rzeszutko <jakub.rzeszutko@nordicsemi.no>
2021-01-14 12:07:25 +01:00
Jakub Rzeszutko fb6155a242 shell: internal api update: help module
Add prefix z_ to internal functions printing help.

Signed-off-by: Jakub Rzeszutko <jakub.rzeszutko@nordicsemi.no>
2021-01-14 12:07:25 +01:00
Jakub Rzeszutko 460995c810 shell: internal api update: fprintf
Add z_ prefix to internal fprintf functions and macros.

Signed-off-by: Jakub Rzeszutko <jakub.rzeszutko@nordicsemi.no>
2021-01-14 12:07:25 +01:00
Anas Nashif fc1b5de4c3 kernel: move thread definitions to thread.h
Move thread definitions to its own header to avoid redeclaration and
redefinition of types which is not allowed in some standards.

Fixes #29937

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2021-01-13 18:18:42 -05:00
Guennadi Liakhovetski ca0e5df219 xtensa: don't build and run the reset handler twice
Currently Zephyr links reset-vector.S twice in xtensa builds:
into the bootloader and the main image. It is run at the end
of the boot loader execution and immediately after that again
in the beginning of the main code. This patch adds a
configuration option to select whether to link the file to the
bootloader or to the application. The default is to the
application, as needed e.g. for QEMU, SOF links it to the
bootloader like in native builds.

Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
2021-01-13 18:17:40 -05:00
Sylvio Alves ca940400b2 soc: esp32: add reboot call
Add ESP32 reset function

Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
2021-01-13 17:19:43 -05:00
Peter Bigot 72998f07e6 dts: mtd: refactor JESD216 support
jedec,jesd216.yaml has properties for any memory device that conforms
to the JESD216 specification.  This file at a minimum should be
included in the binding for any driver that interacts with such a
device.

jedec,spi-nor-common.yaml extends jedec,jesd216 with additional
parameters useful for memory devices that are not available from
standard JESD216 parameter tables.  This file may be included instead
of jedec,jesd216.yaml if a driver is able to support additional
functionality related to the extended description.

jedec,spi-nor.yaml remains the binding for the Zephyr SPI_NOR driver
alone.

Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
2021-01-13 11:58:37 -06:00
Peter Bigot e017441ca0 boards: remove has-be32k from SPI NOR mtd nodes
Use of this property has no effect since it was by SFDP erase data in
Zephyr 2.4.

Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
2021-01-13 11:58:37 -06:00
Daniel Leung 7a5f9e81de x86: define dynamic thread object alignment
x86 and x86_64 require certain alignment in the k_thread struct
since the buffer to save/restore FPU/SSE registers requires
strict alignment.

Fixes #29589
Fixes #29629

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2021-01-13 09:43:55 -08:00
Daniel Leung fe477ea6d3 kernel: userspace: aligned memory allocation for dynamic objects
This allows allocating dynamic kernel objects with memory alignment
requirements. The first candidate is for thread objects where,
on some architectures, it must be aligned for saving/restoring
registers.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2021-01-13 09:43:55 -08:00
Daniel Leung 0c9f9691c4 kernel: mempool: add z_thread_aligned_alloc
This adds a new z_thread_aligned_alloc() to do memory allocation
with required alignment.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2021-01-13 09:43:55 -08:00
Markus Fuchs 041c80748a net: hostname: Update unique hostname on link address change
Add Kconfig option NET_HOSTNAME_UNIQUE_UPDATE to allow the unique
hostname - which is derived from the network interface's link
address - to be updated on both initial assignment and updates of
the link address.

Signed-off-by: Markus Fuchs <markus.fuchs@de.sauter-bc.com>
2021-01-13 17:50:32 +02:00
Sylvio Alves dafe37677d west.yml: update esp32 manifest
Update esp32 hal driver
Added west-commands option to allow proper
submodules download

Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
2021-01-13 09:10:46 -05:00
Shubham Kulkarni 5cfe834596 boards: esp32: use cmake to build ESP-IDF bootloader
Make builds are not supported on Windows command prompt

Signed-off-by: Shubham Kulkarni <shubham.kulkarni@espressif.com>
2021-01-13 09:10:46 -05:00
Sylvio Alves 940f92e934 docs: esp32: updated environment setup
Previous Zephyr environment required the usage
of external ESP-IDF cloning as source of headers
and libraries. The latest implementation uses external
module as source.

Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
2021-01-13 09:10:46 -05:00
Shubham Kulkarni 49941733c6 boards: esp32: linker: move libraries and reserve DRAM regions
Fix issues with restoring symbols from common ld templates
Workaround esptool linker sections limit
Move kernel library into IRAM
Improve UDP throughput

Signed-off-by: Shubham Kulkarni <shubham.kulkarni@espressif.com>
2021-01-13 09:10:46 -05:00
Sylvio Alves 57c7dfbbc3 drivers: entropy: esp32: update register call
Update entropy driver to use proper registers

Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
2021-01-13 09:10:46 -05:00
Shubham Kulkarni a5ddb72261 boards: esp32: add 'nostdinc' expection for espressif toolchain
disable nostdinc for espressif tolchain

Signed-off-by: Shubham Kulkarni <shubham.kulkarni@espressif.com>
2021-01-13 09:10:46 -05:00
Mahavir Jain 29f87c3a0f boards: esp32: add XIP support and enable bootloader build
Disable RTC WDT enabled (by default) by 2nd stage bootloader in ESP-IDF.
This WDT timer ensures correct hand-over and startup sequence from
bootloader to application.

Enabling bootloader caused system clock initialization to fail
when clock rate is greater then 80MHz. This also fixes
esp32 clock source code.

Signed-off-by: Mahavir Jain <mahavir@espressif.com>
2021-01-13 09:10:46 -05:00
Hans Unzner 5c90612120 boards: arm: added support for nucleo_f410rb
This adds the Nucleo-F410RB to the supported boards.

Signed-off-by: Hans Unzner <hansunzner@gmail.com>
2021-01-13 09:07:52 -05:00
Hans Unzner c99ae8d456 soc: arm: added support for STM32F410XX
Add Kconfig for STM32F410XX

Signed-off-by: Hans Unzner <hansunzner@gmail.com>
2021-01-13 09:07:52 -05:00
Hans Unzner c502b01d64 dts: arm: added support for STM32F410RB
ADD DTS Files for STM32F410XB

Signed-off-by: Hans Unzner <hansunzner@gmail.com>
2021-01-13 09:07:52 -05:00
Hans Unzner 9bde4c76c3 drivers: stm32: adaption for use with STM32F410RB
-The STM32F410RB has no AHB2 bus so LL_AHB2_GRP1_EnableClock() and
  LL_AHB2_GRP1_DisableClock() should not be called for this soc.
-The interrupt table had to be changed because of no OTG_FS_WKUP_IRQn
  (no USB OTG at all).

Signed-off-by: Hans Unzner <hansunzner@gmail.com>
2021-01-13 09:07:52 -05:00
Enjia Mai 489223146f tests: ztest: add test cases and example for fatal handler hook
Add testing for fatal and assert handler hook feature, and examples
of how to use it.

Signed-off-by: Enjia Mai <enjiax.mai@intel.com>
2021-01-13 09:05:31 -05:00
Enjia Mai a420cb4fd5 tests: ztest: add a common fatal and assert hook for special purpose
This is in order to reduce the redundancy code writing for fatal and
assert handler for error case testing. They can be used both in kernel
and userspace, and are also SMP safe.

Signed-off-by: Enjia Mai <enjiax.mai@intel.com>
2021-01-13 09:05:31 -05:00
Julien Massot e396fd77a6 dts: bindings: Add CPU device bindings for Cortex-R7.
This commit adds device bindings for Cortex-R7.

Signed-off-by: Julien Massot <julien.massot@iot.bzh>
2021-01-13 15:04:43 +01:00
Julien Massot 41f5c948a5 arch: arm: cortex_r: Add CMSIS support for Cortex-R7
This commit adds the CMSIS-Core(R) support to the Zephyr RTOS Cortex-R7.


Signed-off-by: Julien Massot <julien.massot@iot.bzh>
2021-01-13 15:04:43 +01:00
Julien Massot d3345dd54d arch: arm: Add Cortex-R7 support
Pass the correct -mcpu flags to the compiler when building for the
Cortex-R7.

Signed-off-by: Julien Massot <julien.massot@iot.bzh>
2021-01-13 15:04:43 +01:00
Andrzej Głąbek 253d2470f2 samples/boards/nrf/nrfx: Make the sample usable on all nRF SoCs
Conditionally use either DPPI or PPI channel in the sample so that
it can be built for all nRF SoCs. Update documentation accordingly.

Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
2021-01-13 08:03:06 -05:00
Robert Lubos 4851611d55 net: coap: Fix long options encoding
`delta_size` was incorrectly used to assess whether extended option
length field shall be used. In result, options larger than 268 bytes
were not encoded properly.

Fixes #31206

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2021-01-13 08:02:03 -05:00
Marc Herbert fcb8552b4a doc-build.yml: pip3 install wheel, fix 'invalid command bdist_wheel'
As recommended by @mbolivar-nordic and... stackoverflow.

While I could not reproduce this locally, this should get rid of many
non-fatal pip errors in CI all looking like this one:

Building wheels for collected packages: PyYAML, progress, psutil, ...

 Running setup.py bdist_wheel for PyYAML: started
 Running setup.py bdist_wheel for PyYAML: finished with status 'error'

 Complete output from command /usr/bin/python3 -u -c "import setuptools,
  tokenize;__file__='/tmp/pip-build-b3sj5a6m/PyYAML/setup.py';
  f=getattr(tokenize, 'open',open)(__file__);code=f.read().replace(
  '\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))"
  bdist_wheel -d /tmp/tmpvn0bt6xfpip-wheel- --python-tag cp36:

  Failed building wheel for PyYAML
  usage: -c [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...]
     or: -c --help [cmd1 cmd2 ...]
     or: -c --help-commands
     or: -c cmd --help

  error: invalid command 'bdist_wheel'

  ----------------------------------------
  Running setup.py clean for PyYAML

Etc.

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2021-01-13 08:01:20 -05:00
Marc Herbert 6d36386e13 requirements-compliance: restrict junitparser version < 2
junitparser version 2 is incompatible with check_compliance.py, it fails
like this:

File "./scripts/ci/check_compliance.py", line 295, in parse_kconfig
   self.skip("Not a Zephyr tree (ZEPHYR_BASE unset)")
File "./scripts/ci/check_compliance.py", line 141, in skip
   self.case.result = Skipped(msg, "skipped")
File "/usr/local/lib/python3.9/site-packages/junitparser/junitparser.py"
   line 682, in result
   for entry in value:

TypeError: 'Skipped' object is not iterable

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2021-01-13 07:58:37 -05:00
Marc Herbert 205dcdf636 check_compliance: fix broken format() in exception handler
Likely an accident when commit 288ae28c13 moved the script to the main
repo. Stayed unnoticed because this handler rarely ever runs.

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2021-01-13 07:58:37 -05:00
Noelle Clement 0e327750a0 soc: arm: stm32: DTSI update for eeprom size stm32l151Xc
Add EEPROM size to STM32L151xC.dtsi

Signed-off-by: Noelle Clement <noelleclement@hotmail.com>
2021-01-13 07:50:28 -05:00
Martí Bolívar 9cacaf1d36 boards: nrf: remove misleading DT overlay docs
Replace these with links to the actual documentation as needed, or
just remove them entirely. These are getting copy/pasted around and
I'm trying to avoid that happening in the future.

Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
2021-01-13 07:38:38 -05:00
Hake Huang 2263462aee test: resude sys_kernel loops in small ram
need ram up to 36M for twr_ke18f so reduce the loops

Signed-off-by: Hake Huang <hake.huang@oss.nxp.com>
2021-01-13 07:38:07 -05:00