Commit graph

42567 commits

Author SHA1 Message Date
252cd3556a runners: bossac: handle --help on the current git version of BOSSA
BOSSA 1.9.1 and before an errror on `--help`, but the current git
version returns 0.  Handle both cases.

Signed-off-by: Michael Hope <mlhx@google.com>
2020-07-26 09:43:31 +02:00
076054c6bd runners: bossac: calculate the offset instead of absolute address
BOSSA takes the offset within flash memory, not the absolute address.
This doesn't matter on most boards as the flash starts at zero but
does matter on the Due as the flash starts at +512 KiB.

Signed-off-by: Michael Hope <mlhx@google.com>
2020-07-26 09:43:31 +02:00
Maureen Helm
52f993de11 doc: contribute: Require OSI-approved licenses
Updates the contribution guidelines to document the current board policy
of rejecting non-OSI-approved licenses.

Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
2020-07-25 21:26:55 -04:00
Daniel Leung
3c2d0f37a3 logging: avoid identifier collisions
MISRA-C Rule 5.3 states that identifiers in inner scope should
not hide identifiers in outer scope.

The log output instances all named "log_output" in backends
collide with the "log_output" parameter of various functions.
This renames the variables in the backends to make them
more descriptive. Same goes for the buffers for some of
these instances as they are all named "buf", and "hostname"
being used in the network backend,  so they are renamed.

There are a few places where variables are overriden within
an inner scope (e.g. inside loop and if block) so they are
also renamed.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2020-07-25 21:26:15 -04:00
Daniel Leung
d3d2730166 tracing: uart: rename global variable named dev
MISRA-C Rule 5.3 states that identifiers in inner scope should
not hide identifiers in outer scope.

There is a global variable named "dev" to store which UART
device is being used the tracing backend. This name collides
with the parameter of same name in the ISR function. So rename
the global variable.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2020-07-25 21:26:15 -04:00
Daniel Leung
ac53880cef kernel: smp: avoid identifier collisions
MISRA-C Rule 5.3 states that identifiers in inner scope should
not hide identifiers in outer scope.

In the function smp_init_top(), the variable "start_flags"
collide with global variable of the same name. So rename the one
inside the function.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2020-07-25 21:26:15 -04:00
Daniel Leung
4fc1444823 lib: os/heap: timeout: avoid identifier collisions
MISRA-C Rule 5.3 states that identifiers in inner scope should
not hide identifiers in outer scope.

In the function sys_heap_alloc(), the variable "chunksz"
collide with function named chunksz(). So rename those variable.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2020-07-25 21:26:15 -04:00
Daniel Leung
b907cf7694 kernel: timeout: avoid identifier collisions
MISRA-C Rule 5.3 states that identifiers in inner scope should
not hide identifiers in outer scope.

In the function z_set_timeout_expiry(), the parameter "idle"
and an inner variable "next" collide with function named idle()
and next(). So rename those variables.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2020-07-25 21:26:15 -04:00
Daniel Leung
2acafafae1 kernel: pipes: rename inner spinlock keys
MISRA-C Rule 5.3 states that identifiers in inner scope should
not hide identifiers in outer scope. There are a few spinlock
keys simply named "key". So rename those in inner scope to avoid
shadowing the outer ones.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2020-07-25 21:26:15 -04:00
Lauren Murphy
f014ba1ff1 doc: coding guidelines: fix links for other rules examples
This PR fixes the links to the example files in the Gitlab repository.
Fixes Dir 4.8 and Rule 2.1, 5.1, 5.8, 5.9, 8.5, 8.6, 13.1, and 13.5.

Signed-off-by: Lauren Murphy <lauren.murphy@intel.com>
2020-07-25 10:50:03 -04:00
David Leach
565a61dd79 arch/x86: zefi: Fix mismatch in printf with args
printf function didn't have enough specifiers for the
number of arguments in the command line (Coverity warning).

Fixes #26985
Fixes #26986

Signed-off-by: David Leach <david.leach@nxp.com>
2020-07-24 21:51:14 -04:00
David Leach
b201cf3356 subsys/ieee802154: Add 'fall through' comment to switch
Added the 'fall through' comment to switch to quiet compiler
and coverity warnings.

