Commit graph

99049 commits

Author SHA1 Message Date
Ravi kumar Veeramally
b925452911 tests: net: coap: Add new tests
New tests are added.

Signed-off-by: Ravi kumar Veeramally <ravikumar.veeramally@linux.intel.com>
2018-10-31 19:44:25 -04:00
Ravi kumar Veeramally
077408c860 samples: net: coap_server: Implemented over sockets
Sample application coap_server is implemented now over sockets.

Signed-off-by: Ravi kumar Veeramally <ravikumar.veeramally@linux.intel.com>
2018-10-31 19:44:25 -04:00
Ravi kumar Veeramally
2ab8f599ce samples: net: coap_client: Implemented over sockets
Sample application coap_client is implemented now over sockets.

Signed-off-by: Ravi kumar Veeramally <ravikumar.veeramally@linux.intel.com>
2018-10-31 19:44:25 -04:00
Ravi kumar Veeramally
c8954d3544 net: coap: CoAP library support over sockets
CoAP library is migrated to support over socket based
applications or other higher layer protocols. Most of the
API's and functionality is kept as it is except few changes.

net_pkt/net_buf is removed from CoAP library. Now it expects
a pre-allocated flat buffer and length. If there is not enough
space to append any data, library simply returns an error.
It's user's responsibility to allocate and free memory.

One change in functionality is, earlier coap_pending_clear()
used to clear the memory, but now it's user's responsibility
to free the memory.

Signed-off-by: Ravi kumar Veeramally <ravikumar.veeramally@linux.intel.com>
2018-10-31 19:44:25 -04:00
Flavio Ceolin
1fb77d1781 arch: x86: Remove unused struct
struct segment_selector is defined but never used. Besides that, this
tag identifier was clashing with other identifier, what is an undefined
behaviour in C99.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2018-10-31 19:43:47 -04:00
Flavio Ceolin
a3dddedab6 kernel: Use distinct macro names
There is a struct and a macro called _ready_q, this is error
prone. Just removing it.

MISRA-C rule 5.4

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2018-10-31 19:43:47 -04:00
Flavio Ceolin
38bd63ef90 misc: mempool: Using distinct macro identifiers
There are min and max macros declared in util.h.

MISRA-C rule 5.4

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2018-10-31 19:43:47 -04:00
Flavio Ceolin
61a1057ea5 kernel: Remove redundant type name
struct k_thread already has a pointer type k_tid_t, there is no need for
this definition to tcs.

Less symbols/names make the code cleaner and more readable.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2018-10-31 19:43:47 -04:00
Alberto Escolar Piedras
847b7ccbcc tests: kernel tickless: Bugfix for POSIX arch in TICKLESS
In the POSIX architecture, with the inf_clock "SOC", time does
not pass while the CPU is running. Tests that require time to pass
while busy waiting should call k_busy_wait() or in some other way
set the CPU to idle. This test was setting the CPU to idle while
waiting for the next time slice. This is ok if the system tick
(timer) is active and awaking the CPU every system tick period.
But when configured in tickless mode that is not the case, and the
CPU was set to sleep for an indefinite amount of time.
This commit fixes it by using k_busy_wait(a few microseconds) inside
that busy wait loop instead.

Signed-off-by: Alberto Escolar Piedras <alpi@oticon.com>
2018-10-31 19:43:10 -04:00
Alberto Escolar Piedras
574fc953e2 tests: sleep: Bugfix for POSIX arch in TICKLESS
In the POSIX architecture, with the inf_clock "SOC", time does
not pass while the CPU is running. Tests that require time to pass
while busy waiting should call k_busy_wait() or in some other way
set the CPU to idle. This test was setting the CPU to idle while
waiting for the next time slice. This is ok if the system tick
(timer) is active and awaking the CPU every system tick period.
But when configured in tickless mode that is not the case, and the
CPU was set to sleep for an indefinite amount of time.
This commit fixes it by using k_busy_wait(a few microseconds) inside
that busy wait loop instead.

