Commit graph

46155 commits

Author SHA1 Message Date
Gerard Marull-Paretas
ca3488cb9b boards: stm32h747i_disco: enable SDRAM
Enable SDRAM on M7 core.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2020-11-24 16:33:17 +01:00
Gerard Marull-Paretas
eedb1125b9 tests: drivers: memc: add test for stm32 SDRAM
Add integration test to check r/w operations on STM32 external SDRAM.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2020-11-24 16:33:17 +01:00
Gerard Marull-Paretas
94d74277b5 CODEOWNERS: add myself to memc drivers
Add myself to memc (memory controller) drivers.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2020-11-24 16:33:17 +01:00
Gerard Marull-Paretas
e671d363b8 drivers: memc: stm32: initial support for stm32 FMC
This commit adds a new driver category for memory controller
peripherals. There is no API involved for now, as it has not been found
necessary for first implementation.

STM32 Flexible Memory Controller (FMC) is the only controller supported
for now. This peripheral allows to access multiple types of external
memories, e.g. SDRAM, NAND, NOR Flash...

The initial implementation adds support for the SDRAM controller only.
The HAL API is used, so the implementation should be portable to other
STM32 series. It has only been tested on H7 series, so for now it can
only be enabled when working on H7.

Linker facilities have also been added in order to allow applications to
easily define a variable in SDRAM.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2020-11-24 16:33:17 +01:00
Gerard Marull-Paretas
cb06f5ee1a west: update hal_stm32
Update hal_stm32 to have access to FMC pins.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2020-11-24 16:33:17 +01:00
Jukka Rissanen
533aaed7a0 samples: net: echo-server: Print receive statistics periodically
Print receive statistics of how many KiB we receive / sec.

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2020-11-24 15:02:45 +02:00
Jukka Rissanen
0ed6a3cd69 tests: net: tcp2: Add RST packet handling tests
Verify that TCP2 will drop invalid RST packets and accept
valid ones.

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2020-11-24 13:08:39 +02:00
Peter Bigot
5263289631 drivers: regulator: avoid improper access to internal structures
Nothing in the API description the delayed work structure sanctions
direct reference to internal fields.  Do not assume that a delayed
work item can be submitted without delay by invoking k_work_submit()
with a reference to the contained work item.  Instead submit with the
delayed API and no wait.

Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
2020-11-24 13:04:48 +02:00
Peter Bigot
fbb7eb81b8 tests: kernel: work_queue: avoid improper access to internal structures
Nothing in the API description the delayed work structure sanctions
direct reference to internal fields.  Do not assume that a delayed
work item can be initialized in any way other than by invoking the
delayed work item init function.  Do not assume that a delayed work
item can be submitted without delay by invoking k_work_submit() with a
reference to the contained work item.

Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
2020-11-24 13:04:48 +02:00
Peter Bigot
cd2a5dd612 bluetooth: mesh: avoid improper access to internal structures
Nothing in the API description the delayed work structure sanctions
direct reference to internal fields.  Do not assume that a delayed
work item can be submitted without delay by invoking k_work_submit()
with a reference to the contained work item.  Instead submit with the
delayed API and no wait.

Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
2020-11-24 13:04:48 +02:00
Peter Bigot
550a1f411d net: net_tc: change illicit reference to work queue internal state
Debug messages used the address of a member of the work_q structure as
an identifier; that field is not public API, so replace it with the
address of the work queue itself.

Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
2020-11-24 13:04:48 +02:00
Marcin Niestroj
c934e74bf9 drivers: modem: gsm_ppp: constify modem_cmd and setup_cmd structures
Constifying global data allows to save lots of RAM. This improvement
allows to save 224 bytes of RAM when compiled on ARM, with default
configuration.

Signed-off-by: Marcin Niestroj <m.niestroj@grinn-global.com>
2020-11-24 12:59:50 +02:00
Marcin Niestroj
ddf2278c3f drivers: modem: ublox-sara-r4: constify modem_cmd and setup_cmd structures
Constifying global data allows to save lots of RAM. Defining data inside
function as 'static const' allows on the other hand to save stack usage
and reduced code size (because data doesn't have to be copied on stack
in runtime).

