Commit graph

41120 commits

Author SHA1 Message Date
Krzysztof Chruscinski
bc3891ef03 CODEOWNERS: Add @nordic-krch and @jarz-nordic to shell, logging samples
They are already owners of modules itself but not the samples.

Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
2019-03-28 08:41:28 -05:00
Krzysztof Chruscinski
fdc1ee59d8 sample: subsys: logging: Ensure that logger RTT backend is tested
Logger RTT backend should be compiled on the boards that have RTT.

Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
2019-03-28 08:41:28 -05:00
Krzysztof Chruscinski
8dd015f49e sample: subsys: shell: Ensure that shell RTT backend is tested
Shell RTT backend should be compiled on the boards that have RTT.

Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
2019-03-28 08:41:28 -05:00
Krzysztof Chruscinski
46936416ee boards: Remove enabling RTT by default on pca10040 and pca10056
nrf52840_pca10056 and nrf52_pca10040 was enabling RTT by default
for all samples. It has some implications like forwarding printk
to logger and that, as a default behavior, may not be welcomed.

Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
2019-03-28 08:41:28 -05:00
Joakim Andersson
273796e1bb Bluetooth: controller: Fix unknown rsp received during enc procedure
The master is using unknown rsp to terminate slave side initiated
procedures that has collided with the encryption procedure initiated by
the master.
We need to handle an unknown response that is sent in unencrypted during
the encryption procedure, even though we have already set up to receive
encrypted packets.

Fixes #14044

Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
2019-03-28 14:41:10 +01:00
Vinayak Kariappa Chettimada
3353c9f3c8 Bluetooth: Fix scan failed to start due to RPA timeout
Updating the Resolvable Private Address when advertising and
active scanning in progress fails and clears the RPA_VALID
flag; making the next bt_le_scan_start while continuing to
advertise to fail.

This is fixed by keeping the RPA_VALID flag remain set.
Stopping and starting active scanning to update RPA can be
implemented in a separate commit.

Fixes #9463.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2019-03-28 14:37:58 +01:00
Andrzej Głąbek
436c4262da boards: nrf9160_pca10090: Fix LEDs active state
The nRF91 DK User Guide clearly says "the LEDs are active high,
meaning that writing a logical one ('1') to the output pin will
illuminate the LED".

Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
2019-03-28 08:32:23 -05:00
Mieszko Mierunski
0b2946f4f3 drivers: nrf: Add power management to uarte shim
Adds power management to uarte shim.

Fixes 12501

Signed-off-by: Mieszko Mierunski <mieszko.mierunski@nordicsemi.no>
2019-03-28 09:30:57 -04:00
Mieszko Mierunski
cbf4e54ead tests: uart: Add nrf9160_pca10090 to UART async test
Add nrf9160_pca10090 to UART async test.
Add myself as codeowner to uart_async_api tests.

Signed-off-by: Mieszko Mierunski <mieszko.mierunski@nordicsemi.no>
2019-03-28 09:30:57 -04:00
Mieszko Mierunski
48f005707e tests: uart: Add chained write test case for UART async API
Add new test case

Signed-off-by: Mieszko Mierunski <mieszko.mierunski@nordicsemi.no>
2019-03-28 09:30:57 -04:00
Mieszko Mierunski
b121660a8f drivers: nrf: Enable usage of Async UART API for UARTE on nrf91
Modify driver to use PPI or DPPI depending on soc.

Signed-off-by: Mieszko Mierunski <mieszko.mierunski@nordicsemi.no>
2019-03-28 09:30:57 -04:00
Mieszko Mierunski
7a0f921517 boards: nrf: Enable TIMER1 by default in nrf9160_pca10090
Enable TIMER1 by default in nrf9160_pca10090 so it can be selected
by user for hardware byte counting in UARTE or other purpose.

Signed-off-by: Mieszko Mierunski <mieszko.mierunski@nordicsemi.no>
2019-03-28 09:30:57 -04:00
Mieszko Mierunski
7700322961 dts: nrf: Add DPPIC to device tree.
Add DPPIC to dts. Add HAS_HW_NRF_DPPIC to nrf91 soc.

Signed-off-by: Mieszko Mierunski <mieszko.mierunski@nordicsemi.no>
2019-03-28 09:30:57 -04:00
Mieszko Mierunski
35aedfa532 drivers: nrf: Rework UARTE shim for uart ASYNC API.
Rework uart_nrfx_uarte shim to work with asynchronous API.

Signed-off-by: Mieszko Mierunski <mieszko.mierunski@nordicsemi.no>
2019-03-28 09:30:57 -04:00
Ulf Magnusson
7ccc7889fa logging: Remove SYS_LOG implementation
Replaced by the new CONFIG_LOG system.

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2019-03-28 09:30:29 -04:00
Ulf Magnusson
eebce9d0e5 logging: doc: Remove SYS_LOG-related documentation
Replaced by the new CONFIG_LOG system.

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2019-03-28 09:30:29 -04:00
Ulf Magnusson
0eb6ffa3e9 logging: kconfig: Remove legacy SYS_LOG symbols
Replaced by the new CONFIG_LOG system.

