Commit graph

41120 commits

Author SHA1 Message Date
Tomasz Gorochowik
1afa9d0e5d libc: minimal: fix realloc function
Excerpt from the manual:

  If ptr is NULL, then the call is equivalent to malloc(size) [...]

Without this commit, such calls end with a BUS FAULT.

Signed-off-by: Tomasz Gorochowik <tgorochowik@antmicro.com>
2019-04-19 16:17:14 -04:00
Benjamin Valentin
4d9486fc22 soc: sam0: Enable generic peripheral selection
Make sure that when e.g. CONFIG_SERIAL is set, CONFIG_UART_SAM0 is
selected automatically when the sam0 SoC family is used.

Signed-off-by: Benjamin Valentin <benjamin.valentin@ml-pa.com>
2019-04-19 14:37:17 -05:00
Wayne Ren
b444de8887 arch: arc: optimize the push and pop of fast irq
use macro to replace pop/push instructions

Signed-off-by: Wayne Ren <wei.ren@synopsys.com>
2019-04-19 14:37:03 -05:00
Erwan Gouriou
378ef0bbdd boards: Add support for nulceo_wb55rg
Basic support for nucleo_wb55rg board.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2019-04-19 14:19:44 -05:00
Erwan Gouriou
1502349266 drivers/pinmux: stm32: Add pinmux definitions for stm32wb (LP)U(S)ART
Add definitions for LPUART1 and USART1.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2019-04-19 14:19:44 -05:00
Erwan Gouriou
1847426f32 dts/arm/st: Add serial nodes on stm32wb
Add USART1 and LPUART1 nodes on stm32wb series.
Only these 2 ones are available for now on this series.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2019-04-19 14:19:44 -05:00
Erwan Gouriou
eb51ea00b0 soc/arm/st_stm32: stm32wb: Add gpio support
Add GPIO support to stm32wb series.
Only ABCDE and H ports are available for now on this series.
Accordingly, update series dtsi file.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2019-04-19 14:19:44 -05:00
Erwan Gouriou
d655073458 drivers/interrupt_controller: stm32: Add support for stm32wb series
Update exti driver to support STM32WB series. IP is similar
to stm32l4.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2019-04-19 14:19:44 -05:00
Erwan Gouriou
b11289997f drivers/clock_control: Add support to stm32wb series
Add support to stm32wb series in stm32 clock_control driver.
Ip is similar to stm32l4 one but AHB bus presacler is renamed
to "CPU1" and CPU2 and AHB4 prescalers should be defined.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2019-04-19 14:19:44 -05:00
Erwan Gouriou
7117f1c4d4 dts/arm/st: Provide basis for stm32wb device tree
Base .dtsi files for stm32wb series and stm32wb55 SoC.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2019-04-19 14:19:44 -05:00
Erwan Gouriou
6347b87e8f soc/arm/st_stm32: Add support for stm32wb soc
Provide basic soc configuration for STM32WB SoCs support in Zephyr.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2019-04-19 14:19:44 -05:00
Erwan Gouriou
9098215348 ext/hal/st: Adapt stm32cube folder to stm32wb introduction
Following introduction of STM32Cube for STM32WB, update stm32cube
folder to enable build of STM32WB Cube package.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2019-04-19 14:19:44 -05:00
Erwan Gouriou
6fdd0c2cd9 hal: stm32wbxx: Add HAL for the STM32WB series
This adds the HAL code needed for the SoC for the stm32wb series.

Origin: ST Microelectronics
License: BSD-3-Clause
URL: http://www.st.com/en/embedded-software/stm32cubewb.html
Commit: 1.0.0
Purpose: HAL layer for stm32wb
Maintained-by: External

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2019-04-19 14:19:44 -05:00
Georgij Cernysiov
c41320eb82 doc: guides: debugging: probes: correct J-Link usage
Corrects information regarding J-Link usage with ST-Link.

Signed-off-by: Georgij Cernysiov <g.cernysiov@elco-automation.de>
2019-04-19 13:56:28 -05:00
Georgij Cernysiov
27b9c6a69f boards: arm: disco l475 iot: correct documentation
Discovery board B-L475E-IOT01A uses STM32L475VG µC, not
previously described STM32L475RG.

Signed-off-by: Georgij Cernysiov <g.cernysiov@elco-automation.de>
2019-04-19 13:56:28 -05:00
Georgij Cernysiov
125c0300aa boards: arm: st, stm32: add jlink runner args
Adds device and speed args for jlink runner,
and sets default runners to openocd.