This improvement allows to save 448 bytes of RAM and 88 bytes of ROM
when compiled on ARM, with default configuration.

Signed-off-by: Marcin Niestroj <m.niestroj@grinn-global.com>
2020-11-24 12:59:50 +02:00
Marcin Niestroj
e0a418c1e3 drivers: wifi: esp: constify modem_cmd and setup_cmd structures
Constifying global data allows to save lots of RAM. Defining data inside
function as 'static const' allows on the other hand to save stack usage
and reduced code size (because data doesn't have to be copied on stack
in runtime).

This improvement allows to save 640 bytes of RAM and 64 bytes of ROM
when compiled on ARM.

Signed-off-by: Marcin Niestroj <m.niestroj@grinn-global.com>
2020-11-24 12:59:50 +02:00
Marcin Niestroj
1d25e9c6ae drivers: modem: constify modem_cmd and setup_cmd structures
modem_cmd and setup_cmd structures are used only to store static
information about commands to be sent and replies to be
received. Reference it as const, so that it is possible to define const
instances and save some RAM space by placing those definitions entirely
in ROM.

Signed-off-by: Marcin Niestroj <m.niestroj@grinn-global.com>
2020-11-24 12:59:50 +02:00
Alexander Kozhinov
9cd2b8cd2f CODEOWNERS: civetweb
update path

Signed-off-by: Alexander Kozhinov <AlexanderKozhinov@yandex.com>
2020-11-24 12:59:00 +02:00
Alexander Kozhinov
e35e8913f9 samples: net: civetweb: Refractor code structure
move all CivetWeb samples to one directory
add directory with CivetWeb common includes
update cmake files
move civetweb sample folder to samples/net

Signed-off-by: Alexander Kozhinov <AlexanderKozhinov@yandex.com>
2020-11-24 12:59:00 +02:00
Kumar Gala
52ad9a468c ci: run_ci.sh: retry failed west update for PR builds
We made a similar change for the nightly builds, but the PR builds
invoke run_ci.sh, so we need the same change here.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2020-11-23 14:42:54 -05:00
Vinayak Kariappa Chettimada
27529e0c0d Bluetooth: controller: Fix periodic sync conditional compilation
Fix Periodic Advertising Synchronization conditional
compilation to allow Extended Scanning feature without
Periodic Advertising Synchronization feature enabled.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2020-11-23 17:01:50 +01:00
Vinayak Kariappa Chettimada
64874168cb Bluetooth: controller: Fix extended adv/sync report buffer leak
Fix node rx buffer leak if extended advertising and/or
periodic sync reports are masked out by the host.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2020-11-23 17:01:50 +01:00
Vinayak Kariappa Chettimada
ab82d8e158 Bluetooth: controller: Minor readability different variable use
Use an explicitly named variable to convey auxiliary pointer
present in the PDU chain.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2020-11-23 17:01:50 +01:00
Vinayak Kariappa Chettimada
283a30875b Bluetooth: controller: Add code comments for ext adv report
Added code comments to explain the reasons to drop
incomplete advertising and sync report.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2020-11-23 17:01:50 +01:00
Vinayak Kariappa Chettimada
f5644d4341 tests: Bluetooth: bsim: Periodic Advertising Report generation
Test the LE Periodic Advertising Report generation.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2020-11-23 17:01:50 +01:00
Vinayak Kariappa Chettimada
d80d79e7f9 Bluetooth: controller: Use HCI defines for constants
Use HCI defines for PHY, and RSSI constants.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2020-11-23 17:01:50 +01:00
Vinayak Kariappa Chettimada
20939b7b11 Bluetooth: controller: Periodic Advertising Report generation
Added implementation for LE Periodic Advertising Report
event generation.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2020-11-23 17:01:50 +01:00
Vinayak Kariappa Chettimada
5b62fae902 Bluetooth: controller: Fix Extended Advertising Report generation
Fix Extended Advertising Report generation that skipped
population of AD data when there was no extended header.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2020-11-23 17:01:50 +01:00
Erik Larson
0a0404df29 drivers: ieee802154: cc13xx_cc26xx: raw mode support
This change adds IEEE802154_RAW_MODE support for the
cc1352r.