Also remove the "Logging Options" menu and turn the LOG symbol into a
'menuconfig', with prompt "Logging", which appears in the top menu. LOG
and its dependent symbols make up all of the logging Kconfig symbols
now.

Piggyback some minor cleanup.

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2019-03-28 09:30:29 -04:00
Marc Herbert
682961a382 sanitycheck: document that --save-tests appends to existing file
Fix --help message. Also rename run_report() to save_tests() as it's
used only once by --save-tests and nowhere else. Maybe the code was
shared with some --other-report feature in the past but not any more.

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2019-03-28 09:30:00 -04:00
Sebastian Bøe
7061c035cd kconfig: Move Kconfig.modules to the root build directory
Currently, the Kconfig.modules file is placed in the build directory
relative to the CMake "project". But technically, the file is not
project-specific, but global, or build-directory specific.

So we move it up one level to the CMAKE_BINARY_DIR instead. Currently,
there is only one project, so this change has no effect, but this
enables us to have multiple projects in the future, which again
enables multi-image builds.

Signed-off-by: Sebastian Bøe <sebastian.boe@nordicsemi.no>
Signed-off-by: Håkon Øye Amundsen <haakon.amundsen@nordicsemi.no>
2019-03-28 09:23:02 -04:00
Aaron Tsui
51fafa7302 boards: nucleo_f746zg: Remove repetitive yaml line
repetitive line

Signed-off-by: Aaron Tsui <aaron.tsui@outlook.com>
2019-03-28 09:09:28 -04:00
Jakub Rzeszutko
6e861e1947 dts: update mermory regions for nrf chips
According to nrf51 and nrf52 specifaction every peripheral is
assigned a fixed block of 0x1000 bytes. Due to that dts for
nrf51 and nrf52 chips have been updated.
The only exception is gpio for nrf52840 where gpio0 and gpio1
share the same memory regions. For this reason, the definition
of gpio for nrf52840 is different from the others.

Signed-off-by: Jakub Rzeszutko <jakub.rzeszutko@nordicsemi.no>
2019-03-28 11:50:43 +01:00
Matias Karhumaa
933acfef43 usb: Fix ACL data tx stalling
This patch increases size of acl_tx_pool and makes sure that acl_read_cb
waits for available buffers.

Size of acl_tx_pool is now configurable with CONFIG_BT_CTLR_TX_BUFFERS.

Previously it was possible to run out of buffers and in that case
acl_read_cb returned. This caused ACL data TX to stall because device
did not read data from HCI out endpoint.

Fixes #14899

Signed-off-by: Matias Karhumaa <matias.karhumaa@gmail.com>
2019-03-28 10:48:26 +01:00
Andrew Boie
cf91f8cf90 elf_helper: fix debug_die call
debug_die() is not implemented in this class, and indeed we
don't even have a reference to the DWARF DIE object.

This is a fatal error anyway, just raise an exception.

Fixes #14762

Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2019-03-27 16:37:49 -05:00
David B. Kinder
5d8e367efe doc: fix misspelling in docs and API comments
Fix misspellings missed during regular reviews.

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2019-03-27 15:59:09 -04:00
Jukka Rissanen
c3cf543452 net: ethernet: lldp: Use short types for ints
Instead of uint16_t and uint8_t, use u16_t and u8_t types.

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2019-03-27 10:13:16 -05:00
Jukka Rissanen
0888b9f85c doc: net: Fix LLDP documentation
The LLDP documentation was missing descriptions for enums
and structs.

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2019-03-27 10:13:16 -05:00
Jukka Rissanen
5378672d8a doc: net: Fix networking overview document
Add references to external documents like RFCs.

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2019-03-27 09:59:48 -05:00
Jukka Rissanen
1564e205e0 doc: net: Minor fixes to BSD socket documentation
Some clarifications to BSD socket descriptions. Also added
rendering hints for some strings.

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2019-03-27 08:37:39 -04:00
Andrzej Głąbek
2c3445b933 CODEOWNERS: Set @nordic-krch as the codeowner of the counter driver
As the author of the latest rework of the counter driver API,
@nordic-krch is a more appropriate person than me to be the codeowner
of this driver.

Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
2019-03-27 11:56:22 +01:00
Carles Cufi
082cf7ac64 logging: Clarify contract of log_output_func_t
The log_output_func_t backend function is supposed to either process or
drop bytes and return the amount of those to the caller. Clarify this in
the documentation.

Fixes #12241

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2019-03-27 09:50:12 +01:00
Marc Herbert
6f011c95c4 sanitycheck: don't generate the top-level Makefile in random order
Also add a "generated by sanitycheck" header to indicate origin and a
warning about the dependency required to actually run the test.

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2019-03-26 22:23:56 -04:00
Thomas Ebert Hansen
d83f926c38 doc: security: Change link to development model.
The development model docs are now part of the technical docs.