Signed-off-by: Georgij Cernysiov <g.cernysiov@elco-automation.de>
2019-04-19 13:56:28 -05:00
Vincent Wan
751025957a samples: sockets: sntp_client: Add support for cc3220sf_launchxl
This commits adds a configuration file for cc3220sf_launchxl
suitable for the example.

Signed-off-by: Vincent Wan <vincent.wan@linaro.org>
2019-04-19 13:54:21 -05:00
Vincent Wan
be5bfb6169 samples: sockets: sntp_client: make IPv6 & NET_CONFIG_SETTINGS optional
In this commit, a config.h header file is added to support the case
when the NET_CONFIG_SETTINGS is not used. main.c is also modified to
enable platforms that do not support IPv6. These changes are necessary
in order to allow cc3220sf_launchxl support.

Signed-off-by: Vincent Wan <vincent.wan@linaro.org>
2019-04-19 13:54:21 -05:00
Anas Nashif
5c6efa011a flash_map: add shell interface
Add shell for flash_map currently supporting listing the configurated
flash_map for a device.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2019-04-19 13:41:02 -05:00
Anas Nashif
1e5d02fcd2 flash_map: add function to iterate over areas
A new foreach iterator to go over all flash areas in a flash map.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2019-04-19 13:41:02 -05:00
Anas Nashif
27c97911b7 flash_map: fix test names
API names have changed, but not the test name.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2019-04-19 13:41:02 -05:00
Marcin Szymczyk
ea7afdde8f usb: cdc_acm: SerialState notification full support
Added bBreak, bRingSignal, bFraming, bParity and bOverRun
handling in cdc_acm_line_ctrl_set.
Reference: Chapter 6.5.4 of Universal Serial Bus Communications Class
Subclass Specification for PSTN Devices rev 1.2

Signed-off-by: Marcin Szymczyk <Marcin.Szymczyk@nordicsemi.no>
2019-04-19 13:36:32 -05:00
Arnaud Pouliquen
3c82d233e3 ext: hal: fix naming in rcc ll
The CONFIG_ prefix is reserved in Zephyr, rename CONFIG_SHIFT and
associated constants by adding a RCC_ prefix

Signed-off-by: Arnaud Pouliquen <arnaud.pouliquen@st.com>
2019-04-19 12:05:27 -05:00
Arnaud Pouliquen
18dc73c1bf boards: arm: Add support for STM32MP157 Discovery board
Add configuration, pinmux, dts and documentation for the STM32MP157
Discovery board based on the STM32MP157 SoC.

Signed-off-by: Arnaud Pouliquen <arnaud.pouliquen@st.com>
2019-04-19 12:05:27 -05:00
Arnaud Pouliquen
776671c7eb drivers/interrupt_controller: stm32: add support of stm32mp1
Add support of the stm32mp1 gpio exti.

Signed-off-by: Arnaud Pouliquen <arnaud.pouliquen@st.com>
2019-04-19 12:05:27 -05:00
Arnaud Pouliquen
b237245694 dts: add declaration of stm32mp157
Add the declaration of the ST Microlectronics
stm32mp157 soc.

Signed-off-by: Arnaud Pouliquen <arnaud.pouliquen@st.com>
2019-04-19 12:05:27 -05:00
Arnaud Pouliquen
0429a3ade6 ext: hal: add stm32mp1 exti ll driver
The stm32mp1 exti ll driver is mandatory for compilation.
add it on top of stm32cubeMP1 version 1.0.0.

Signed-off-by: Arnaud Pouliquen <arnaud.pouliquen@st.com>
2019-04-19 12:05:27 -05:00
Arnaud Pouliquen
e529af1f20 ext: hal: Enable support for stm32mp1xx hal
Provide required changes to stm32cube HAL and LL for the
STM32MP1X series MCU.

Origin: ST Microelectronics
License: BSD-3-Clause
URL: https://github.com/STMicroelectronics/STM32CubeMP1
Commit: 1.1.0
Purpose: HAL layer for STM32MP1
Maintained-by: External

Signed-off-by: Arnaud Pouliquen <arnaud.pouliquen@st.com>
2019-04-19 12:05:27 -05:00
Arnaud Pouliquen
e0afd7e580 soc: stm32: add initial soc support for stm32mp1 family
Add the initial SoC support for the STM32MP1 family. The code was
tested on STM32MP157c, but should work on any STM32MP1XX currently
available.

