Commit graph

740 commits

Author SHA1 Message Date
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
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
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
Ryan QIAN
55a63cadc1 ext: hal: nxp: mcux: add device files for RT1015
Add mcux 2.5.0 drivers and device header files for mimxrt1015. Update
several drivers that were already imported for other SoCs but also apply
to mimxrt1015.

Origins: NXP MCUxpresso SDK 2.5.0
URL: mcuxpresso.nxp.com
Maintained-by: External

Signed-off-by: Ryan QIAN <jianghao.qian@nxp.com>
2019-04-18 16:11:34 -05:00
Henrik Brix Andersen
8a4dbb5b03 drivers: i2c: rv32m1: add I2C driver for the RV32M1 RI5CY SoC
Add driver and device tree binding for the Low Power Inter-Integrated
Circuit (LPI2C) controllers found in the RV32M1 RI5CY SoC.

Signed-off-by: Henrik Brix Andersen <henrik@brixandersen.dk>
2019-04-18 16:04:23 -05:00
Andrzej Głąbek
c28fdc7a0f ext: hal: nordic: Update nrfx to version 1.7.1
Updates nrfx to the recently released version. See
https://github.com/NordicSemiconductor/nrfx/blob/v1.7.1/CHANGELOG.md
for a list of changes that this version introduces.

Origin: nrfx
License: BSD 3-Clause
URL: https://github.com/NordicSemiconductor/nrfx/tree/v1.7.1
commit: 9d68726e41c321f1772c187bd12d82f5b13104f1
Purpose: Provide peripheral drivers for Nordic SoCs
Maintained-by: External

Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
2019-04-18 12:41:23 +02:00
Kumar Gala
c38df1515c ext/hal: stm32l4xx: Fix warnings for extraneous parentheses
Building with clang reports the following warnings:

stm32l4xx_hal_tim.c: error: equality comparison with extraneous
parentheses [-Werror,-Wparentheses-equality]
  else if((htim->State == HAL_TIM_STATE_READY))
           ~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~

Removing the extra () fixes the warning

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2019-04-17 16:46:17 -05:00
Kumar Gala
0a482cd92a ext/hal: stm32l0xx: Fix warnings for extraneous parentheses
Building with clang reports the following warnings:

stm32l0xx_hal_tim.c: error: equality comparison with extraneous
parentheses [-Werror,-Wparentheses-equality]
  else if((htim->State == HAL_TIM_STATE_READY))
           ~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~

Removing the extra () fixes the warning

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2019-04-17 16:46:17 -05:00
Kumar Gala
073ece5080 ext/hal: stm32f7xx: Fix warnings for extraneous parentheses
Building with clang reports the following warnings:

stm32f7xx_hal_tim.c: error: equality comparison with extraneous
parentheses [-Werror,-Wparentheses-equality]
  else if((htim->State == HAL_TIM_STATE_READY))
           ~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~

Removing the extra () fixes the warning

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2019-04-17 16:46:17 -05:00
Kumar Gala
3ec47dcf1c ext/hal: stm32f4xx: Fix warnings for extraneous parentheses
Building with clang reports the following warnings:

stm32f4xx_hal_tim.c:3615:24: error: equality comparison with extraneous
parentheses [-Werror,-Wparentheses-equality]
  else if((htim->State == HAL_TIM_STATE_READY))
           ~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~

Removing the extra () fixes the warning

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2019-04-17 16:46:17 -05:00
Kumar Gala
0404cf90f0 ext/hal: stm32f3xx: Fix warnings for extraneous parentheses
Building with clang reports the following warnings:

stm32f3xx_hal_tim.c: error: equality comparison with extraneous
parentheses [-Werror,-Wparentheses-equality]
  else if((htim->State == HAL_TIM_STATE_READY))
           ~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~

Removing the extra () fixes the warning

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2019-04-17 16:46:17 -05:00
Kumar Gala
198387dcd9 ext/hal: stm32f2xx: Fix warnings for extraneous parentheses
Building with clang reports the following warnings:

stm32f2xx_hal_tim.c: error: equality comparison with extraneous
parentheses [-Werror,-Wparentheses-equality]
  else if((htim->State == HAL_TIM_STATE_READY))
           ~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~

Removing the extra () fixes the warning

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2019-04-17 16:46:17 -05:00
Kumar Gala
a51bfc8dc4 ext/hal: stm32f1xx: Fix warnings for extraneous parentheses
Building with clang reports the following warnings:

stm32f1xx_hal_tim.c: error: equality comparison with extraneous
parentheses [-Werror,-Wparentheses-equality]
  else if((htim->State == HAL_TIM_STATE_READY))
           ~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~