Signed-off-by: Thomas Ebert Hansen <thoh@oticon.com>
2019-03-26 22:21:59 -04:00
Thomas Ebert Hansen
2203489f6d doc: security: Update embargo period
The embargo period is 60 days.

Signed-off-by: Thomas Ebert Hansen <thoh@oticon.com>
2019-03-26 22:21:59 -04:00
Thomas Ebert Hansen
eb34b86fe5 doc: security: Correct indentation
Use similar indentation as the other bullet points above.

Signed-off-by: Thomas Ebert Hansen <thoh@oticon.com>
2019-03-26 22:21:59 -04:00
Thomas Ebert Hansen
bb881d2d9d doc: security: Update Security Group definition
Rewrite who the members of the Security Group are
and move the 'ability' of the members to an outer
bullet point.

Signed-off-by: Thomas Ebert Hansen <thoh@oticon.com>
2019-03-26 22:21:59 -04:00
Thomas Ebert Hansen
f1ad50f85a doc: security: Reword unintelligible sentences
The sentence "To process process documentation." does not make
any sense at all.

Add missing "the" to the sentence "in form of".

Signed-off-by: Thomas Ebert Hansen <thoh@oticon.com>
2019-03-26 22:21:59 -04:00
Thomas Ebert Hansen
7166e35487 doc: security: Correct statement about Coverity
Remove statement that static code analysis is planned for the future.

Signed-off-by: Thomas Ebert Hansen <thoh@oticon.com>
2019-03-26 22:21:59 -04:00
Thomas Ebert Hansen
0f0103e0b1 doc: security: Unify citations
Use similar style for citations.
Add online references where applicable.

Signed-off-by: Thomas Ebert Hansen <thoh@oticon.com>
2019-03-26 22:21:59 -04:00
Thomas Ebert Hansen
c9fec3ca7d doc: security: Fix section reference
Replace reference to Chapter 4 with Secure Design section.

Signed-off-by: Thomas Ebert Hansen <thoh@oticon.com>
2019-03-26 22:21:59 -04:00
Thomas Ebert Hansen
33d1067d25 doc: security: Unify name of security subcommittee
Use the term 'Zephyr Security Subcommittee' where applicable.

Signed-off-by: Thomas Ebert Hansen <thoh@oticon.com>
2019-03-26 22:21:59 -04:00
Maksim Masalski
d1f3bba705 can: fix unchecked return from clock_control_get_rate
Inside can_stm32_runtime_configure() result of
clock_control_get_rate() is not checked which might result that
function can return error and that error can not be handled

Coverity-CID: 190926
Fixes: #13886
Signed-off-by: Maksim Masalski <maxxliferobot@gmail.com>
2019-03-26 22:18:15 -04:00
Maureen Helm
5cdbd39e33 soc: nxp_imx: Configure NUM_IRQS independently for each rt soc
Not all i.mx rt socs have the same number of irqs, so move the default
configuration from the soc series level to the individual socs. The
rt1020 hardware reference manual (IMXRT1020RM Rev.1 12/2018) incorrectly
documents 160 irqs (#142-159 reserved), but the soc actually has 142
irqs.

Fixes tests/kernel/gen_isr_table for the mimxrt1020_evk board.

Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
2019-03-26 22:16:47 -04:00
Flavio Ceolin
2f26ace116 include: i2c: Add U to unsigned constants
Add U to unsigned integer constants to avoid implict cast

MISRA-C rule 10.1

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2019-03-26 22:06:45 -04:00
Flavio Ceolin
5f5377f225 include: Add missing U for unsigned constants
MISRA-C rule 10.1

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2019-03-26 22:06:45 -04:00
Flavio Ceolin
c2b25151cb lib: printk: Make if/iterations evaluate boolean operands
MISRA-C rule 14.4

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2019-03-26 22:06:45 -04:00
Flavio Ceolin
2df02cc8db kernel: Make if/iteration evaluate boolean operands
Controlling expression of if and iteration statements must have a
boolean type.

MISRA-C rule 14.4

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2019-03-26 22:06:45 -04:00
Flavio Ceolin
3306a5862f arch: x86: Add missing U for unsigned constants
Add U for integer constants to avoid an implicit cast.

MISRA-C rule 10.1

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2019-03-26 22:06:45 -04:00
Flavio Ceolin
44fc55e209 lib: crc16_sw: Add missing U to unsigned constants
Add U to unsigned integer constants to avoid implicit cast.

MISRA-C rule 10.1

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2019-03-26 22:06:45 -04:00
Flavio Ceolin
000a256bb3 include: Make statements evaluate boolean expressions
MISRA-C requires that if/while statements have essentially a boolean
operand.

MISRA-C rule 14.4

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2019-03-26 22:06:45 -04:00
Flavio Ceolin
625ac2e79f spinlock: Change function signature to return bool
Functions z_spin_lock_valid and z_spin_unlock_valid are essentially
boolean functions, just change their signature to return a bool instead
of an integer.

MISRA-C rule 10.1

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2019-03-26 22:06:45 -04:00