Commit graph

41120 commits

Author SHA1 Message Date
Sebastian Bøe
72177da74b latency_measure: Fix bug where the wrong prj.conf file was used
Fix a bug in the latency_measure sample where, when the board was
specified through the environment, the wrong prj.conf file was
selected.

This change is not a pure refactoring, as it is believed that there
have been some copy-paste mistakes where prj_small_freq_divider.conf
and prj.conf have become out-of-sync over time. These assumed mistakes
are not carried over in the new organization.

Signed-off-by: Sebastian Bøe <sebastian.boe@nordicsemi.no>
2019-05-30 08:27:47 -04:00
Sebastian Bøe
6db7968c63 latency_measure: Remove commented-out code
Remove commented-out code in the latency_measure sample. Commented out
code should not be committed to version control.

Signed-off-by: Sebastian Bøe <sebastian.boe@nordicsemi.no>
2019-05-30 08:27:47 -04:00
Antony Pavlov
925183cbcc boards/arm/olimex_stm32_e407: enable USB
Tested with samples/subsys/usb/cdc_acm.

Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
2019-05-30 06:52:33 -05:00
Benjamin Valentin
6b46d38927 soc: sam0: add I2C to dts_fixup.h
tests/drivers/i2c/i2c_api wants to have CONFIG_I2C_0_NAME defined.
Add it to dts_fixup.h as was done for Watchdog and & timer.

Signed-off-by: Benjamin Valentin <benjamin.valentin@ml-pa.com>
2019-05-30 06:48:53 -05:00
Mark Wang
906f3789f2 dts: nxp: nxp_rt: add usbd1 for rt1050 and works as default usb.
add usbd1 and use it as the default usb device.

Signed-off-by: Mark Wang <yichang.wang@nxp.com>
2019-05-30 06:45:12 -05:00
Marek Pieta
c8be3e81d3 Bluetooth: host: Fix bt_keys_get_addr()
Change fixes issue causing multiple keys creation for given address
and identity.

Fixes: #16478

Signed-off-by: Marek Pieta <Marek.Pieta@nordicsemi.no>
2019-05-30 13:21:16 +02:00
Øyvind Rønningstad
f032729c91 arch: arm: core: tz: Linking of secure entry functions into NS firmware
Add Kconfig options:
 - ARM_FIRMWARE_USES_SECURE_ENTRY_FUNCS
 - ARM_ENTRY_VENEERS_LIB_NAME

Use these to link the veneers lib into the Non-Secure Firmware when
needed.

Also, make the path passed to the linker absolute to make it work with
makefiles.

Signed-off-by: Øyvind Rønningstad <oyvind.ronningstad@nordicsemi.no>
2019-05-30 13:18:04 +02:00
Øyvind Rønningstad
42f9e0c6db linker: Move sgstubs section to the very end and fix for nrf91
Add ifdefs to handle the nrf91 case. This change will dynamically
place and size the NSC region according to nrf91 HW limitations.

Add Cmake check of NSC offset if manually set.

Signed-off-by: Øyvind Rønningstad <oyvind.ronningstad@nordicsemi.no>
2019-05-30 13:18:04 +02:00
Øyvind Rønningstad
28bb9750a0 cmake: Allow import_kconfig() to return a list of the variables it sets
This allows the variables to easily be iterated over.

Signed-off-by: Øyvind Rønningstad <oyvind.ronningstad@nordicsemi.no>
2019-05-30 13:16:29 +02:00
Tomasz Bursztyka
e9a4ef2b0a net/udp: Always drop IPv6 UDP packet if checksum field is 0
Missing checksum is only valid in IPv4 and only on certain context.

Fixes #16483

Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
2019-05-30 13:02:25 +08:00
Tomasz Bursztyka
c3c6dfaaeb tests/net: Fix IPv6 and UDP test as UDP got stricter on checking header
Now length of the UDP header is checked, and obviously these test were
avoiding setting it properly.

Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
2019-05-30 13:01:30 +08:00
Tomasz Bursztyka
a5b90a4aad net/udp: Check UDP header's length attribute
Length should be at least of UDP header size but not bigger than actual
payload size.

