Commit graph

46390 commits

Author SHA1 Message Date
Robert Lubos
4331c05f17 net: lwm2m: Allow to acknowledge request early from the callback
LwM2M engine by default sends piggybacked responses for requests after
all callbacks are executed. This approach however isn't good enough if
the application callback executes some lenghty operations (for instance
during FW update). Delaying the ACK may result in unnecessary
retransmissions.

This commits adds an API function which allows to send an early empty
ACK from the application callback. This prevents further retransmissions
from the server side. After all callbacks are executed, the LwM2M engine
will send the response as a separate CON message.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2020-12-03 13:53:33 -05:00
Wu Han
df8f6c282b tests: kernel: gen_isr_table: Exclude stm32f103_mini board
This test is not suitable for stm32f103

Signed-off-by: Wu Han <wuhanstudio@qq.com>
2020-12-03 10:54:38 -06:00
Wu Han
c8a0c370ab tests: driver: adc: Add support for stm32f103_mini board
STM32F103RC should be included in ADC test.

Signed-off-by: Wu Han <wuhanstudio@qq.com>
2020-12-03 10:54:38 -06:00
Wu Han
f28bbe96f2 boards: arm: Add stm32f103_mini board
STM32F103RCT6 mini system board with many variations.

Signed-off-by: Wu Han <wuhanstudio@qq.com>
2020-12-03 10:54:38 -06:00
Wu Han
8e417769ae dts: arm: st: f1: Add STM32f103xC
stm32f103xc has different memory and flash size.

Signed-off-by: Wu Han <wuhanstudio@qq.com>
2020-12-03 10:54:38 -06:00
Gerson Fernando Budke
a49ef04d0c doc: guides: flash_debug: host-tools: Add SAM-BA docs
Add SAM-BA bootloader documentation at Zephyr host-tools in
flash_debug guides.

Signed-off-by: Gerson Fernando Budke <nandojve@gmail.com>
2020-12-03 10:50:23 -06:00
Gerson Fernando Budke
43a0dbe260 doc: guides: debugging: Move to flash_debug dir
The debugging section was generalized for flash and debugging tools.
The links were refactored accordly and all references were updated.
To be consistent, the directory doc/guides/debbugging was renamed to
doc/guides/flash_debug.

Signed-off-by: Gerson Fernando Budke <nandojve@gmail.com>
2020-12-03 10:50:23 -06:00
Gerson Fernando Budke
80d7253a47 scripts: runners: bossac: Fix offset parameter
The current bossac runner have multiple entries for flash offset
parameter.  Remove offset parameter from command line and rework
all infraestructure to get offset from device tree.  Add proper
verification routines to validate configurations on board and
device tree entries to fix SDK compatibility checks.

Fixes #29312.

Signed-off-by: Gerson Fernando Budke <nandojve@gmail.com>
2020-12-03 10:50:23 -06:00
Gerson Fernando Budke
94171c0ba2 scripts: runners: bossac: Extract make_bossac_cmd
Move bossac command construction outside do_run method to keep
clean code.

Signed-off-by: Gerson Fernando Budke <nandojve@gmail.com>
2020-12-03 10:50:23 -06:00
Gerson Fernando Budke
ffed132e82 scripts: runners: bossac: Change speed by protocol
Add is_extended_samba_protocol method to verify if board is using SAM-BA
extended protocol (Arduino/Adafruit UF2).  It allows enforce serial line
speed to 1200 baud automatically.  This avoid add entries on board.cmake
file.

Signed-off-by: Gerson Fernando Budke <nandojve@gmail.com>
2020-12-03 10:50:23 -06:00
Gerson Fernando Budke
876d8632a2 scripts: runners: bossac: Extract set_serial_config
Move serial settings outside do_run method to keep clean code.

Signed-off-by: Gerson Fernando Budke <nandojve@gmail.com>
2020-12-03 10:50:23 -06:00
Erwan Gouriou
36a330a470 boards: nucleo_h7: Remove --use-elf runner instruction
I don't have much explanation for this change except that
I can't program soc on these boards with this option being set.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2020-12-03 11:33:20 -05:00
Erwan Gouriou
348996fbe4 boards: nucleo_h743zi: Fix openocd configuration
Similar to what was done for other h7 based boards,
use 'connect_assert_srst' and fix init routine.