Removing the extra () fixes the warning

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2019-04-17 16:46:17 -05:00
Kumar Gala
ee69d0049b ext/hal: stm32f0xx: Fix warnings for extraneous parentheses
Building with clang reports the following warnings:

stm32f0xx_hal_tim.c: error: equality comparison with extraneous
parentheses [-Werror,-Wparentheses-equality]
  else if((htim->State == HAL_TIM_STATE_READY))
           ~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~

Removing the extra () fixes the warning

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2019-04-17 16:46:17 -05:00
Loic Poulain
14aa624c6b ext: mcux: csi: Fix wrong circular queue delta calculation
This error causes various instabilities during capture.

Signed-off-by: Loic Poulain <loic.poulain@linaro.org>
2019-04-17 10:23:56 -05:00
Patrik Flykt
97b3bd11a7 drivers: Rename reserved function names
Rename reserved function names in drivers/ subdirectory. Update
function macros concatenatenating function names with '##'. As
there is a conflict between the existing gpio_sch_manage_callback()
and _gpio_sch_manage_callback() names, leave the latter unmodified.

Signed-off-by: Patrik Flykt <patrik.flykt@intel.com>
2019-04-03 17:31:00 -04:00
Ulf Magnusson
d5b0bd14e3 scripts: Remove unused imports in all Python scripts
Discovered with pylint3.

Upstream open-amp PR: https://github.com/OpenAMP/open-amp/pull/168

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2019-03-28 11:06:20 -05:00
Ulf Magnusson
12ba9dfa52 scripts: Remove unused variables in all Python scripts
Discovered with pylint3.

Use the placeholder name '_' for unproblematic unused variables. It's
what I'm used to, and pylint knows not to flag it.

Python tip:

    for i in range(n):
        some_list.append(0)

can be replaced with

    some_list += n*[0]

Similarly, 3*'\t' gives '\t\t\t'.

(Relevant here because pylint flagged the loop index as unused.)

To do integer division in Python 3, use // instead of /.

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2019-03-28 11:06:20 -05:00
Ulf Magnusson
95650fdefa ext: open-amp: Fix broken typo'd sys.exit()
s/exist/exit/

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2019-03-28 11:05:38 -05: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
Loic Poulain
d9be3f21f4 ext: hal: nxp: mcux: csi: Fix double buffering capture
In case of double buffering (two capture buffers), the CSI is
frequently starved because of a lack of buffer in the active pool.

You can find below an example of double buffering scenario:

                FREE_BUF  ACTIVE_BUF
start:              0          2
frame0_complete:    0          1  (no buffer to load in active)
resubmit_frame0:    1          1
frame1_complete:    1          0  (CSI stopped, active buf = 0)
resubmit_frame1:    2          0
                    0    ->    2  (CSI restarted)

This patch solves this issue by loading buffer to active at submit
time.

                FREE_BUF  ACTIVE_BUF
start:              0          2
frame0_complete:    0          1
resubmit_frame0:    1          1
                    0    ->    2  (Direct load to active)
frame1_complete:    0          1
resubmit_frame1:    1          1
                    0    ->    2
...

Signed-off-by: Loic Poulain <loic.poulain@linaro.org>
2019-03-26 07:44:55 -05:00
Anas Nashif
cb8fb2d705 modules: remove tinycbor from ext/ and use west module feature
Use tinycbor from the tinycbor repo directly and drop the library from
ext/.

Add entry to west.yml and update SHA.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2019-03-25 22:41:01 -04:00
Vincent Wan
ec33d24017 ext: simplelink: add workarounds when using POSIX headers
Adding additional workarounds to cc_pal.h that are necessary due to the
fact that the POSIX subsys does not integrate well with other parts of
Zephyr, as per discussion in #13444. These workarounds are needed when
fcntl.h is included, to avoid symbols from being redefined in POSIX
headers. They disable some POSIX headers and define what is necessary
for the code to compile.

We should aim to remove these when the integration story has improved.

Signed-off-by: Vincent Wan <vincent.wan@linaro.org>
2019-03-20 11:36:18 -05:00
Ulf Magnusson
9bf05a56e0 mbedtls: kconfig: Remove redundant 'depends on MBEDTLS'
Appears within an 'if MBEDTLS'.