Signed-off-by: Arnaud Pouliquen <arnaud.pouliquen@st.com>
2019-04-19 12:05:27 -05:00
Marc Herbert
498b49469a CMakeLists.txt: fix misleading logical_target_for_zephyr_elf comment
The comment for:

  set_target_properties(${logical_target_for_zephyr_elf} PROPERTIES
     OUTPUT_NAME ${KERNEL_NAME})

was completely off-topic and making something relatively simple
incredibly puzzling and time-consuming to understand.

Re-order the if(GKSF OR GKOF) clauses so the two initializations of
logical_target_for_zephyr_elf are close to each other and so the very
short clause is not buried at the bottom of the long one.

Other minor logical_target_for_zephyr_elf comment fixes.

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2019-04-19 09:26:23 -05:00
Anas Nashif
d6d7a80057 boards: v2m_musca_b1_nonsecure: disable sanitycheck [REVERT ME]
Disable sanitycheck on this board for now and while fix issues that were
not detected earlier.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2019-04-19 08:55:58 -05:00
Alexander Wachter
9e8ad2dfe7 CODEOWNERS: Add codeowner for ams iAQcore and ENS210
Add @alexanderwachter as codeowner for AMS iAQcore and ENS210

Signed-off-by: Alexander Wachter <alexander.wachter@student.tugraz.at>
2019-04-19 08:37:17 -05:00
Alexander Wachter
5e4e730d91 tests: drivers: build_all: Add AMS IAQcore and ENS210 to build all
This commit adds IAQcore and ENS210 from AMS to the build tests.

Signed-off-by: Alexander Wachter <alexander.wachter@student.tugraz.at>
2019-04-19 08:37:17 -05:00
Alexander Wachter
f0090825be samples: sensor: ens210: Implement sample for ens210
Sample code for AMS (Austria Micro Systems) ENS210 temperature and
relative humidity sensor.

Signed-off-by: Alexander Wachter <alexander.wachter@student.tugraz.at>
2019-04-19 08:37:17 -05:00
Alexander Wachter
f29ec12f21 drivers: sensor: ens210: Implement AMS ens210 Sensor
Implementation of AMS (Austria Micro Systems) ENS210 temperature and
relative humidity sensor.

Signed-off-by: Alexander Wachter <alexander.wachter@student.tugraz.at>
2019-04-19 08:37:17 -05:00
Alexander Wachter
f989f2d0f9 samples: sensor: ams_iAQcore: Implement sample for AMS iAQ-core
Sample code for AMS (Austria Micro Systems) Indoor Air Quality Sensor
reading VOC and equivalent CO2 values.

Signed-off-by: Alexander Wachter <alexander.wachter@student.tugraz.at>
2019-04-19 08:37:17 -05:00
Alexander Wachter
3c70a3832d drivers: sensor: ams_iAQcore: Implemented ASM Indoor Air Quality Sensor
Implementation of AMS (Austria Micro Systems) Indoor Air Quality Sensor

Signed-off-by: Alexander Wachter <alexander.wachter@student.tugraz.at>
2019-04-19 08:37:17 -05:00
Marti Bolivar
4f23741a93 doc: nrf52840_pca10059: re-work programming notes
Mark the three distinct choices for how to program the board as
separate options, and add some clarifications on each. For the MCUboot
route, use smp_svr instead of blinky, to give the user a hint about
how to keep their devices up to date from application land.

Signed-off-by: Marti Bolivar <marti.bolivar@nordicsemi.no>
2019-04-19 09:02:31 -04:00
Antony Pavlov
74be380fa4 doc: application: fix duplicated word
The word 'entries' was duplicated.

Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
2019-04-19 08:19:59 -04:00
Anas Nashif
6ad19d2436 boards: v2m_musca_b1_nonsecure: add flash to yaml
Specify flash size to help filtering with sanitycheck.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2019-04-19 07:32:28 -04:00
Emanuele Di Santo
0db7dda09d Bluetooth: hci: h4: use GPIO reset for nrf52840_pca10090 controllers
This patch adds support to the nRF9160 for using a dedicated
GPIO pin to reset controllers running on nrf52840_pca10090.

It resets the controller before opening the H4 device, and it
delays the controller from booting until all bytes traveling
to the host have been received and drained from the UART,
thus ensuring that communication can begin from a clean state.