Fixes #25724
Fixes #25726

Signed-off-by: David Leach <david.leach@nxp.com>
2020-07-24 21:51:14 -04:00
David Leach
87e02c62bd subsys/testsuite: Fix coverity null dereference warning
Coverity is not able to detect that the call to ztest_test_fail()
will not return so it emits a warning on a later access to
param. Add a return; after the call so coverity won't complain.

Fixes #25790

Signed-off-by: David Leach <david.leach@nxp.com>
2020-07-24 21:51:14 -04:00
David Leach
48f7f11998 subsys/ztest: Suppress Coverity warning
Coverity warnings on dead loop code. We know this can
occur if the NUM_CPUHOLD is defined as zero which occurs
when CONFIG_SMP is false.

Fixes #20516
Fixes #20517

Signed-off-by: David Leach <david.leach@nxp.com>
2020-07-24 21:51:14 -04:00
David Leach
2abdc19ceb libc: newlib: libc-hooks: Fix Coverity warning
Suppress the coverity warning on using the semaphore as
this semaphore is used and freed only in this function.

Fixes: #18960

Signed-off-by: David Leach <david.leach@nxp.com>
2020-07-24 21:51:14 -04:00
Martí Bolívar
469f53c210 scripts: sanitycheck: import edtlib
This is a cargo-culted attempt to make an error observed in poorly
understood CI circumstances go away when loading edt.pickle, by making
edtlib visible in sys.modules before loading the pickle file.

Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
2020-07-24 17:58:03 -04:00
Wentong Wu
517633c101 scripts: sanitylib.py: add exception check for psutil
Add exception check for psutil when running CI with QEMU.

Signed-off-by: Wentong Wu <wentong.wu@intel.com>
2020-07-24 14:26:33 -04:00
Ioannis Glaropoulos
80f7956a6e CODEOWNERS: replace @vonhust with @abrodkin for ARC review requests
Add @abrodkin to the list of CODEOWNERS for ARC code (ARCH,
BOARDS, DTS) instead of @vonhust.

Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
2020-07-24 17:07:48 +02:00
Anas Nashif
8d8875b752 scripts: add maintainer script
Adding the get_maintainer.py script

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
2020-07-24 17:07:48 +02:00
Ioannis Glaropoulos
a2bd288ae8 MAINTAINERS: initial version of MAINTAINERS file
Pushing the initial version of Zephyr MAINTAINERS file.

Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
2020-07-24 17:07:48 +02:00
Ioannis Glaropoulos
049a974f43 CODEOWNERS: auto-assign reviews in MAINTAINERS.yml, get_maintainer.py
Add an entry in CODEOWNERS for auto-assigning reviewers
in MAINTAINERS.yml and get_maintainer.py files.

Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
2020-07-24 17:07:48 +02:00
Francois Ramu
734c7e053a boards: arm: stm32f091 add rtc feature on the nucleo board
This patch enables the rtc so that the testcase
tests/drivers/counter/counter_basic_api
can run on this nucleo_f091rc board
also when running sanity check

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2020-07-24 16:16:21 +02:00
Francois Ramu
bb2797e7f0 soc: arm: stm32f0 add rtc feature on this serie
This patch enables the rtc on the stm32f0 soc series
from STMicroelectronics

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2020-07-24 16:16:21 +02:00
Francois Ramu
c098aabcaa drivers: counter: rtc for stm32f0 doc series
This patch set the EXTI line 17 as the RTC
on the stm32f0x from STMicroelectronics.

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2020-07-24 16:16:21 +02:00
Josep Puigdemont
7cafe7e74b boards: arm: olimex stm32-h103: Add board
The Olimex STM32-h103 is a development board based on the STM32F103RB,
very similar to the stm32_mini, which was used as a reference for the
pinmux configuration.

