Commit graph

19237 commits

Author SHA1 Message Date
Ioannis Glaropoulos
5343f8973d cmake: indicate single precision floating-point for Cortex-M33
ARM Cortex-M33 may implement an optional Floating Point Unit
(FPU) supporting single-precision arithmetic. This commit
modifies the respective GCC_M_CPU flag to comply with Cortex-M33.

Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
2018-02-23 21:42:22 -06:00
Spoorthi K
b1ba49be7c tests: kernel: Verify the call to abort handler
The test sets a abort handler and checks if it is called
when the thread is aborted.

Signed-off-by: Spoorthi K <spoorthi.k@intel.com>
2018-02-23 13:45:51 -05:00
Vitor Massaru Iha
6f9823e4a6 samples: basic: fade_led: Update sample to work with ESP32
Update fade_led sample to work with ESP32.

Signed-off-by: Vitor Massaru Iha <vitor@massaru.org>
2018-02-23 13:13:12 -05:00
Vitor Massaru Iha
fbaddfb079 drivers: pwm: Add PWM LED driver for ESP32
This is a initial support for PWM LED controller on ESP32.

Signed-off-by: Vitor Massaru Iha <vitor@massaru.org>
2018-02-23 13:13:12 -05:00
Jukka Rissanen
d36028fa52 doc: Add networking information to 1.11 release note
Contains major networking changes between 1.10 and 1.11 releases.

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2018-02-23 16:24:42 +01:00
Holman Greenhand
400dc79326 timer: cortex_m: Fix the discontinuous readings of the cycle counter.
On a stm32, When we use the k_busy_wait function to wait a
delay (500us) just after an idle tickless period the delay could be
lower than the requested one. Consecutive readings of the cycle counter
made with the function k_cycle_get_32 juste after tickeless period
provides erroneous values (value jump) after some time (100 us).

To fix this issue we needs:

- Add the update of clock_accumulated_count value in the
_timer_idle_exit function.

- Treat the case in the get_elapsed_count function when the reload value
of the timer is set to a remaining value to wait until end of tick (see
_timer_idle_exit) . In this case the time elapsed until the systick
timer restart was not yet added to clock_accumulated_count. To retrieve
a correct cycle count we must therefore consider the number of cycle
since current tick period start and not only the cycle number since the
timer restart.

Fixes #6164

Signed-off-by: Holman Greenhand <greenhandholman@gmail.com>
2018-02-23 08:58:23 -06:00
Justin Watson
7170339293 codeowners: Add fallrisk as codeowner of SOC SAM4S
Also added fallrisk as codeowner of board sam4s_xplained.

Signed-off-by: Justin Watson <jwatson5@gmail.com>
2018-02-23 08:52:48 -06:00
Jonas Pfaff
f208a59c5e boards: arm: same70: Add mcuboot flash partitions to dts
Extend same70 dts with mcuboot compatible flash partitions

Signed-off-by: Jonas Pfaff <jonas.pfaff@gmail.com>
2018-02-23 08:52:48 -06:00
Alberto Escolar Piedras
d118b6470e samples: drivers/entropy fixes
* .yaml: added expression for test
* README: Eeach second 9 bytes are generated not 10

Signed-off-by: Alberto Escolar Piedras <alpi@oticon.com>
2018-02-23 07:34:07 -05:00
Alberto Escolar Piedras
30ae79ae39 native: added entropy device
Added pseudorandom entropy device for the native_posix board

Signed-off-by: Alberto Escolar Piedras <alpi@oticon.com>
2018-02-23 07:34:07 -05:00
Alberto Escolar Piedras
f004e0475e native: added more proper command line parameters parsing
Added a basic command line parameter parsing framework

Added the following options by now:
--stop-at=<time>: Auto-stop after <time> seconds
--seed=<seed>   : random seed for entropy device
--testargs      : any argument that follows is ignored in top level
                  and made available thru
                  native_get_test_cmd_line_args()

All command line parameters are still avaliable by calling
native_get_cmd_line_args(), but now you can also call
native_get_test_cmd_line_args() to get whatever was set after
--testargs

Signed-off-by: Alberto Escolar Piedras <alpi@oticon.com>
2018-02-23 07:33:11 -05:00
Savinay Dharmappa
31a4e1ccf4 subsys: kernel_event_logger: change kernel event values
Each bit of "_sys_k_event_logger_mask" corresponds to a
kernel event type. Hence KERNEL_EVENT_TYPE values should be
power of 2. Previous implementation was not adhering
to it ,because of which "sys_k_must_log_event" and
"sys_k_event_logger_set_mask" had unintended effects when
used to mask certain kernel events.