Signed-off-by: Alberto Escolar Piedras <alpi@oticon.com>
2018-10-31 19:43:10 -04:00
Alberto Escolar Piedras
a57ddef003 tests: sched: schedule_api: Bugfix for POSIX arch in TICKLESS
In the POSIX architecture, with the inf_clock "SOC", time does
not pass while the CPU is running. Tests that require time to pass
while busy waiting should call k_busy_wait() or in some other way
set the CPU to idle. This test was setting the CPU to idle while
waiting for the next time slice. This is ok if the system tick
(timer) is active and awaking the CPU every system tick period.
But when configured in tickless mode that is not the case, and the
CPU was set to sleep for an indefinite amount of time.
This commit fixes it by using k_busy_wait(a few microseconds) inside
that busy wait loop instead.

Signed-off-by: Alberto Escolar Piedras <alpi@oticon.com>
2018-10-31 19:43:10 -04:00
Kumar Gala
b683480f18 dts/bindings: Remove id field from inventek,eswifi
inventek,eswifi.yaml had the old id field that we have removed.  Remove
it so we stop getting a warning about it.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2018-10-31 16:58:16 -04:00
Alberto Escolar Piedras
ec1cb2947c native_posix doc: Remove possible macOS support note
native_posix is, from some reports, known to not compile
on macOS. Therefore let's better remove the line that says
that in principle it should to avoid missleading users.

Signed-off-by: Alberto Escolar Piedras <alpi@oticon.com>
2018-10-31 12:04:56 -07:00
Paul Sokolovsky
d850b3a7e7 include: uart: Another pass on improving docstrings
1. Avoid outdated references to registers of a particular hardware
in the generic API.

2. Propagate specifications/clarifications of ISR behavior to
docstrings of more functions which guaranteed to work only in ISR.

This continues work previously done in:

38f78e80cf
0fdc9b5b12
etc.

Signed-off-by: Paul Sokolovsky <paul.sokolovsky@linaro.org>
2018-10-31 12:18:01 -04:00
Punit Vara
2cf270758e lib: posix: Return errno code
Return EINVAL errno when argument doesn't refer to
valid semaphore.

partly fixes #9993

Signed-off-by: Punit Vara <punit.vara@intel.com>
2018-10-31 12:15:22 -04:00
Maureen Helm
bdd1b3897b samples: synchronization: Add openocd configuration
Adds an openocd configuration to sample.yaml.

Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
2018-10-31 12:05:11 -04:00
Maureen Helm
a5b6215a06 debug: openocd: Add floating point context to openocd offsets
Adds preemptive and cooperative floating point contexts to the openocd
offsets array for arm and x86 architectures.

Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
2018-10-31 12:05:11 -04:00
Maureen Helm
1b2ca67f78 debug: openocd: Add thread name to openocd offsets
Adds the thread name to the openocd offsets array so openocd and pyocd
can show thread names in the debugger.

Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
2018-10-31 12:05:11 -04:00
Anas Nashif
9c2c677da8 tests: remove logger-hook test
We now use logger backends with new logger system.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2018-10-31 10:11:14 -04:00
Anas Nashif
5c16be8813 logging: deprecate SYS_LOG_ macros
print a deprecation message when using deprecated SYS_LOG macros.
Everything needs to move to the new logger interface.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2018-10-31 10:11:14 -04:00
Diego Sueiro
5540016965 boards: Add Silabs EFR32MG-SLTB004A (Thunderboard Sense 2) support
The EFR32™ Mighty Gecko Starter Kit EFR32MG-SLTB004A (a.k.a
Thunderboard Sense 2) contains a MCU from the EFR32MG12P family built
on ARM® Cortex®-M4F processor with low power capabilities.

There is an On-Board J-Link Debugger that presents a virtual COM port
for general purpose application serial data transfer with this
interface and a Mass Storage for firmware flashing.

Signed-off-by: Diego Sueiro <diego.sueiro@gmail.com>
2018-10-31 09:00:38 -05:00
Diego Sueiro
4ce6555c1d drivers: Introduce Silabs i2c shim driver
Adds the I2C shim driver for Silabs Gecko Devices.

Signed-off-by: Diego Sueiro <diego.sueiro@gmail.com>
2018-10-31 09:00:38 -05:00
Diego Sueiro
3b0260939c drivers: Introduce Silabs leuart shim serial driver
Adds the Low Energy UART shim serial driver for Silabs Gecko Devices.