Fixes #29732

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2020-12-03 11:33:20 -05:00
Erwan Gouriou
72b5bebaca boards: stm32h747i_disco: Assign usart8 to m4 target
Resource sharing between m7 and m4 core was a bit abusive
as the whole SERIAL ports where disabled on m4 core.
Since it is possible to use a finer grain resource sharing and
having no serial node configured could lead to compilation issue
in some samples assign usart8 to m4 target.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2020-12-03 11:33:20 -05:00
Erwan Gouriou
c34d776f15 boards: stm32h747i_disco: Minor doc fix.
Minor doc addition within _m7 target dts file.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2020-12-03 11:33:20 -05:00
Erwan Gouriou
cece97b96c boards: Fix openocd debug config on stm32h7 based boards
On these 3 stm32h7 based boards, 'connect_assert_srst' should
be used in order to be able to program after board unplug/plug.

Problem is that 'connect_assert_srst' prevents gdb-attach procedure
to complete which now requires 'reset halt' to be performed before
hand.
Fix this by forcing 'reset halt' by introducing a new init routine.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2020-12-03 11:33:20 -05:00
Erwan Gouriou
2c46d70ac1 boards: nucleo_h723zg: Use openocd as default flash interface
Since this board is fully supported on openocd,
let's use openocd to comply with other boards and
remove the dependency on stm32cubeprogrammer.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2020-12-03 11:33:20 -05:00
Petri Oksanen
349c50a682 soc: arm: add support for stm32h753xx
STM32H753xx is similar to STM32H743xx except that it has crypto/hash
hardware acceleration and the memory configuration is always 2Mbytes
flash and 1Mbyte RAM.

Signed-off-by: Petri Oksanen <petri@iote.ai>
2020-12-03 16:53:58 +02:00
Ioannis Glaropoulos
41fa181388 doc: add release note comment for TF-M update.
Add a note in the 2.5.0 release notes about the TF-M
module update to v1.2.0.

Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
2020-12-03 08:52:38 -06:00
Ioannis Glaropoulos
30eb536b3f trusted-firmware-m: update manifest to get v1.2.0 release
Update manifest for tf-m module to upgrade
trusted-firmware-m to v1.2.0 release from upstream.

Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
2020-12-03 08:52:38 -06:00
Tomasz Bursztyka
a035c2199e drivers/pcie: Fix constant qualifier for endpoint driver
Found it via running coccinelle script in:
e18fcbba5a

Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
2020-12-03 09:42:26 -05:00
Tomasz Bursztyka
8d694d11b6 drivers/sensor: Fix device attribute names for lis2mdl and fxos8700
Found it via running coccinelle script found in:
af6140cc0d
and 98d9b01322

Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
2020-12-03 09:42:26 -05:00
Tomasz Bursztyka
e2847552fc drivers/sensor: Fix constant qualifier for lis2mdl PM function
Found it via running coccinelle script in:
e18fcbba5a

Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
2020-12-03 09:42:26 -05:00
Torsten Rasmussen
e37d9e6ac9 cmake: using zephyr_get_compile_options_for_lang_as_string()
With the distinction between zephyr_get_compile_options_for_lang() and
zephyr_get_compile_options_for_lang_as_string() regarding list handling
and thus quoting, then zephyr_get_compile_options_for_lang_as_string()
is now used for CMake source file properties for compilation of
kobject_hash.c source file.

Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
2020-12-03 09:23:07 -05:00
Torsten Rasmussen
94288bdcc5 cmake: zephyr_get_<flags>_for_lang_as_string() uses space as delimiter
The use of zephyr_get_<flags>_for_lang_as_string will now use space as
delimiter, this will allow for existing used of the
zephyr_get_<flags>_for_lang_as_string() to return a string with spaces
instead of semicolons as a quoted list.

Note, in most situations it is prefered to have a proper CMake list
returned, in which case zephyr_get_<flags>_for_lang() is probably the
correct function to use.

Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
2020-12-03 09:23:07 -05:00
Torsten Rasmussen
8275d39d4d cmake: adding $<SEMICOLON> instead of space on zephyr_get_compile_<type>
The current zephyr_get_compile_<type> flags returns compile / include
flags based on generator expressions.

But they also included a space.

This have the unintended side-effect that when the properties are
fetched into another variable and later appended to lists in order to
finally be used in a CMake target function / custom command, then CMake
in some cases will quote the string, creating a quoted argument like:
"arg0 arg1 arg2: instead of individual arguments like: "arg0" "arg1"
"arg2".