Signed-off-by: Savinay Dharmappa <savinay.dharmappa@intel.com>
2018-02-23 07:29:29 -05:00
Ruslan Mstoi
b7ef393bfe net: ipv6: Drop ICMPv6 packet if NA header is NULL
This commit fixes the crash of echo_server from malformed
ICMPv6 NA packet.

Fixes #6315

Signed-off-by: Ruslan Mstoi <ruslan.mstoi@intel.com>
2018-02-23 09:13:10 +02:00
Paul Sokolovsky
ec207f4250 net: app: Move mbedTLS debug log level config to mbedTLS Kconfig
mbedTLS log level is obviously a mbedTLS config setting. It makes
sense to have it defined in mbedTLS Kconfig, and different parts
of Zephyr to reuse as needed (e.g. net-app vs upcoming TLS wrapper
for sockets).

Signed-off-by: Paul Sokolovsky <paul.sokolovsky@linaro.org>
2018-02-22 18:44:55 -05:00
Ruslan Mstoi
ca94b86b3d drivers: console: Fix crash in shell
Shell crashes when enter is pressed. This commit reverts relevant
changes from 14735116d1 that cause
this issue.

Fixes #6322

Signed-off-by: Ruslan Mstoi <ruslan.mstoi@intel.com>
2018-02-22 15:29:08 -05:00
David B. Kinder
05e00f6e7f doc: remove use of sphinx autodoc extension
Looks like newer versions of Sphinx have a problem with the autodoc
extension.  Since we're not usine Sphinx to process python source for
documentation, removing use of autodoc eliminates the problem.

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2018-02-22 15:28:34 -05:00
David B. Kinder
540efaf402 doc: fix misspellings in docs
regular spell check on .rst files found a few misspelled words

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2018-02-22 15:28:20 -05:00
David B. Kinder
3673698df1 doc: fix misspellings in XTENSA Kconfig
regular scan for spelling issues

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2018-02-22 15:28:04 -05:00
David B. Kinder
cf04bd9e9d doc: fix broken link in contributing guidelines
Link to the implicit target of a doc title wasn't correct

Fixes: #6324
Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2018-02-22 14:13:41 -05:00
Marti Bolivar
94d7afd73f boards: delete misleading comments in flash partitions
The space referred to in these comments was once truly reserved for
the application: no zephyr partition would ever use it.

Now, though, that's not the case, since NFFS will use these sectors
when enabled.

Just delete the comments.

Signed-off-by: Marti Bolivar <marti@opensourcefoundries.com>
2018-02-22 18:52:42 +01:00
Marti Bolivar
527e5dabe7 boards: dts: replace comments with links to documentation
Let's point users at the latest documentation on flash
partitions from each of the board files, rather than duplicating some
of the information in it.

Signed-off-by: Marti Bolivar <marti@opensourcefoundries.com>
2018-02-22 18:52:42 +01:00
Marti Bolivar
e8e731e53b dts: common.dts: trivial whitespace cleanup
Trivial.

Signed-off-by: Marti Bolivar <marti@opensourcefoundries.com>
2018-02-22 18:52:42 +01:00
Marti Bolivar
b7b1dfb8b6 doc: application: re-work DT overlay section
Edits and additions for clarity and correctness, based on the current
contents of the file (dts.cmake) which controls the DTS build.

Signed-off-by: Marti Bolivar <marti@opensourcefoundries.com>
2018-02-22 18:52:42 +01:00
Marti Bolivar
137cb01693 doc: flash_partitions: rework
Re-work the flash partitions documentation:

- add sections to provide more complete context

- link to useful information on DT overlays elsewhere in the
  documentation

- touch up some phrasing

- inline a smaller, self-contained example within the page rather than
  linking to an entire board dts