Signed-off-by: Diego Sueiro <diego.sueiro@gmail.com>
2018-10-31 09:00:38 -05:00
Krzysztof Chruscinski
4213dbb2e6 logging: add arguments counting in log_generic
Log_generic() can be used by external logger systems to map to zephyr
logger subsystem. Function has variable number of arguments. So far
logger assumed maximal number of arguments to avoid scanning
string to count number of arguments. In outcome, uninitialized memory
was treated as valid argument in a message (but discarded when actual
string formatting took place). Valgrind complained about that so
log_generic() has been extended to scan the string and count number
of arguments and build message with valid number of arguments.

Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
2018-10-31 14:32:21 +01:00
Adithya Baglody
87e592ebda kernel: mutex.c: MISRA C compliance.
This patch fixes few MISRA issues present in mutex.c.

Signed-off-by: Adithya Baglody <adithya.nagaraj.baglody@intel.com>
2018-10-31 08:44:47 -04:00
Adithya Baglody
fedcd65b46 include: dlist.h: MISRA C compliance.
This patch fixes few MISRA issues present in dlist.h.

Signed-off-by: Adithya Baglody <adithya.nagaraj.baglody@intel.com>
2018-10-31 08:44:47 -04:00
Adithya Baglody
d4f6485efd lib: rbtree: Fixed incorrect return type for rb_contains
The API rb_contains computes a boolean value but returns an interger
type.

Signed-off-by: Adithya Baglody <adithya.nagaraj.baglody@intel.com>
2018-10-31 08:44:47 -04:00
Adithya Baglody
fac6885e55 kernel: alert: Declare tracing variables only when needed.
The tracing variable in alert.c was declared by default. This
should have been declared only when CONFIG_OBJECT_TRACING is set.

Signed-off-by: Adithya Baglody <adithya.nagaraj.baglody@intel.com>
2018-10-31 08:44:47 -04:00
Adithya Baglody
2a78b8d86f kernel: queue: MISRA C compliance.
This patch fixes few issues in queue.c. This patch also changes
the return type of k_queue_alloc_append and k_queue_alloc_prepend
from int to s32_t.

Signed-off-by: Adithya Baglody <adithya.nagaraj.baglody@intel.com>
2018-10-31 08:44:47 -04:00
Adithya Baglody
8feda92abc kernel: device: MISRA C compliance.
This patch fixes few issues in device.c.

Signed-off-by: Adithya Baglody <adithya.nagaraj.baglody@intel.com>
2018-10-31 08:44:47 -04:00
Niranjhana N
709bc8ae0d samples: userspace: remove unwanted check
No need to check if array elements are less
than 0 as they are of type unsigned char.

Signed-off-by: Niranjhana N <niranjhana.n@intel.com>
2018-10-31 08:42:40 -04:00
Jan Van Winkel
ca66c8ea41 doc: Added generic display interface to API doc
Added generic display interface to Display Interfaces APIs
documentation

Signed-off-by: Jan Van Winkel <jan.van_winkel@dxplore.eu>
2018-10-31 08:41:27 -04:00
Anas Nashif
b23bcaf406 samples: ms5837: move to new logger
Move sample to the new logger.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2018-10-31 08:34:36 -04:00
Anas Nashif
04c85e64c1 sensors: qdex_nrfx: move to new logger
Move to new logger and use sensor log level instead of our own.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2018-10-31 08:34:36 -04:00
Pavel Kral
a19726ee1e logger: console: init rtt only once
As RTT is used by more subsystem in Zephyr, initialization is moved
from RTT console and RTT logger backend to common kernel init phase.

Signed-off-by: Pavel Kral <pavel.kral@omsquare.com>
2018-10-31 12:47:53 +01:00
Pavel Kral
9eba380cf7 logger: replace hardcoded constant in rtt backend
Replace hardcoded report limit of dropped message by macro.

Signed-off-by: Pavel Kral <pavel.kral@omsquare.com>
2018-10-31 12:47:53 +01:00
Pavel Kral
02afc16dcb logger: fix line_pos setup in rtt backend drop mode
Fix initial write position in line_buf when drop mode is selected.

