Commit graph

42565 commits

Author SHA1 Message Date
Brian Bradley 8ec1cbc95d boards: arm: stm32: Add WeAct Black Pill V2.0 definitions
Includes support for spi, usb, i2c, uart, pwm, adc, dfu,
and onboard led and switch.

Signed-off-by: Brian Bradley <brian.bradley.p@gmail.com>
2020-07-17 16:54:22 +02:00
Johann Fischer 8eb99bcbb5 usb: cdc_acm: re-trigger transfer for OUT endpoint on resume
Transfers are cancelled on suspend event, OUT transfers
needs to be re-trigger on resume.
Rework event handling to filter out spurious resume
events and re-trigger transfer if previous event was
a suspend event.

Signed-off-by: Johann Fischer <j.fischer@phytec.de>
2020-07-17 13:37:08 +02:00
Johann Fischer 5700a6227d usb: usb_transfer: log which endpoint transfer will be cancelled
Log which endpoint transfer will be cancelled.

Signed-off-by: Johann Fischer <j.fischer@phytec.de>
2020-07-17 13:37:08 +02:00
Peter Bigot 5f68b63896 dts: ti,bq274xx: remove default properties
The parameters for this fuel gauge depend on the hardware design and
the expected battery.  These should not be defaulted to a value that
may be inappropriate.  Require that they be explicitly provided.

Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
2020-07-17 13:35:52 +02:00
Ioannis Glaropoulos 0292df5489 doc: release: add note for SW_VECTOR_RELAY feature in Mainline Cortex-M
Add a note in 2.4 release notes regarding SW_VECTOR_RELAY
feature, now supported also in Mainline Cortex-M architecture.

Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
2020-07-17 13:22:17 +02:00
Rubin Gerritsen 742358c6a6 bluetooth: controller: Kconfig: debug pins depends on BT_LL_SPLIT
When BT_LL_SPLIT is not selected, it should not be visible.

Signed-off-by: Rubin Gerritsen <rubin.gerritsen@nordicsemi.no>
2020-07-17 12:57:49 +02:00
Rubin Gerritsen f9b19186f5 bluetooth: controller: Kconfig: Move LL version config to split ll
These configs are not generic.

Signed-off-by: Rubin Gerritsen <rubin.gerritsen@nordicsemi.no>
2020-07-17 12:57:49 +02:00
Rubin Gerritsen cd63479f2e bluetooth: controller: Kconfig: Move RX_PRIO configs to split ll
These configs are not generic

Signed-off-by: Rubin Gerritsen <rubin.gerritsen@nordicsemi.no>
2020-07-17 12:57:49 +02:00
Rubin Gerritsen 6c7ed9627e bluetooth: controller: Kconfig: Move LLL selection to split config
The dependency to LL_SPLIT is removed.

Signed-off-by: Rubin Gerritsen <rubin.gerritsen@nordicsemi.no>
2020-07-17 12:57:49 +02:00
Rubin Gerritsen 1ec8b0ff0a bluetooth: controller: Kconfig: Move split LL helper configs to file
These configs are not generic.

Signed-off-by: Rubin Gerritsen <rubin.gerritsen@nordicsemi.no>
2020-07-17 12:57:49 +02:00
Rubin Gerritsen eea9d258a3 bluetooth: controller: Kconfig: Split out split config to new file
By splitting it out to a separate file, it will become easier to
separate generic and non-generic controller features.
This commit only contains the simple extraction.

Signed-off-by: Rubin Gerritsen <rubin.gerritsen@nordicsemi.no>
2020-07-17 12:57:49 +02:00
Gerson Fernando Budke 0dbef20149 boards: shields: esp_8266: Add std headers overlay
The current shield version shows different configuration, including
disabling default ethernet and wifi interfaces.  To allow easy
connection from standard headers, this add two new shield designations.
The existing boards overlays and defconfig were updated.

The documentation was update to reflect changes. A new supported
variations section helps to understand what shield variation user need
select to build their own system.