This allows using the cc1352r 2.4 GHz radio and Sub Ghz
radio as a transceiver (PHY) instead of using L2 networking.

Signed-off-by: Erik Larson <erik@statropy.com>
2020-11-23 09:46:49 +02:00
Rubin Gerritsen
bc6d16e422 systemview: Use common function to get sysview thread name
Use a common function to get the thread name.
There was no necessity in keeping sys_trace_thread_info() inline,

Signed-off-by: Rubin Gerritsen <rubin.gerritsen@nordicsemi.no>
2020-11-21 08:29:26 -05:00
Rubin Gerritsen
7a9da57cd8 systemview: Use thread name when available
This may make it easier to debug.

Signed-off-by: Rubin Gerritsen <rubin.gerritsen@nordicsemi.no>
2020-11-21 08:29:26 -05:00
Rubin Gerritsen
5d121a95e9 systemview: SystemView tracing requires THREAD_MONITOR
Otherwise it will not be able to send its thread list.

Signed-off-by: Rubin Gerritsen <rubin.gerritsen@nordicsemi.no>
2020-11-21 08:29:26 -05:00
Peter Bigot
4ce7cafdf4 tests: net: socketpair: use system instead of user work queue
The socket pairs created for this test when run under user mode are
accessible only from the thread that created them.  Although it is
possible for that thread to grant access to another thread:

* there does not appear to be a way to do that when referencing a
  descriptor rather than a pointer to a kernel object;
* there is no public API that supports granting the object rights to a
  user thread that animates a work queue.

Until these gaps are addressed use the system work queue run
supervisor-mode threads to verify the asynchronous behavior of the
API.

Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
2020-11-21 14:49:40 +02:00
Kumar Gala
1e674ad815 drivers: spi: mcux_flexcomm: Fix build failure
Change to spi_context_lock missed one spot in the flexcomm driver and
this causes a build issue.  Pass spi_cfg to spi_context_lock to fix
the issue.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2020-11-20 13:59:24 -05:00
Maureen Helm
17695ce9d9 samples: tracing: Extend the SystemView configuration to more platforms
Extends the Segger SystemView configuration for the tracing sample to
more platforms that support Segger RTT, not just nrf52840dk_nrf52840.

Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
2020-11-20 12:54:09 -06:00
Maureen Helm
ca6ed09e2b samples: tracing: Extract SystemView configuration into separate file
Extracts the Segger SystemView configuration for the tracing sample from
sample.yaml into a separate file. Increases the idle thread stack size
to fix overflows observed on i.MX RT boards. Removes
CONFIG_USE_SEGGER_RTT=y which is selected by CONFIG_SEGGER_SYSTEMVIEW.

Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
2020-11-20 12:54:09 -06:00
Maureen Helm
01b1151d36 soc: arm: Use DTCM section for RTT and SystemView data on i.MX RT SoCs
Configures i.MX RT SoCs that support cacheable external SDRAM to use the
DTCM linker section for Segger RTT and SystemView data.

Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
2020-11-20 12:54:09 -06:00
Maureen Helm
57b756b442 debug: tracing: Add Segger RTT and SystemView linker section options
Enables optionally placing Segger RTT and SystemView data in the DTCM
linker section instead of the default data section. This is needed on
SoCs in the i.MX RT series that use cacheable external SDRAM to store
data.

Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
2020-11-20 12:54:09 -06:00
Spoorthy Priya Yerabolu
f8f220a9aa scripts: sanitycheck: Generate json report format
Generating JSON report format without changing
the existing report formats.
JSON report is divided into three sections
environment tests are run
test cases basic info and discarded tests
after applying filters
Added the complete debug log to the report

Fixes: #26443