Reported-by: Ruslan Mstoi <ruslan.mstoi@intel.com>

Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
2019-05-30 13:01:30 +08:00
Michael Scott
a46db55d0a net: lwm2m: fix log_strdup missing errors
Due to commit a211afb0 ("logging: Add option to detect missed
transient string duplication"), the logs for LwM2M subsystem
is now spamming missing log_strdup() calls.

Let's add log_strdup() where needed.

Signed-off-by: Michael Scott <mike@foundries.io>
2019-05-30 11:26:43 +08:00
Nicolas Pitre
4d4cd7e3c8 test/net: fix PTP clock test code
The various ptp_clock_driver_api methods receive a struct ptp_context
not a struct eth_context, and the later must be obtained from a
reference stored in the former. Failing to do so by directly
interpreting driver_data as a struct eth_context instance does end up
corrupting memory past the actual struct ptp_context storage. The test
may still pass as ptp_clock_get() reads from the same out-of-bounds
memory as the previous ptp_clock_set() and therefore the content
matches, and with luck the corrupted memory is not essential to the
completion of the test. But that wasn't my case which allowed me to
find this issue.

Fix this by properly obtaining a reference to the struct eth_context
instance via the actual struct ptp_context, and adding a test like
the one found in eth_tx() to make sure we got the right memory.

Signed-off-by: Nicolas Pitre <npitre@baylibre.com>
2019-05-30 10:53:24 +08:00
Sathish Kuttan
0a6cb2ee58 doc: intel_s1000: image download from Linux host
Documentation update to add instructions to download a
zephyr binary to the target from a Linux host

Signed-off-by: Sathish Kuttan <sathish.k.kuttan@intel.com>
2019-05-29 22:44:35 -04:00
Sathish Kuttan
8075de7b94 boards: intel_s1000_crb: Image download scripts
Python scripts to download a zephyr binary image (zephyr.bin) to
Intel S1000 from a linux host.
The linux host's SPI master and GPIOs shall be connected to the
corresponding SPI slave and I/Os respectively.

Signed-off-by: Sathish Kuttan <sathish.k.kuttan@intel.com>
2019-05-29 22:44:35 -04:00
Sathish Kuttan
d714f640c8 boards: intel_s1000_crb: Host interface config
A YAML file to specify configuration of interface I/Os
such as the SPI device, GPIOs, etc.
The image download script configures the host's SPI and GPIO
interfaces accordingly.

Signed-off-by: Sathish Kuttan <sathish.k.kuttan@intel.com>
2019-05-29 22:44:35 -04:00
Sören Tempel
52a4e4d840 drivers: serial: sifive: fix configuration of rxcnt/txcnt
The values were swapped meaning the configured value for rxcnt was used
for txcnt and vice versa.

Signed-off-by: Sören Tempel <soeren+git@soeren-tempel.net>
2019-05-29 17:22:58 -04:00
Anas Nashif
3085ce074d gitlint: match max title length restriction with checkpatch
Match the restriction on title length with checkpatch, since we document
that we follow the Linux style and checkpatch was there before gitlint.

Fixes #14652

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2019-05-29 14:43:16 -04:00
Pawel Dunaj
938a8e14bd include: sensor: Allow sensor private attr/chan/trig
Add some flexibility to the sensor API.

Signed-off-by: Pawel Dunaj <pawel.dunaj@nordicsemi.no>
2019-05-29 11:58:02 -05:00
Pawel Dunaj
9367161a09 include: sensor: Add position change channel
This would be used for motion sensors.

Signed-off-by: Pawel Dunaj <pawel.dunaj@nordicsemi.no>
2019-05-29 11:58:02 -05:00
Erwan Gouriou
eb97fea741 boards: nucleo_wb55rg: configure LPUART
Configure LPUART as btmon interface and
re-instantiate usart1 as console output (using ST-Link VCP)


Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2019-05-29 10:58:36 -04:00
Radoslaw Koppel
974231ee6e subsys/settings: Add const modifier to the value pointer
This commit adds const modifier for value pointer in
settings_save_one function.

Signed-off-by: Radoslaw Koppel <radoslaw.koppel@nordicsemi.no>
2019-05-29 10:11:12 -04:00
Luiz Augusto von Dentz
f8f6e7e117 Bluetooth: shell: Print L2CAP channel status
This uses the new status callback to print the channel status
whenever it changes.

Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
2019-05-29 16:31:03 +03:00
Luiz Augusto von Dentz
c904a45d8f Bluetooth: L2CAP: Add callback to notify status
This adds a new callback for L2CAP channels which notities whenever
status has changed so the channel user can can for example resume or
suspend sending depending on the status.

Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
2019-05-29 16:31:03 +03:00
Luiz Augusto von Dentz
270e8342f5 Bluetooth: L2CAP: Move Kconfig option to its own it own file
The Bluetooth menu has way too many option so this move the L2CAP
specific option to its own menu.

Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
2019-05-29 16:31:03 +03:00
Luiz Augusto von Dentz
74135b3392 Bluetooth: shell: Add sent callback to L2CAP ops
This prints to the output when a packet finishes transmitting:

uart:~$ l2cap send 2
Outgoing data channel 0x005166a0 transmitted
Outgoing data channel 0x005166a0 transmitted

Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
2019-05-29 16:31:03 +03:00
Luiz Augusto von Dentz
d8f20fe1e0 Bluetooth: L2CAP: Add sent callback
This adds a new callback to bt_l2cap_chan_ops which is called whenever a
SDU is completely sent.

Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
2019-05-29 16:31:03 +03:00
Luiz Augusto von Dentz
b65fe62719 Bluetooth: Add possibility to pass a user_data to conn_tx_cb_t
This allows setting a custom pointer to be passed back to the complete
callback at expense of increasing the buffers in 4 bytes.

Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
2019-05-29 16:31:03 +03:00
Luiz Augusto von Dentz
a3bea8872b Bluetooth: L2CAP: Move fixed channels to its own section in ROM
This changes the declaration of fixed channels to be statically defined
with use of BT_L2CAP_CHANNEL_DEFINE since fixed channels are never
unregistered.

Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
2019-05-29 16:31:03 +03:00
Krzysztof Chruscinski
93fb695244 tests: subsys: logging: Test for detection of missed log_strdup
Added test to validate algorithm for missed log_strdup() call.

Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
2019-05-29 13:52:31 +02:00
Krzysztof Chruscinski
a211afb041 logging: Add option to detect missed transient string duplication
Added CONFIG_LOG_DETECT_MISSED_STRDUP (by default on) which enables
scanning of log message strings in search for %s and reports if
string address is not from strdup buffer pool and outside read only
memory section which indicates that log_strdup() wrapping is missing

Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
2019-05-29 13:52:31 +02:00
Krzysztof Chruscinski
d6176f8697 samples: drivers: led_lp3943: Rename log module
main.c in the sample was registered to the logger as 'log'. Changed
to 'app'.

Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
2019-05-29 13:52:31 +02:00
Anas Nashif
3c2e43a19f cmake: build modules under /modules
As we start adding more modules, all of them end up in
${CMAKE_BINARY_DIR}/ and this is getting too busy. We have a module
directory created for each module and the interesting build data is
getting lost in the crowd.

Move all module into ${CMAKE_BINARY_DIR}/modules to and keep them under
one directory.

Future enhancement: maintain the same structure of the modules as
checked out by west.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2019-05-29 07:27:32 -04:00
Anas Nashif
658f6bc71f kconfig: enclose module Kconfigs into a menu
Solve the issue of having all module Kconfig land in the top level
Kconfig menu when viewed in menuconfig.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2019-05-29 07:27:32 -04:00
Paul Sokolovsky
4d8941a91d tests: net: getaddrinfo: Add cases for numeric IPv4 addr
And also for AI_NUMERICHOST flag.

Signed-off-by: Paul Sokolovsky <paul.sokolovsky@linaro.org>
2019-05-29 17:46:56 +08:00
Paul Sokolovsky
8b3db460aa net: getaddrinfo: Parse numeric IPv4 addresses
If a valid numeric IP address is provided as argument, it should
be resolved without contacting DNS server.

Also, implement handling of AI_NUMERICHOST.

Signed-off-by: Paul Sokolovsky <paul.sokolovsky@linaro.org>
2019-05-29 17:46:56 +08:00
Vinayak Kariappa Chettimada
8de64fcb81 Bluetooth: controller: split: Fix shell app regression
Fix shell app regression due to stale tmp role implementation
not fully being removed in commit 4c77bf6194 ("Bluetooth:
controller: Remove redundant tmp role implementation").

The regression caused ticker indexes outside of allocations to
be accessed causing application faults and memory corruptions.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2019-05-28 21:31:55 -04:00
Jan Van Winkel
afdbc20364 tests: Added native POSIX to flash based tests
Added native POSIX boards as target for flash related tests.

Signed-off-by: Jan Van Winkel <jan.van_winkel@dxplore.eu>
2019-05-28 21:14:19 -04:00
Jan Van Winkel
88964b99ec drivers: flash: Added native POSIX flash driver
Added native POSIX flash driver that writes flash content to a binary
file.

Signed-off-by: Jan Van Winkel <jan.van_winkel@dxplore.eu>
2019-05-28 21:14:19 -04:00
Jan Van Winkel
7a246c30bd dts: posix: Add DTS support for POSIX architecture
Added device tree support for POSIX architecture based boards.

Signed-off-by: Jan Van Winkel <jan.van_winkel@dxplore.eu>
2019-05-28 21:14:19 -04:00
Jun Li
951a82d029 board: nucleo_f429zi: add partitions to support mcuboot
Add partition table to support MCUBoot. A paragraph of
usage comments was also added in the board documentation.

Signed-off-by: Jun Li <jun.r.li@intel.com>
2019-05-28 21:13:30 -04:00
Daniel Egger
280daa3941 samples: net: lwm2m: use real temperature values instead of dummy
This changes the use of a static and fixed temperature value to using a
read_callback which will either return the previous dummy value or
gather real temperature data from a supported sensor (for now only
FXOS8700 which is available e.g. on a FRDM-K64F).

Signed-off-by: Daniel Egger <daniel@eggers-club.de>
2019-05-28 21:11:05 -04:00
Andrew Fernandes
6d8c63638f adc: explicitly cast (const void *) to (const adc_driver_api *)
Without this patch GCC 8.3 will error during a C++ build.

Signed-off-by: Andrew Fernandes <andrew@fernandes.org>
2019-05-28 19:25:44 +02:00
Henrik Brix Andersen
58decac9bf boards: twr_ke18f: list hwinfo as supported feature
List hwinfo as a supported feature on the NXP TWR-KE18F development
board.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2019-05-28 12:18:24 -05:00
Jacob Siverskog
dc4a3592e9 doc: Fix typos in flashmap.h
Fix a few typos in docstrings.

Signed-off-by: Jacob Siverskog <jacob@teenage.engineering>
2019-05-28 12:27:43 -04:00
Matthew Koch
2e2a2d2d55 boards: stm32f7: Remove DTCM from sram0
Adjust board memory sizes to exclude DTCM RAM.

Fixes: #15910

Signed-off-by: Matthew Koch <koch.matthew@gmail.com>
2019-05-28 11:02:29 -04:00
Matthew Koch
d94c0d39f5 dts: stm32f7: Remove DTCM from sram0
DTCM probably shouldn't be lumped with SRAM.

Fixes: #15909

Signed-off-by: Matthew Koch <koch.matthew@gmail.com>
2019-05-28 11:02:29 -04:00
Derek Hageman
a4f3e628e5 drivers: counter: Add SAM0 basic counter support
This adds support for the basic timer counter (TC) found on SAM0
series parts.  This driver only supports running the counter
in 32 bit wide mode.  Since this mode explicitly slaves the odd
counters to the even ones, only instances of the even ones are
defined.

Tested with tests/drivers/counter/counter_basic_api on SAMD21.

Signed-off-by: Derek Hageman <hageman@inthat.cloud>
2019-05-28 09:23:44 -04:00
Anas Nashif
7d279039e3 CODEOWNERS: remove ext/fs entry
This was moved to external modules.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2019-05-28 09:18:22 -04:00