Signed-off-by: Josep Puigdemont <josep.puigdemont@gmail.com>
2020-07-24 14:48:07 +02:00
Anas Nashif
093fbc28cb samples: remove useless nfc sample
This sample is nothing more than just a special setup of UART for some
nfc, has nothing specific to nfc and might be misleading, so removing.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2020-07-24 07:50:33 -04:00
Kumar Gala
feeda05323 ci: Add a debug out of what tests we are going to build
Add a cat of the test_file.txt so we can see exactly what tests are
expected to be built and run.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2020-07-24 12:10:15 +02:00
Pete Skeggs
3835b0bd1c lib/os/work_q: sanity check work_q handler prior to calling it
Just as NULL pointers should not be dereferenced, they should
not be called either.

Fixes 26723

Signed-off-by: Pete Skeggs <peter.skeggs@nordicsemi.no>
2020-07-24 12:07:17 +02:00
Kumar Gala
6f53c0a809 dts: arc: emsdp: Cleanup PSRAM use of device_type = "memory"
Remove the device_type = "memory" property from the PSRAM node.  We make
the slightly arbitrary distinction of using 'mmio-sram' compatible for
memories that don't need some kinda of dram style configuration or may
be on die.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2020-07-24 12:06:48 +02:00
Eugeniy Paltsev
9cb9906418 ARC: cleanup exit_tickless_idle
Rewrite 'exit_tickless_idle' macro to make code more readable.
No functional changes intended.

Signed-off-by: Eugeniy Paltsev <Eugeniy.Paltsev@synopsys.com>
2020-07-24 12:05:12 +02:00
Eugeniy Paltsev
3f544ca5b2 ARC: replace NOP ASM inlines with builtin
NOP instruction is available via builtin for ARC so get rid of all
ASM inlines with NOP/NOP_S instructions.

Signed-off-by: Eugeniy Paltsev <Eugeniy.Paltsev@synopsys.com>
2020-07-24 12:05:12 +02:00
Eugeniy Paltsev
79a55ae7a4 ARC: use generic lsb/msb implementation instead of ASM code
Zephyr has generic find_msb_set and find_lsb_set implementations.
They are based on builtins so they are optimized enough.
Drop custom ASM implementation.

Signed-off-by: Eugeniy Paltsev <Eugeniy.Paltsev@synopsys.com>
2020-07-24 12:05:12 +02:00
Andrzej Głąbek
ec8cb07da2 arch: arm: Export vector table symbols with GDATA instead of GTEXT
_vector_table and __vector_relay_table symbols were exported with GTEXT
(i.e. as functions). That resulted in bit[0] being incorrectly set in
the addresses they represent (for functions this bit set to 1 specifies
execution in Thumb state).
This commit corrects this by switching to exporting these objects as
objects, i.e. with GDATA.

Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
2020-07-24 12:04:28 +02:00
Erwan Gouriou
6f38dc9bb6 boards: nucleo_h747: Fix pinmux conditional configuration
To avoid potential conflicts, pin settings should depend on
subsystem activation.
Fix this.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2020-07-24 12:03:33 +02:00
Erwan Gouriou
c062cd260a drivers/ethernet: stm32: Enable Kconfig symbol ETH_STM32_HAL using dts
It should not be needed to configure ETH_STM32_HAL from boards.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2020-07-24 12:03:33 +02:00
Erwan Gouriou
04c1fcfde6 drivers/ethernet: stm32: Get static boot configuration from dts
Update stm32 ethernet driver to get basic boot configuration from
device tree.
So far information are:
- Label
- Base address
- IRQ number and prio
- Clock settings

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2020-07-24 12:03:33 +02:00
Erwan Gouriou
e8f1c17e79 boards: stm32: Enable ethernet devices through device tree
Update boards that use to declare ethernet support to enable
matching ethernet node.
Similarly to other devices, use dts API to control ethernet pin
settings.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2020-07-24 12:03:33 +02:00
Erwan Gouriou
1d84cf93fb dts/arm/st: Add stm32 ethernet nodes
Populate stm32 soc .dtsi files with ethernet nodes

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2020-07-24 12:03:33 +02:00
Erwan Gouriou
254536cf5b dts/bindings: Add st,stm32-ethernet binding
Add binding for stm32 ethernet controller.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2020-07-24 12:03:33 +02:00
Erwan Gouriou
4acc34d1a5 dts: stm32: stm32f769 is a super set of stm32f767
STM32F769 is STM32F767 + DSI

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2020-07-24 12:03:33 +02:00
2dd255d195 boards: arm: add the Arduino Nano 33 IOT
The Arduino Nano 33 IOT is a a small form factor development board
with USB, Wifi, Bluetooth, a 6 axis IMU, and secure element.