Signed-off-by: Marti Bolivar <marti@opensourcefoundries.com>
2018-02-22 18:52:42 +01:00
Kumar Gala
b328ec51ac cmake: dts.cmake: Use SOC_PATH to find soc/dts.fixup
Per arch the path to the SOC dir that we would find dts.fixup varies
between being ${CONFIG_SOC_FAMILY}/${CONFIG_SOC_SERIES} and just
${CONFIG_SOC}.  The ${SOC_PATH} var handles defining this correct so
use it instead when we define DTS_SOC_FIXUP_FILE.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2018-02-22 10:14:02 -06:00
Kumar Gala
440cc18d1b cmake: Move SOC_* var defines to cmake/app/boilerplate.cmake
We need access to SOC_PATH in dts.cmake so we need to move the
definitions of SOC_NAME, SOC_SERIES, SOC_FAMILY, and SOC_PATH out of the
toplevel CMakeLists.txt and into cmake/app/boilerplate.cmake.  We place
them before we include cmake/dts.cmake so they will be available to use
in it.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2018-02-22 10:14:02 -06:00
4f9864b15b boards: add the Adafruit Trinket M0.
The Trinket M0 is a tiny SAMD21 based board with USB, UART, SPI, and
an on-board RGB LED.

Signed-off-by: Michael Hope <mlhx@google.com>
2018-02-22 08:25:39 -06:00
Youvedeep Singh
4d72e48d31 arch: POSIX: Add guard into posix_cheats file.
Some of APIs of POSIX implmentation layer has same name as
native_posix architecture. posix_cheats.h is used to handle this
duplication in API name. Adding a guard in posix_cheats.h based on
CONFIG_PTHREAD_API.

Signed-off-by: Youvedeep Singh <youvedeep.singh@intel.com>
2018-02-21 19:17:28 -05:00
Youvedeep Singh
49fbfbb015 tests: kernel: posix: timer: POSIX timer test.
Added test for POSIX timer APIs.

Signed-off-by: Youvedeep Singh <youvedeep.singh@intel.com>
2018-02-21 19:17:28 -05:00
Youvedeep Singh
8d040f1bcb kernel: POSIX: Compatibility layer for POSIX timer APIs.
This patch provides POSIX timer APIs for POSIX 1003.1 PSE52 standard.

Signed-off-by: Youvedeep Singh <youvedeep.singh@intel.com>
2018-02-21 19:17:28 -05:00
Youvedeep Singh
f0b678b03b tests: kernel: posix: pthread_cancel: POSIX thread cancel test.
Added test for POSIX thread cancel APIs.

Signed-off-by: Youvedeep Singh <youvedeep.singh@intel.com>
2018-02-21 19:17:28 -05:00
Youvedeep Singh
cdaffef883 tests: kernel: posix: pthread: Add pthread test.
This test is POSIX based implementation of tests:kernel:pthread test.
It used POSIX APIs instead of Zephyr APIs.

Signed-off-by: Youvedeep Singh <youvedeep.singh@intel.com>
2018-02-21 19:17:28 -05:00
Youvedeep Singh
2d37286404 tests: kernel: posix: clock: Add posix clock test.
Add posix clock API test.

Signed-off-by: Youvedeep Singh <youvedeep.singh@intel.com>
2018-02-21 19:17:28 -05:00
Youvedeep Singh
2e43d001ea tests: kernel: posix: pthread_join: Add pthread join test.
Implement pthread_join test application.

Signed-off-by: Youvedeep Singh <youvedeep.singh@intel.com>
2018-02-21 19:17:28 -05:00
Youvedeep Singh
7903c84694 kernel: POSIX: removing unused elements from POSIX object attribute.
This patch removes unused member element from POSIX object attributes
(mutex, condition variable and barrier).

Signed-off-by: Youvedeep Singh <youvedeep.singh@intel.com>
2018-02-21 19:17:28 -05:00
Youvedeep Singh
d50b1fe981 kernel: POSIX: Compatibility layer for POSIX clock APIs.
This patch provides POSIX clock APIs for POSIX 1003.1 PSE52 standard.

Signed-off-by: Youvedeep Singh <youvedeep.singh@intel.com>
2018-02-21 19:17:28 -05:00
Youvedeep Singh
1f2e126d4d kernel: POSIX: Compatibility layer for POSIX sleep APIs.
This patch provides POSIX sleep APIs for POSIX 1003.1 PSE52 standard.
sleep(n) is implemented using Zephyr k_sleep API.
uleep(n) is implemented using Zephyr k_sleep/k_busy_Wait API.

Signed-off-by: Youvedeep Singh <youvedeep.singh@intel.com>
2018-02-21 19:17:28 -05:00
Youvedeep Singh
7eabf1025c kernel: POSIX: Compatibility layer for scheduler APIs.
This patch provides scheduler APIs for POSIX 1003.1 PSE52 standard.