'if FOO' is just shorthand for adding 'depends on FOO' to each item
within the 'if'.

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2019-03-13 12:00:17 -05:00
Ulf Magnusson
53376394b7 kconfig: Remove blank lines at the beginning/end of files
Maybe this is some "just in case" thing that got copied around. There's
no need to have a blank line at the beginning or end of Kconfig files.

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2019-03-13 07:29:42 -05:00
Kumar Gala
72af04ba1a open-amp: Fix build issue with newlib
If we enable newlib we run into an issue with fcntl.h and the openamp
proxy support.  We don't utilize the proxy support so just disable it by
default.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2019-03-11 14:37:57 -05:00
Kumar Gala
11cedc6c49 ext: libmetal: Update libmetal to snapshot for bug fixes
Pull in libmetal SHA 59a10acbb0bb684c1a75488f11878cb984170c81 to get
some build fixes related to newlib.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2019-03-11 14:37:57 -05:00
Patrik Flykt
4344e27c26 all: Update reserved function names
Update reserved function names starting with one underscore, replacing
them as follows:
   '_k_' with 'z_'
   '_K_' with 'Z_'
   '_handler_' with 'z_handl_'
   '_Cstart' with 'z_cstart'
   '_Swap' with 'z_swap'

This renaming is done on both global and those static function names
in kernel/include and include/. Other static function names in kernel/
are renamed by removing the leading underscore. Other function names
not starting with any prefix listed above are renamed starting with
a 'z_' or 'Z_' prefix.

Function names starting with two or three leading underscores are not
automatcally renamed since these names will collide with the variants
with two or three leading underscores.

Various generator scripts have also been updated as well as perf,
linker and usb files. These are
   drivers/serial/uart_handlers.c
   include/linker/kobject-text.ld
   kernel/include/syscall_handler.h
   scripts/gen_kobject_list.py
   scripts/gen_syscall_header.py

Signed-off-by: Patrik Flykt <patrik.flykt@intel.com>
2019-03-11 13:48:42 -04:00
Maureen Helm
7967829a26 ext: mcux: Fix handling of rt1052 part numbers
We previously added a cmake hack to alias rt1052 A0 part numbers (A
suffix) to A1 part numbers (B suffix), but this hack did not work
correctly when a board uses A1 part numbers directly.

Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
2019-03-10 10:51:43 -05:00
Maureen Helm
5ebf6104a2 soc: nxp_kinetis: Add HAS_MCUX_FTFX to conditionalize mcux flash driver
Adds a new config HAS_MCUX_FTFX to conditionalize the mcux flash driver
on socs that support it. Selects HAS_MCUX_FTFX on all kinetis socs
except kw40z, because even though this soc has the relevant hardware,
its CMSIS header file is not compatible with the mcux flash driver in
ext/.

This change also prevents enabling the mcux flash driver on lpc and imx
rt boards.

Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
2019-03-06 21:19:25 -06:00
Andrzej Głąbek
ca11c0cec4 ext: nordic: Unify NRFX_RTC* options handling in nrfx_config*.h
This patch unifies the way NRFX_RTC* Kconfig options are handled in
nrfx_config*.h files for particular Nordic SoCs, so that these files
are easier in maintenance. For nRF52810 and nRF9160, this means adding
of support for these options, since it was missing.

Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
2019-03-06 11:37:51 -06:00
Andrzej Głąbek
b1701a2a47 ext: nordic: Unify NRFX_UART[E]* options handling in nrfx_config*.h
The NRFX_UARTE* Kconfig options were handled only in the nrfx_config
for nRF9160. This commit updates remaining nrfx_configs, so that these
options are handled uniformly for all Nordic SoCs.
The NRFX_UART option, although defined in ext/hal/nordic/Kconfig,
were not supported in any of nrfx_config files, effectively making
it impossible to use nrfx_uart.c driver. This commit corrects this.

Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
2019-03-06 11:37:51 -06:00
Andrzej Głąbek
311cb182a8 ext: nordic: Update nrfx_config_nrf52810.h entries
This is a follow up to commit f0cf126015a073a5417e6fcfd06b2d41f0f18d87.
Entries in nrfx_config_nrf52810.h are synchronized with the template
from nrfx v1.6.2. In particular, the entries for SPI0, TWI0, and UART0
peripherals are added, so that these peripherals can be actually used
by nrfx drivers in Zephyr.

Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
2019-03-06 11:37:51 -06:00
Andrzej Głąbek
cc185bc02b ext: nordic: Add missing NRFX_UARTE[2,3] Kconfig options
Definitions of these two options were missing, altought the symbols
that would be created for them were already referenced from
`ext/hal/nordic/nrfx_config_nrf9160.h`.

Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
2019-03-05 13:38:18 -05:00
Andrzej Głąbek
d2735edf65 ext: nordic: Add NRF_SPIS[0-3] definitions to nrfx_config_nrf9160.h
These entries should have been added in the initial version of
this file (in commit 99bab3f478)
but their absence was overlooked.

Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
2019-03-05 13:38:18 -05:00
Vincent Wan
341c2308d2 ext: simplelink: Remove build warnings
This commit removes build warnings in the SimpleLink SDK's driver.c file
by updating CMakeLists.txt