Signed-off-by: Michael Hope <mlhx@google.com>
2020-07-24 12:01:50 +02:00
Tobias Svehagen
7ea0c19c55 drivers: wifi: esp: Retry command for getting IP settings
If AT_CIPSTA? command fails it is retried again after 5 seconds.

Fixes #25741

Signed-off-by: Tobias Svehagen <tobias.svehagen@gmail.com>
2020-07-24 12:01:30 +02:00
Raveendra Padasalagi
f4a141639d drivers: dma: Add pl330 dma driver
Add PL330 dma driver support, this driver
- supports 32 bit memory to memory operation
- supports 36 bit memory to memory operation
  under a config flag DMA_64BIT
- supports secure channel

Signed-off-by: Raveendra Padasalagi <raveendra.padasalagi@broadcom.com>
2020-07-24 11:54:31 +02:00
Raveendra Padasalagi
1f3b8c0267 dts: arm: Add devicetree node for pl330 dma
Add device tree node for arm pl330 dma.

Signed-off-by: Raveendra Padasalagi <raveendra.padasalagi@broadcom.com>
2020-07-24 11:54:31 +02:00
Raveendra Padasalagi
a25c30ddd7 dts: bindings: Add documentation for pl330 driver
Add documentation for pl330 dma driver.

Signed-off-by: Raveendra Padasalagi <raveendra.padasalagi@broadcom.com>
2020-07-24 11:54:31 +02:00
Raveendra Padasalagi
306980816a dma: Support 64bit source/dest address
Add 64bit source_address/dest_address fields support.
This is needed in situation where DMA controller is capable
of handling more than 32bit source and destination addresses.

Signed-off-by: Raveendra Padasalagi <raveendra.padasalagi@broadcom.com>
2020-07-24 11:54:31 +02:00
David Leach
db36b146e1 kernel: Remove supported size comments from HEAP_MEM_POOL_SIZE
The mempool implementation doesn't require specific sizes and can
support arbitrary sizes up to the limit of available memory. The
Kconfig documentation on this configuration was confusing user.

Fixes #20418

Signed-off-by: David Leach <david.leach@nxp.com>
2020-07-24 10:19:47 +02:00
Parthiban Nallathambi
d8e63e7161 drivers: wifi: eswifi: enable NET_SOCKETS_OFFLOAD by default
Enable NET_SOCKETS_OFFLOAD is default option for eswifi.

Signed-off-by: Parthiban Nallathambi <parthiban@linumiz.com>
2020-07-24 11:13:31 +03:00
Parthiban Nallathambi
13808b7d83 drivers: wifi: eswifi: fix compilation warnings
Fix compilation warnings when CONFIG_NET_SOCKETS_OFFLOAD enabled

warning: passing argument 5 of '__eswifi_socket_new' makes pointer
 from integer without a cast [-Wint-conversion]
  395 |  idx = __eswifi_socket_new(eswifi, family, type, proto, 0x50CE);
      |                                                         ^~~~~~
      |                                                         |
      |                                                         int
eswifi.h:137:21: note: expected 'void *' but argument is of type 'int'
  137 |    int proto, void *context);
      |               ~~~~~~^~~~~~~
In function 'eswifi_socket_bind':
warning: comparison between pointer and integer
  461 |  if ((addrlen == NULL) || (addr == NULL) ||
      |

Signed-off-by: Parthiban Nallathambi <parthiban@linumiz.com>
2020-07-24 11:13:31 +03:00
Parthiban Nallathambi
0725719ada drivers: wifi: eswifi: Convert raw timeout values to use K_MSEC()
Use K_MSEC instead of raw timeout value.

Signed-off-by: Parthiban Nallathambi <parthiban@linumiz.com>
2020-07-24 11:13:31 +03:00