Signed-off-by: Pavel Kral <pavel.kral@omsquare.com>
2018-10-31 12:47:53 +01:00
Pavel Kral
0459ee4fa1 logger: better code maintainability in rtt backend
Better use of preprocessor to be aware of external library API
changes.

Signed-off-by: Pavel Kral <pavel.kral@omsquare.com>
2018-10-31 12:47:53 +01:00
Pavel Kral
ced1592e54 logger: fix PR codestyle issues
Fix some issues as complained by shippable.

Signed-off-by: Pavel Kral <pavel.kral@omsquare.com>
2018-10-31 12:47:53 +01:00
David Kinder
a7e74b8fdc subsys: logging: Fix grammar in Kconfig
Fix grammar in subsys/logging/Kconfig
Fix grammar in subsys/logging/Kconfig
Fix grammar in subsys/logging/Kconfig
Fix grammar in subsys/logging/Kconfig

Signed-off-by: David Kinder <david.b.kinder@intel.com>
Signed-off-by: Pavel Kral <pavel.kral@omsquare.com>
2018-10-31 12:47:53 +01:00
David Kinder
fdbcb3ce38 ext: debug: segger: Fix grammar in Kconfig
Fix grammar in ext/debug/segger/Kconfig

Signed-off-by: David Kinder <david.b.kinder@intel.com>
Signed-off-by: Pavel Kral <pavel.kral@omsquare.com>
2018-10-31 12:47:53 +01:00
Pavel Kral
1a583fa8be ext: debug: segger: Add USE_SEGGER_RTT that enables RTT libraries.
This option allows to explicitly include Segger RTT libraries and
enables use of it for various subsystems. It is disabled by
default as it consumes more RAM.

Signed-off-by: Pavel Kral <pavel.kral@omsquare.com>
2018-10-31 12:47:53 +01:00
Pavel Kral
2c84fd2631 ext: debug: segger: Terminal sharing using SEGGER_RTT_LOCK/UNLOCK macros
This commit allows to share default RTT (terminal) buffer with various
Zephyr subsystems.

Signed-off-by: Pavel Kral <pavel.kral@omsquare.com>
2018-10-31 12:47:53 +01:00
Pavel Kral
f19f217f08 logger: fix grammar/punctuation in rtt backend Kconfig
Fix some czenglish grammar issues.

Signed-off-by: Pavel Kral <pavel.kral@omsquare.com>
2018-10-31 12:47:53 +01:00
Pavel Kral
89b355c916 logger: Add a Segger RTT backend
Add logger backend that uses Segger RTT for message output. Several
options are provided allowing configuration of up-buffer and logger
behaviour.

Signed-off-by: Pavel Kral <pavel.kral@omsquare.com>
2018-10-31 12:47:53 +01:00
Kumar Gala
58058ee425 dts/bindings: document use of value 'base_label'
'base_label' is not documented.  Update device_node.yaml.template to
fix this.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2018-10-30 19:09:34 -04:00
Benoit Leforestier
3bbf5af668 Linker: Add ".ARM.extab" section in linker script for Cortex-M
When using C++ exceptions in a Cortex-M, the linker return a warning:
warning: orphan section ".ARM.extab"
.ARM.extab section containing exception unwinding information.
This section is missing in the linker script for Cortex-M.

Signed-off-by: Benoit Leforestier <benoit.leforestier@gmail.com>
2018-10-30 19:04:50 -04:00
Kumar Gala
a19ae13181 drivers: sensors: remove deprecated enum values
Its been at least 2 releases since we marked a number of the sensor enum
values as deprecated.  Lets remove them.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2018-10-30 15:28:41 -05:00
Kumar Gala
d505d9a8ca driver: sensor: bmm150: Use SENSOR_CHAN_MAGN_XYZ
Driver should be using SENSOR_CHAN_MAGN_XYZ as SENSOR_CHAN_MAGN_ANY has
been deprecated for a while.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2018-10-30 15:28:41 -05:00
Maureen Helm
f3da1d510c boards: lpcxpresso54114: Combine m4/m0 boards into one directory
Combines the lpcxpresso54114_m4 and lpcxpresso54114_m0 boards into one
directory containing both board configurations. This eliminates some
duplicate code and documentation, and better represents the actual
hardware.

Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
2018-10-30 15:14:35 -05:00