Signed-off-by: Vincent Wan <vincent.wan@linaro.org>
2019-03-05 11:37:10 -05:00
Vincent Wan
c051d97bc1 ext: simplelink: Run dos2unix on files imported from TI SimpleLink SDK
Getting rid of DOS line termination characters to be more
Linux-friendly.

Signed-off-by: Vincent Wan <vincent.wan@linaro.org>
2019-03-05 11:37:10 -05:00
Vincent Wan
067a5f76e0 ext: simplelink: Update the README
The README is updated for the new version of the TI SimpleLink SDK.

Signed-off-by: Vincent Wan <vincent.wan@linaro.org>
2019-03-05 11:37:10 -05:00
Vincent Wan
30c9c2954d ext: simplelink: Add a workaround for #13444 in cc_pal.h
We are undefining timeval to avoid a symbol redefinition build error.

Signed-off-by: Vincent Wan <vincent.wan@linaro.org>
2019-03-05 11:37:10 -05:00
Vincent Wan
5bce9cb1d4 ext: simplelink: Add posix api and pthread support to Kconfig
When using the wifi driver, we should automatically select
CONFIG_POSIX_API and CONFIG_PTHREAD_IPC. This is necessary given the
code in the new SimpleLink host driver from the SimpleLink SDK uses
pthread and sem.

Signed-off-by: Vincent Wan <vincent.wan@linaro.org>
2019-03-05 11:37:10 -05:00
Vincent Wan
28cfb09010 ext: simplelink: Use Zephyr posix headers in cc_pal.h
We should use the headers from Zephyr, not the ones provided by TI for
their posix implementations.

Signed-off-by: Vincent Wan <vincent.wan@linaro.org>
2019-03-05 11:37:10 -05:00
Vincent Wan
f6d8a15092 ext: simplelink: Update CMakeLists.txt to build new SDK
Updating it to build the correct list of files in the SDK.

Signed-off-by: Vincent Wan <vincent.wan@linaro.org>
2019-03-05 11:37:10 -05:00
Vincent Wan
e2f7d11ed0 ext: simplelink: Update user.h
We are using the external spawn option, hence must make a change
to point to our os_Spawn implementation.

We are also supplying errno values that are missing from Zephyr errno.h
and the external errno setter function, to allow the SimpleLink
driver.c to compile.

Signed-off-by: Vincent Wan <vincent.wan@linaro.org>
2019-03-05 11:37:10 -05:00
Vincent Wan
496c261e42 ext: simplelink: Add updated CC3220 board files
This commit adds updated board files to configure the peripheral
drivers on the CC3220.

Signed-off-by: Vincent Wan <vincent.wan@linaro.org>
2019-03-05 11:37:10 -05:00
Vincent Wan
8476c451c4 ext: simplelink: Import files from TI CC32XX SDK 2.40.01.01
Add/Update files taken from TI CC32XX SDK, including
    - peripheral drivers
    - driverlib (HAL)
    - WiFi host driver and porting layer interface headers

Origin: Texas Instruments cc32xx SimpleLink SDK
URL: http://www.ti.com/tool/download/simplelink-cc32xx-sdk
Purpose: Provide driver libraries and HAL for TI CC32XX SoC
Maintained-by: External

Fixes #11126

Signed-off-by: Vincent Wan <vincent.wan@linaro.org>
2019-03-05 11:37:10 -05:00
Pawel Dunaj
b5589cc6b6 drivers: spi: nRF SPI add control of MISO pin pull
Allow change of the MISO pin pull in SPI/SPIM.

Signed-off-by: Pawel Dunaj <pawel.dunaj@nordicsemi.no>
2019-03-05 16:09:25 +01:00
Andrew Boie
e686aefe09 mbedtls: provide user mode access
The mbedtls library has some globals which results in faults
when user mode tries to access them.

Instantiate a memory partition for mbedtls's globals.
The linker will place all globals found by building this
library into this partition.

Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2019-03-05 08:27:20 -05:00
Radoslaw Koppel
dbe775838a ext: encoding: tinycbor: Add missing files for pretty printing
This commits adds missing source files for tinycbor
library to allow pretty printing.

Signed-off-by: Radoslaw Koppel <radoslaw.koppel@nordicsemi.no>
2019-03-05 09:31:48 +01:00
Anas Nashif
3b745cc648 mbedtls: enable self-test in config-tls-generic.h
MBEDTLS_SELF_TEST is needed when setting CONFIG_MBEDTLS_TEST

Fixes #13919

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2019-03-04 17:32:08 -08:00