Signed-off-by: Emanuele Di Santo <emdi@nordicsemi.no>
Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2019-04-19 12:21:21 +02:00
Carles Cufi
bca3deb1e7 drivers: Bluetooth: Generalize IC-specific setup hook
In order to generalize the currently specialized nRF51 IC setup hook,
make the following changes:

- Generalize the hook to bt_ic_setup()
- Use a weak NOP version by default
- Move the currently existing one to the board folder

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2019-04-19 12:21:21 +02:00
Emanuele Di Santo
43b00eff1f samples: bluetooth: hci_uart: update nrf52840_pca10090 config
Enable the GPIO reset pin feature of nrf52840_pca10090
on pin P1.02 and the wait NOP feature of the controller.
These are used to let nrf9160_pca10090 synchronize the
HCI communication with nrf52840_pca10090 controllers.

Signed-off-by: Emanuele Di Santo <emdi@nordicsemi.no>
2019-04-19 12:21:21 +02:00
Emanuele Di Santo
3dc71c8d34 boards: arm: nrf52840_pca10090: add a GPIO reset line
Let one of the MCU interface pins be configured to act
as a reset line. This mitigates the lack of a connection
between the nRF9160 and nRF52840 PINRESET.
Minor refactoring and updated comments.

Signed-off-by: Emanuele Di Santo <emdi@nordicsemi.no>
2019-04-19 12:21:21 +02:00
Emanuele Di Santo
0604e21de6 boards: arm: nrf52840_pca10090: update log settings
Add a board-specific log level setting and change log levels.

Signed-off-by: Emanuele Di Santo <emdi@nordicsemi.no>
2019-04-19 12:21:21 +02:00
Andrzej Puzdrowski
d422d56633 samples/drivers/soc_flash_nrf: enable nrf9160_pca10090 targets
The patch provides flash offsets appropriate for running
this sample on nrf9160_pac10090 targets.
As that sample is small one, it is done with assumption that image_1
flash partition is empty.

Signed-off-by: Andrzej Puzdrowski <andrzej.puzdrowski@nordicsemi.no>
2019-04-19 11:50:46 +02:00
Andrzej Puzdrowski
2d24ce8565 tests/drivers/soc_flash_nrf: fix lack of disabled protection
Write protection was not disabled prior erase call.
It used to work before only because nrf driver had not check
the protection before erase execution. This behavior was changed in
order to align to zephyr - which implied requirement for this test fix.

Signed-off-by: Andrzej Puzdrowski <andrzej.puzdrowski@nordicsemi.no>
2019-04-19 11:50:46 +02:00
Andrzej Puzdrowski
279115e35e drives/flash: provide boundaries info for nRF9160
nRF9160 can't provide FICR data while operation in non-secure
domain.

This patch start using flash layout properties provides by
nrfx API for get flash properties, which resolves problem
described above.

Signed-off-by: Andrzej Puzdrowski <andrzej.puzdrowski@nordicsemi.no>
2019-04-19 11:50:46 +02:00
Andrzej Puzdrowski
560b458a21 drives/flash: use nrfx for nrf
Introduce nrfx_nvmc driver into nordic flash driver implementation.
Thanks to that nrf9160 SoC becomes supported by the driver.

nrfx helps dealing with differences with interface to the NVMC
in secure and non-secure execution modes.

This patch adds NRFX_NVMC Kconfig entry for enabling nrfx_nvmc and
select it along with nordic flash driver.

Disabled UICR operation on nRF9160 for non-secure build
as UICR is not available in this mode.

Signed-off-by: Andrzej Puzdrowski <andrzej.puzdrowski@nordicsemi.no>
2019-04-19 11:50:46 +02:00
Benjamin Valentin
c43067047c drivers: hwinfo: add driver support for Atmel SAM0 device ID
Add driver support for Atmel SAM0 device ID, which is 16-bytes long.
The device ID can simply be read from memory at a known location, but
the location is only described in the data sheet, not in ASF.

For SAMD2x it's 0x0080A00C, 0x0080A040, 0x0080A044 & 0x0080A048.
For SAMD5x it's 0x008061FC, 0x00806010, 0x00806014 & 0x00806018.

This adds a new property to the device tree to define the device ID
registers for this SoC family.

Signed-off-by: Benjamin Valentin <benjamin.valentin@ml-pa.com>
2019-04-18 17:54:30 -04:00