Signed-off-by: Youvedeep Singh <youvedeep.singh@intel.com>
2018-02-21 19:17:28 -05:00
Youvedeep Singh
c8aa6570c1 kernel: POSIX: Compatibility layer for pthread APIs.
This patch provides pthread APIs for POSIX 1003.1 PSE52 standard.

Signed-off-by: Youvedeep Singh <youvedeep.singh@intel.com>
2018-02-21 19:17:28 -05:00
Youvedeep Singh
abc94b8597 kernel: POSIX: moving POSIX related typedef into sys/types.h file.
As per POSIX standard typedef should be part of sys/types.h file.
So moving typedef from pthread.h to sys/types.h file.

Signed-off-by: Youvedeep Singh <youvedeep.singh@intel.com>
2018-02-21 19:17:28 -05:00
Youvedeep Singh
325abfbcf4 kernel: POSIX: Fixing return value of POSIX APIs on error.
As per IEEE 1003.1 POSIX APIs should return ERROR_CODE on error.
But currently these are returning -ERROR_CODE instead of ERROR_CODE.
So fixing the return value.

Signed-off-by: Youvedeep Singh <youvedeep.singh@intel.com>
2018-02-21 19:17:28 -05:00
Christopher Collins
f31245d365 subsys: dfu: boot: Remove unused ver query code.
Duplicate code to query was mistakenly added in commit
2ad7ccdb2d.  This code is redundant; the
existing `boot_read_bank_header()` function can read the version from
both image banks.

Signed-off-by: Christopher Collins <ccollins@apache.org>
2018-02-21 18:53:42 -05:00
Kumar Gala
d9bd6909c3 samples: dump_http_server: move generated files into include/generated
Move the generated files into include/generated so they live with the
build and not in the zephyr source tree.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2018-02-21 18:53:23 -05:00
2e7146b7a6 arch: refactor the SAM0 SoC fixups into a SoC-level file.
This prepares the way for the Trinket M0.

Signed-off-by: Michael Hope <mlhx@google.com>
2018-02-21 16:03:10 -06:00
Kumar Gala
87a8d199d8 dts: atmel_sam: Refactor SoC dts.fixup into arch/arm/soc/atmel_sam
Move common SoC dts.fixup defines into
arch/arm/soc/atmel_sam/<BAR>/dts.fixup so we remove duplication in the
boards and only have board specific defines in
boards/arm/<FOO>/dts.fixup.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2018-02-21 16:02:12 -06:00
Kumar Gala
a73e8fa083 dts: nxp: Refactor imx/rt dts.fixup into arch/arm/soc
Move common SoC dts.fixup defines into arch/arm/soc/nxp_imx/rt/dts.fixup
so we remove duplication in the boards and only have board specific
defines in boards/arm/<FOO>/dts.fixup.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2018-02-21 11:38:36 -06:00
Kumar Gala
4c50b1f199 dts: nxp: Refactor kwx dts.fixup into arch/arm/soc
Move common SoC dts.fixup defines into
arch/arm/soc/nxp_kinetis/kwx/dts.fixup so we remove duplication in
the boards and only have board specific defines in
boards/arm/<FOO>/dts.fixup.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2018-02-21 11:38:36 -06:00
Kumar Gala
8760edd6a5 dts: nxp: Refactor kl2x dts.fixup into arch/arm/soc
Move common SoC dts.fixup defines into
arch/arm/soc/nxp_kinetis/kl2x/dts.fixup so we remove duplication in
the boards and only have board specific defines in
boards/arm/<FOO>/dts.fixup.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2018-02-21 11:38:36 -06:00
Kumar Gala
29d4ea327f dts: nxp: Refactor lpc54xxx dts.fixup into arch/arm/soc
Move common SoC dts.fixup defines into
arch/arm/soc/nxp_lpc/lpc54xxx/dts.fixup so we remove duplication in
the boards and only have board specific defines in
boards/arm/<FOO>/dts.fixup.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2018-02-21 11:38:36 -06:00
Kumar Gala
340bc66f24 dts: nxp: Refactor k64 dts.fixup into arch/arm/soc
Move common SoC dts.fixup defines into
arch/arm/soc/nxp_kinetis/k6x/dts.fixup so we remove duplication in the
boards and only have board specific defines in
boards/arm/<FOO>/dts.fixup.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2018-02-21 11:38:36 -06:00