Signed-off-by: Spoorthy Priya Yerabolu <spoorthy.priya.yerabolu@intel.com>
2020-11-20 11:44:29 -05:00
Jukka Rissanen
e8472f941a samples: net: dumb_http_server_mt: Fix the OK/FAIL status check
The test script http-get-file-test.sh will send a POST to inform
whether the test was ok or not. This is needed so that we can
test the TLS functionality properly, earlier use of netcat would
not do TLS handshakes.

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2020-11-20 16:07:59 +02:00
Jukka Rissanen
c5ac79c91b samples: net: coap-server: Use IPv4 instead of IPv6
The Docker tests expect IPv4 so use that only in the coap-server.

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2020-11-20 16:07:59 +02:00
Jukka Rissanen
725a65afec samples: net: echo-client: Fix the return code in Docker tests
The pass/fail return code was not returned to the caller in
Docker based testing so the runner script did not know if the
sample test passed or not.

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2020-11-20 16:07:59 +02:00
Jukka Rissanen
b751740bfa samples: net: mqtt: Fix the return code in Docker tests
The pass/fail return code was not returned to the caller in
Docker based testing so the runner script did not know if the
sample test passed or not.

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2020-11-20 16:07:59 +02:00
Jukka Rissanen
d1901d6a2f net: scripts: Make test runner script fully generic
Move actual test cases from the run-sample-tests.sh script to
the network samples directory that are supported by Docker based
testing. Each network sample directory that supports Docker testing,
will contain docker-test.sh script that is sourced by the runner
script. The docker-test.sh script will run the test as needed and
then return return value to the runner script.

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2020-11-20 16:07:59 +02:00
Jukka Rissanen
03df709a46 net: tc: Refactor RX and TX thread priorities
Set the RX/TX thread priorities so that if cooperative priorities
are used, then lowest priority thread will have priority -1 which
is the lowest cooperative priority. The higest net thread priority
will depend on number of traffic classes but with max value 8,
the highest priority will be -8.

If preemptive priorities are used, then highest priority thread
will have priority 0, which is the highest preemptive priority.
In this case, the lowest thread priority will be 7 if there are
8 traffic classes.

The motivation for this change is that for cooperative priorities
we want to let other cooperative priority threads to run before
networking. But if preemptive priorities are used, we want
networking threads to run reasonably often compared to other
preemptive priority threads.

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2020-11-20 12:57:29 +02:00
Jukka Rissanen
f02fd19706 net: Adjust the thread priorities
If networking pre-emptive thread priorities are enabled,
then use the proper macro to enable them.

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2020-11-20 12:57:29 +02:00
Jukka Rissanen
6e54f5462c samples: net: Adjust the thread priorities
If networking pre-emptive thread priorities are enabled,
then use the proper macro to enable them.

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2020-11-20 12:57:29 +02:00
Jukka Rissanen
b88d5b6c67 tests: net: Adjust the thread priorities
Adjust the test thread priority so that the test / IP stack
has a chance to run and the test passes.

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2020-11-20 12:57:29 +02:00
Jukka Rissanen
575fc5fe14 net: tc: Allow user to select pre-emptive threading for RX/TX
Let user to decide whether the RX/TX threads are run in either
co-operative or pre-emptive thread priority.
Default is co-operative threading.

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2020-11-20 12:57:29 +02:00
Kalyan Sriram
7120a743a2 boards: arm: update blackpill_f411ce definition
Discussion while adding the blackpill_f401ce board definition brought
up a few issues with the blackpill_f411ce board definition, which are
addressed in this commit:
* doc/index.rst had a typo
* support/openocd.cfg was incorrectly using the f4discovery profile,
  which was fixed by using a custom profile for the SoC instead
* removed SoC from blackpill_f411ce.dts compatible line
* added support for jlink flash option

Signed-off-by: Kalyan Sriram <coder.kalyan@gmail.com>
2020-11-20 10:57:12 +01:00
Kalyan Sriram
763d76875e boards: arm: enable adc test for blackpill_f401ce
Adds the blackpill_f401ce board configuration to the
adc driver test.

Signed-off-by: Kalyan Sriram <coder.kalyan@gmail.com>
2020-11-20 10:57:12 +01:00
Kalyan Sriram
70fee18d40 boards: arm: add blackpill_f401ce board definition
Duplicates the existing blackpill_f411ce board definition for the
blackpill_f401ce board (WeAct Blackpill V3.0), which has identical specs
except for 84MHz clock (instead of 100Mhz) and 96K SRAM (instead of
128K).

Signed-off-by: Kalyan Sriram <coder.kalyan@gmail.com>
2020-11-20 10:57:12 +01:00