By using $<SEMICOLON>, then arguments are seperated correctly.

Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
2020-12-03 09:23:07 -05:00
Krzysztof Chruscinski
0e9c98c4f5 tests: drivers: timer: Add test for nrf_rtc_timer
Added test suite for nrf_rtc_timer API.

Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
2020-12-03 14:05:30 +01:00
Krzysztof Chruscinski
79e63b4216 drivers: timer: nrf: Extended driver with vendor specific API
Extended nrf_rtc_timer driver to expose API for using RTC for
other purposes. System timer is using one compare channels,
other channels may be used through this API.

Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
2020-12-03 14:05:30 +01:00
Jakub Rzeszutko
bfb9ba022a tests: move shell tests to subsys
Move shell tests to tests/subsys directory where it belongs.

Signed-off-by: Jakub Rzeszutko <jakub.rzeszutko@nordicsemi.no>
2020-12-03 08:04:50 -05:00
Kumar Gala
cf81774069 tests: subsys: power_mgmt: Limit to 1 CPU configurations
This test fails on x86_64 qemu due to SMP.  As Power Mgmt isn't really
supported on SMP currently limit this test to 1 CPU.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2020-12-03 08:04:29 -05:00
Piotr Pryga
98b11ee95c Bluetooth: host: Fix data type of advertising set handle
Change type of advertising set handle to 8 bit to comply with
Bluetooth Core spec. type.
Fixes wrong usage of adv. set handle variable in function
bt_le_per_adv_set_param.

Signed-off-by: Piotr Pryga <piotr.pryga@nordicsemi.no>
2020-12-03 14:53:37 +02:00
Joakim Andersson
180099f9ff Bluetooth: host: Remove irq_lock around connection lookup
Remove irq_lock around connection lookup, this is no longer needed
now that the lookup functions always have a valid reference.

Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
2020-12-03 13:52:02 +01:00
Joakim Andersson
4350021f09 Bluetooth: host: Make connection lookup functions thread-safe
Make the connection lookup functions thread-safe by re-using the
bt_conn_ref returning NULL mechanism and keeping a valid reference.

Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
2020-12-03 13:52:02 +01:00
Joakim Andersson
fae964c008 Bluetooth: host: Make bt_conn_ref return NULL if the ref count is zero
Make bt_conn_ref return NULL if the reference count has reached zero.
This makes it possible to re-use bt_conn_ref internally to re-use the
reference count mechanism to check if the reference is in use.

Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
2020-12-03 13:52:02 +01:00
Jun Huang
76789883e2 Bluetooth: tester: Fix an error response in tester
In the function conn_param_update, it should send the opcode
GAP_CONN_PARAM_UPDATE, instead, it send GAP_PASSKEY_ENTRY.

Signed-off-by: Jun Huang <huangjun6@xiaomi.com>
2020-12-03 12:16:04 +02:00
Christian Taedcke
1897dcf86e dts: arm: nxp: nxp_lpc55s6x: Fix a few reg sizes
These were found while reviewing the device tree and register addresses.
They are now the same as for the LPC55S28.

Signed-off-by: Christian Taedcke <christian.taedcke@lemonbeat.com>
2020-12-03 03:58:58 -06:00
Christian Taedcke
67f4d9ff9a dts: arm: nxp: nxp_lpc55s6x: Remove wrong comment
sram4 is not connected to USB. The following sram area that is not part
of the device tree is. So the comment is removed with this commit.

Signed-off-by: Christian Taedcke <christian.taedcke@lemonbeat.com>
2020-12-03 03:58:58 -06:00
Christian Taedcke
ec6e09a6e0 boards: lpcxpresso55s69 fix some arduino an mikrobus pins
Some pins on the arduino header and on the mikrobus header were wrong.
These are now corrected. They are the same on the lpcxpresso55s28
board.

Signed-off-by: Christian Taedcke <christian.taedcke@lemonbeat.com>
2020-12-03 03:58:58 -06:00
Henrik Brix Andersen
9121b24269 samples: drivers: flash_shell: do not enable CONFIG_SERIAL
Do not enable CONFIG_SERIAL explicitly in the flash_shell sample. Leave
it up to the board definition to enable a suitable shell backend if
CONFIG_SHELL is enabled.

Signed-off-by: Henrik Brix Andersen <henrik@brixandersen.dk>
2020-12-02 23:20:32 -05:00
Henrik Brix Andersen
db25454e0e samples: flash_shell: skip boards without zephyr,flash-controller
Adjust the sanitycheck filter of the flash shell sample to also depend
on the board having a chosen zephyr,flash-controller devicetree node (as
this is what is referenced in flash_shell.c).