This changes requires changes on esp32 offload tests to reflect new
esp_8266 shield designations. Sam4e_xpro was keeped as the only one
with dedicated overlay and both frdm_k64f and disco_l475_iot1 were
moved to use standard arduino r3 header using extra args.

Signed-off-by: Gerson Fernando Budke <nandojve@gmail.com>
2020-07-17 11:38:28 +02:00
Gerson Fernando Budke 9b4fceef74 CODEOWNERS: Add boards/shields/esp_8266 owner
The esp_8266 shield was added without owner on #24710. Add myself as
an owner of esp_8266 shield files.

Signed-off-by: Gerson Fernando Budke <nandojve@gmail.com>
2020-07-17 11:38:28 +02:00
Andrew Boie 13f2b7b848 tests: mslab_threadsafe: cleanup
Clean up the code some, and disable CONFIG_TIMESLICE_SIZE=1
until #13813 is resolved.

Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2020-07-17 11:38:18 +02:00
Andrew Boie 8ec248a0f9 tests: device: add device_mmio tests
Exercise the public macros as well as device_map().
This test has a whitelist for whatever reason; add
mps2_an385 so that the !DEVICE_MMIO_IS_IN_RAM stuff
is tested.

Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2020-07-17 11:38:18 +02:00
Andrew Boie e33fc71d71 doc: add device MMIO details
Add some overview documentation on how to use this header.

Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2020-07-17 11:38:18 +02:00
Andrew Boie aec607cc67 x86: remove memory mapping SOC code
This isn't needed any more, all of these directives were
for drivers which use device_map() now.

Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2020-07-17 11:38:18 +02:00
Andrew Boie d728bece0a drivers: ns16550: use DEVICE_MMIO where needed
This gets a little complicated as the driver could be
using PCI-E MMIO, MMIO specified by DTS, or I/O ports.
This driver doesn't use struct uart_device_config any
more.

Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2020-07-17 11:38:18 +02:00
Andrew Boie c802cc8920 x86: pcie: use device_map() for MMIO config access
Replaces custom runtime calls to map memory.

Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2020-07-17 11:38:18 +02:00
Andrew Boie 9f84637499 gpio_intel_apl: use DEVICE_MMIO
Good example of the NAMED variants of the MMIO macros, since
an existing inheritance mechanism already took the first-member
slot of the dev_data/config structs.

Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2020-07-17 11:38:18 +02:00
Andrew Boie 9e627ed6d2 drivers: i2c_dw: use device_mmio
Fairly straightforward example of how to deal with PCIe.
The code considers whether a particular instance is PCIe
or not on a per-instance basis, so DEVICE_MMIO_ROM is not
conditionally defined.

Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2020-07-17 11:38:18 +02:00
Andrew Boie 7f7d05c262 drivers: hpet: use device_mmio
Straightforward example on how to use the TOPLEVEL variants
of the DEVICE_MMIO macros.

Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2020-07-17 11:38:18 +02:00
Andrew Boie ee3c50ba6d x86: apic: use device MMIO APIs
A hack was required for the loapic code due to the address
range not being in DTS. A bug was filed.

Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2020-07-17 11:38:18 +02:00
Andrew Boie d15a531197 drivers: eth_e1000: use device MMIO
The ethernet driver no longer continues to try to initialize
itself if PCIe probing fails.

This device is always PCIe so we don't need to reserve ROM MMIO
storage.

Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2020-07-17 11:38:18 +02:00
Andrew Boie a810c7b5a0 x86: early_serial: use device_map()
This driver code uses PCIe and doesn't use Zephyr's
device model, so we can't use the nice DEVICE_MMIO macros.
Set stuff up manually instead using device_map().

Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2020-07-17 11:38:18 +02:00
Andrew Boie db0ca08fb7 kernel: add macros for device MMIO management
Three variants provided:

- Drivers with one MMIO region to manage
- Drivers with multiple MMIO regions to manage
- Drivers or driver-like code which doesn't use Zephyr's device
  model

Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2020-07-17 11:38:18 +02:00
Andrew Boie e7376057ca x86: add arch_mem_map()
This currently only supports identity paging; there's just
enough here for device_map() calls to work.

Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2020-07-17 11:38:18 +02:00
Andrew Boie 06cf6d27f7 kernel: add k_mem_map() and related defines
This will be the interface for mapping memory in the kernel's
part of the address space, which is guaranteed to be persistent
regardless of what thread is scheduled.

Further code for specifically managing virtual memory will end up in
kernel/mmu.c.

Further defintions for memory management in general will end up
in sys/mem_manage.h.

Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2020-07-17 11:38:18 +02:00
Andrew Boie 9ff148ac83 kernel: define arch_mem_map()
This is the low-level arch function to map a region into page
tables.

Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2020-07-17 11:38:18 +02:00
Andrew Boie 542dcae0c7 arch: add CONFIG_MMU
This config indicates that a memory management unit is present
and enabled, which will in turn allow arch APIs to allow
mapping memory to be used.

Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2020-07-17 11:38:18 +02:00
Andrew Boie ff294e02cd arch: add CONFIG_CPU_HAS_MMU
Indicate that the CPU has a memory management unit,
similar to CPU_HAS_MPU for MPUs.

Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2020-07-17 11:38:18 +02:00
Carles Cufi b62a3692d7 doc: contribution: Add link to the coding guidelines
Add a small section that describes the existance of the coding
guidelines page and links to it, in order to raise awareness of the
effort towards complying with those.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2020-07-17 11:09:45 +02:00
Carles Cufi c2df27fa0b doc: Link to guidelines from the contribution page
Link to the coding guidelines from the main contribution guidelines
page, so that users are aware of the guidelines.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2020-07-17 11:09:45 +02:00
Carles Cufi e924364035 doc: guidelines: Add additional guidelines
Aside from the MISRA-C derived Coding Guidelines, add a list for
additional ones that are not a subset of a standard.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2020-07-17 11:09:45 +02:00
Carles Cufi 611927c49b doc: guidelines: Cleanup formatting
Cleanup formatting and a couple of instances of missing "rules".

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2020-07-17 11:09:45 +02:00
Anas Nashif 0ff33d1ae7 doc: fix usage of :c:type
Fixing issues with recent versions of breathe 4.19.2:

 WARNING: Unparseable C cross-reference: 'struct device'
 Invalid C declaration: Expected identifier in nested name, got keyword:
 struct [error at 6]
   struct device
     ------^

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2020-07-16 15:44:50 -04:00
Anas Nashif 06052927be sanitycheck: capture fails correctly on qemu crashes
We still have cases where qemu crashes are not being correctly captured
in the on-screen summary, however they are captured in the final
generated report.

Fixes #26679

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2020-07-16 15:44:17 -04:00
Jordan Yates 07fd28397e storage: flash_map: Fix partition device retrieval
Change the default behaviour of the flash partition choice when no
matching compatible is found. The new default is the grandparent node
of the fixed-partition.

As the grandparent node is what the jedec_spi_nor and nordic_qspi_nor
compatibles were selecting, remove these as separate checks.

This allows the flash_map API to be used for implementations of the
flash API other than the 3 originally specified (soc_nv_flash,
jedec_spi_nor & nordic_qspi_nor).

Fixes #26397

Signed-off-by: Jordan Yates <jordan.yates@data61.csiro.au>
2020-07-16 11:51:46 -05:00
Vinayak Kariappa Chettimada 36707cdb58 tests: Bluetooth: bsim: Disable test with long AD data
Disable test with long AD data being set, as 251 byte
Advertising PDU is not yet supported.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2020-07-16 14:43:46 +02:00
Vinayak Kariappa Chettimada 8666236bc6 Bluetooth: controller: Fix overflow due to use uninitialised PDU
Fixed memory corruption when using uninitialised previous
PDU to populate current PDUs.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2020-07-16 14:43:46 +02:00
Ruth Fuchss 81a6107343 doc: add IDs to some sections
Add documentation IDs to some sections to be able
to directly link to them.

Signed-off-by: Ruth Fuchss <ruth.fuchss@nordicsemi.no>
2020-07-16 08:22:48 -04:00
Marcin Niestroj 967f485f38 drivers: wifi: simplelink: fix typo in logged option name
Fix typo in logged Kconfig option name that is missing in used
configuration. This one was mostly problematic for developers wanting to
find such option in source tree using grep - NET_SOCKET_OFFLOAD was not
found in Kconfig files.

Signed-off-by: Marcin Niestroj <m.niestroj@grinn-global.com>
2020-07-16 07:19:56 -05:00
Trond Einar Snekvik 6b5c2e02d3 Bluetooth: Mesh: Transport seg send timeout
Resolves a corner case where the segmented sending would be rescheduled
before the segments were done sending. This would happen if the
processing of each segment took longer than the retry delay. The
consequence of this was that some segments were resent multiple times at
the cost of other segments, occasionally causing a loss of transfers.

Rearranges, realigns and documents seg_tx structure bitfields in
transport.c. Removes bitwidth of counter fields, and collecting all flag
fields into one byte.

Signed-off-by: Trond Einar Snekvik <Trond.Einar.Snekvik@nordicsemi.no>
2020-07-16 13:10:42 +02:00
Daniel Leung ba5f627815 scripts: size_report: rework to use pyelftools...
...instead of GNU binutils to extract DWARF information.
This is now a bit more portable across OS and toolchain.
One bouns is that this nows with on qemu_x86_64.

A few differences are:
() z_mrsh_* which are aliases to handler_no_syscalls() are now
   dropped as they are mapped to the same address, so that they
   are not counted multiple times.
() Static functions and variables with same names should now be
   attributed to the correct source files instead of being
   accumulated into the same symbol of one file (e.g. multiple
   thread_entry() in kernel tests).
() The totals for ROM and RAM are calculated from the
   corresponding sections. Previous script includes the debug
   sections as total ROM size which is not entirely correct.

Fixes #22996

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2020-07-16 12:14:22 +02:00
Kumar Gala 64d1481b81 west.yml: Update to pull in TFM v1.1
Update to sync with TFM v1.1 release.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2020-07-16 12:14:10 +02:00
Wolfgang Puffitsch da5eff8087 Bluetooth: controller: Enforce support for Read RSSI command in Kconfig
Enforce support for Read RSSI command if BT_CONN and BT_HCI_RAW are
selected. According to the Bluetooth specification, support for the
Read RSSI command is mandatory if the Connection State is
supported. BT_HCI_RAW indicates that the controller is an
independently qualifiable module and not part of a combined
host/controller build. This change avoids a configuration that cannot
be possibly qualified.

Signed-off-by: Wolfgang Puffitsch <wopu@demant.com>
2020-07-16 12:13:37 +02:00
Marek Pieta a6e8cf4374 bluetooth: gatt: Fix storing subscriptions
Change fixes storing subscriptions in settings. CCC write can interrupt
the ccc_delayed_store. Without the change, new CCC was not stored in
non-volatile memory and the work that stored CCC was not resubmitted.
That resulted in lost subscription after reboot.

Fixes: #26862

Signed-off-by: Marek Pieta <Marek.Pieta@nordicsemi.no>
2020-07-16 12:13:22 +02:00
Vinayak Kariappa Chettimada 6ecd5e56ed Bluetooth: controller: Minor refactor of sync implementation
Minor refactoring of code in periodic advertising
implementation.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2020-07-16 12:12:41 +02:00
Vinayak Kariappa Chettimada be72282be5 Bluetooth: controller: Refactor sync enabled and started states
Refactor implementation to perform enable and started state
updates at consistent places in code.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2020-07-16 12:12:00 +02:00
Vinayak Kariappa Chettimada d3457d1f12 Bluetooth: controller: Refactor sync PDU variable names
Refactor and use variable name ter_pdu for periodic
advertising PDU pointers.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2020-07-16 12:11:19 +02:00