Signed-off-by: Henrik Brix Andersen <henrik@brixandersen.dk>
2020-12-02 23:20:32 -05:00
Henrik Brix Andersen
c08d1e05fb sanitycheck: Add dt_chosen_enabled devicetree filter function
Add a dt_chosen_enabled(chosen) filter function to sanitycheck. The
function returns true if the devicetree /chosen node contains 'chosen'
and the referenced node is enabled.

Signed-off-by: Henrik Brix Andersen <henrik@brixandersen.dk>
2020-12-02 23:20:32 -05:00
Henrik Brix Andersen
e78421515c dts: arm: nxp: kw40z: remove zephyr,flash-controller chosen node
Remove the zephyr,flash-controller chosen node from the NXP KW40Z SoC
series devicetree. The MCUX SDK version for this SoC is too old to work
with the Zephyr MCUX flash driver shim.

Signed-off-by: Henrik Brix Andersen <henrik@brixandersen.dk>
2020-12-02 23:20:32 -05:00
Erwan Gouriou
83ea7180cf samples/shields: x_nucleo_iks01a3: Add config for stm32mp157c_dk2
Shield x_nucleo_iks01a3 could be used with board stm32mp157c_dk2,
but it requires not using the irq-gpio pin.
Provide a specific configuration for this board that does not make
use of this pin, sot set all sensors' triggers mode to NONE.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2020-12-02 13:17:30 -06:00
Erwan Gouriou
c7f26e99f1 samples/shields: x_nucleo_iks01a3/02a1: Default use of prj.conf
By default, prj.conf is the CONF_FILE file use by any application.
Use the file when it is not the case and remove the line that sets
it in CMakeLists.txt as this is not required.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2020-12-02 13:17:30 -06:00
Erwan Gouriou
e452867e2f boards/shields: x_nucleo_iks01a3: No irq-gpio on stm32mp157c_dk2
On stm32mp157c_dk2, the pin mapped on arduino connector pin A3
could not be used as GPIO.
As a consequence, pin "irq-gpio" from x_nucleo_iks01a3 shield
should not be used.

Use board overlay to remove it from shield definition.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2020-12-02 13:17:30 -06:00
Eugeniy Paltsev
9858893ea8 ARC: runner: mdb: tweak searching for cld process pid
mdb binary starts several subproceses and one of them is cld process.
In runners/mdb.py we record process id of cld on each mdb launch
to terminate simulator correctly later. However we can finish test
and terminate mdb before the cld process was found (so cld won't
be terminated correctly by sanitycheck infrastructure). It may happen
if we launch mdb on fast host machine.

That leads to several issues. First of all we get ugly error in
sanitycheck output:
------------------------>8--------------------------------
FileNotFoundError: [Errno 2] No such file or directory: '/xxxx/mdb.pid'
------------------------>8--------------------------------

Secondly (and it's more important) we terminate simulator incorrectly.
We terminate mdb leaving cld process alive, running and consuming one
cpu core permanently (until we kill it manually)

So, let's increase granularity of lookups and don't wait extra 0.5
seconds before the first lookup.

Signed-off-by: Eugeniy Paltsev <Eugeniy.Paltsev@synopsys.com>
2020-12-02 14:08:26 -05:00
Gerson Fernando Budke
cfba66aa78 boards: arm: sam4l_ek: Enable gpio tests
Enable GPIO tests and update hardware table documentation.

Signed-off-by: Gerson Fernando Budke <nandojve@gmail.com>
2020-12-02 11:48:43 -06:00
Gerson Fernando Budke
752f00c959 drivers: gpio: sam: Add sam4l SoC support
Add initial version of SAM4L GPIO driver.

Signed-off-by: Gerson Fernando Budke <nandojve@gmail.com>
2020-12-02 11:48:43 -06:00
Gerson Fernando Budke
6e38c678af dts: gpio: Add atmel sam4l GPIO bindings
Add required bindings to enable SAM4L GPIO driver.

Signed-off-by: Gerson Fernando Budke <nandojve@gmail.com>
2020-12-02 11:48:43 -06:00
Andrzej Głąbek
7ee994af0f bluetooth: controller: nrf: Provide info about used DPPI resources
Use common definitions of HAL_USED_PPI_CHANNELS and HAL_USED_PPI_GROUPS
macros that will provide (through z_bt_ctlr_used_nrf_ppi_* variables)
information about either PPI or DPPI (depending on the SoC) resources
used by the Bluetooth controller.
Update also the hal_nordic module revision, to make the related nrfx
allocator aware of those reserved DPPI resources.

Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
2020-12-02 16:44:40 +01:00