Commit graph

99049 commits

Author SHA1 Message Date
Szymon Janc
18d9cd8831 ext: lib: mgmt: mcumgr: update to latest master
This patch introduce version which add two new features:
 - ability to resume partial upload
 - option to not compile taskstat and echo commands

Origin: mcumgr
License: Apache 2.0
URL: https://github.com/apache/mynewt-mcumgr
Commit: 6251689367fcfe92898b90978b877a242b6e4b24
Purpose: New features
Maintained-by: External

Signed-off-by: Szymon Janc <szymon.janc@codecoup.pl>
2018-11-04 22:01:56 +01:00
Ulf Magnusson
dc6b0c83d2 menuconfig: Add two small error reporting and UI improvements
Update menuconfig and Kconfiglib to upstream revision 68426efeae6aa, to
add two minor menuconfig improvements and a small bugfix:

 - Expected errors, like syntax errors in Kconfig files, no longer
   generate a Python backtrace. Just the error message is shown.

 - Entering a choice now places the cursor on the selected symbol, if
   any.

 - Having two consecutive empty 'if's (which could also appear e.g. due
   to osource) crashed the menuconfig when entering show-all mode, due
   to the 'if' removal logic in Kconfiglib failing to remove one of
   them. All configurations of 'if's are now correctly removed.

   This error was found while reading the code.

Some minor optimizations and some internal cleanup is included as well.

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2018-11-04 22:00:56 +01:00
Flavio Ceolin
aecd4ecb8d kernel: Change k_poll_signal api
k_poll_signal was being used by both, struct and function. Besides
this being extremely error prone it is also a MISRA-C violation.
Changing the function to contain a verb, since it performs an action
and the struct will be a noun. This pattern must be formalized and
followed and across the project.

MISRA-C rules 5.7 and 5.9

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2018-11-04 11:37:24 -05:00
Flavio Ceolin
dfbe03249d kernel: stack: Making if's body a compound statement
MISRA-C rule 15.6

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2018-11-04 11:37:24 -05:00
Flavio Ceolin
a406b88fca kernel: Remove duplicated identifier
There was an struct and a variable called _kernel. This is error prone
and a MISRA-C violation. It is changing the struct to have a unique
identifier.

MISRA-C rule 5.8

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2018-11-04 11:37:24 -05:00
Flavio Ceolin
ac14685211 kernel: Delimiting the scope of some variables
According with MISRA-C an object should be defined in a block scope if
it is used in a single function.

MISRA-C rule 8.9

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2018-11-04 11:37:24 -05:00
Flavio Ceolin
4369363f6c kernel: mutex: Change variable declaration
This is not violating any MISRA-C rule, though, it seems to be
triggering a false (rule 9.1) positive in some static analysis
tools. Nevertheless, it is more readable declare all variables in the
same scope together.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2018-11-04 11:37:24 -05:00
Vitaly Gaiduk
abdb8785cb linker: riscv: Disable creating ROM domain by config option.
Patch is useful for RISCV platforms which can not provide ROM memory.
Switching CONFIG_XIP to "n" disables allocating ROM region.

Signed-off-by: Vitaly Gaiduk <vitaly.gaiduk@cloudbear.ru>
2018-11-03 23:00:01 -04:00
David B. Kinder
6871b927b7 doc: update getting started pip3 --user info
Using ``pip3 install --user`` installs Python packages in the Python
user install directory (``.local``) so we should remind folks to add
``~/.local/bin`` to their PATH.

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2018-11-03 22:58:48 -04:00
Kumar Gala
719c9e7b92 dts/bindings: Remove id field from atmel,sam-watchdog
atmel,sam-watchdog..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-11-03 22:56:01 -04:00
Savinay Dharmappa
79a790829f soc: xtensa: intel_s1000: fix fatal exception.
disable XTENSA_ASM2 Config to fix fatal exection
on intel_s1000.

Signed-off-by: Savinay Dharmappa <savinay.dharmappa@intel.com>
2018-11-03 22:39:15 -04:00
Jukka Rissanen
d83ade773f samples: net: zperf: Remove task_profiler as it is not used
The task_profiler is not needed nor used by zperf so remove
it from CMakefile.

Fixes #11051

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2018-11-03 23:53:28 +02:00
Daniel Leung
e4aa946c55 timer: xtensa_sys_timer: set compare register at init
Since CCOMPARE* registers have undefined values after reset,
set compare value first before enabling timer interrupt.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2018-11-03 12:40:33 -04:00
Daniel Leung
5a47c60dbf arch: xtensa: include soc.h to fix build errors
There are places where soc.h must be included. So include it.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2018-11-03 12:40:33 -04:00
Kumar Gala
8ded3fb1e2 riscv: Move DTS Kconfig enablement to arch level
Now that all supported riscv boards support dts, move the Kconfig option
to the arch level.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2018-11-03 06:58:23 -04:00
Kumar Gala
751b02a49c drivers: serial: uart_miv: Convert to use DTS
Update the uart_miv driver to get params like name, addr, baud-rate,
clock freq from DTS generated defines.  Fixup related board and soc code
as needed.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2018-11-03 06:58:23 -04:00
Kumar Gala
11cb8778c7 riscv: Add min dts support for miv SoC & m2gl025_miv board
Add minimal DTS support for the m2gl025_miv.  The dts just has the core,
SoC, PLIC, and UART described.  We still get memory related info from
Kconfig.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2018-11-03 06:58:23 -04:00
Kumar Gala
321c8202d2 linker: Fixup warning associated with .ARC.attributes section
With newer linker for ARC we can possibly get a warning like:

   real-ld: warning: orphan section `.ARC.attributes' from `(foo.o)'
   being placed in section `.ARC.attributes'.

Fixes #11060

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2018-11-02 23:32:32 -04:00
Kumar Gala
a834c53e91 scripts: dts: extract: Fix handling of prop being a list of lists
Before dtc 1.4.7 we'd get something like the following for an gpios
property:

reg = <1 2 3 4>;

After dtc 1.4.7 we get:

cs-gpios = <0x05 0x0d 0x00>, < 0x06 0x00 0x00>;

We should handle both cases in the extract reg handling code.  So if
we see a list of lists, we flatten it to a single list to normalize
the property.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2018-11-02 23:11:33 -04:00
Daniel Leung
a87a6d82ac soc: apollo_lake: fix build errors for GPIO due to DTS changes
The DTS changes introduced in 7ae220c845
changes the naming of GPIO related macros. This updates the usage
of previous macros via DTS fixup.

Fixes #10993

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2018-11-02 21:58:02 -04:00
Daniel Leung
7ad0dd0eec boards: up_squared: dts: fix a typo in I2C address
The address to the I2C6 controller has a typo. So fix it.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2018-11-02 21:58:02 -04:00
Daniel Leung
69ede2f1ce boards: up_squared: add GPIO sample to sanitycheck
This changes the sample.yaml so that it can be included when running
sanitycheck.

Fixes #10994

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2018-11-02 21:58:02 -04:00
David B. Kinder
babc199545 doc: fix misspellings in docs
Scan and fix for misspellings missed during regular
reviews.

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2018-11-02 20:10:20 -04:00
David B. Kinder
402ea4969f doc: fix misspellings in doxygen comments
Scan and fix misspellings in header files in /include missed during
regular reviews.

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2018-11-02 17:58:29 -04:00
David B. Kinder
ee47f7fb7a doc: fix kconfig misspellings
Fix misspellings in Kconfig files that show up in the configuration
documentation (and make menuconfig screens).

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2018-11-02 17:58:16 -04:00
Anas Nashif
eea8e697d2 samples: echo_server: remove features to make binary fit
Remove net shell and stacks to make the binary fit on some platforms.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2018-11-02 17:20:06 -04:00
Anas Nashif
0ab6da1e03 logging: make LOG_LEVEL depend on LOG
We are getting all of those Kconfigs related to logging even without
having logging enabled, make the variables depend on LOG for all users
of the template.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2018-11-02 15:31:44 -05:00
Anas Nashif
282291cd6e subsys: mcumgr: make Kconfigs depend on MCUMGR
We had the if in the wrong place causing some Kconfigs to be set even if
mcumgr was not configured in.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2018-11-02 15:31:44 -05:00
Anas Nashif
b4caa74684 subsys: filesystem: move conditional location
We had the if in the wrong place causing some Kconfigs to be set even if
filesystem was not configured in.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2018-11-02 15:31:44 -05:00
Anas Nashif
412a0b0682 subsys: disk: move conditional location
We had the if in the wrong place causing some Kconfigs to be set even if
DISK_ACCESS was not configured in.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2018-11-02 15:31:44 -05:00
Anas Nashif
aab35b34ac drivers: spi_dw: remove unused LOG_DOMAIN define
This define for the log domain in obsolete and not being used.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2018-11-02 15:31:44 -05:00
Anas Nashif
c01339554b dfu: image_mgr: make Kconfigs depend on IMG_MANAGER
Add an if statement around IMG_MANAGER options.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2018-11-02 15:31:44 -05:00
Subramanian Meenakshi Sundaram
4e1179bba5 drivers: watchdog: Adding watchdog support for sam SOC
Adding watchdog driver for sam SoC. The current implemntation just
diables the watchdog on device boot.
This PR adds the following support for SAM3X, SAM4S and SAME70
1. Activate processor reset
2. Activate all reset
3. Generate interrupt on watchdog timer expiration.

Signed-off-by: Subramanian Meenakshi Sundaram <subbu147@gmail.com>
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2018-11-02 15:09:22 -05:00
Kumar Gala
f05888446d subsys: usb_device: Fix removal of board.h
Restore including board.h to get USB_VUSB_EN_GPIO and associate defines
if the board.h sets them.  This should move to device tree in the
future.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2018-11-02 14:55:53 -04:00
Jukka Rissanen
cf063fe85b net: Rename net_is_xxx...() functions to net_xxx_is...()
Unify the function naming for various network checking functions.

For example:
     net_is_ipv6_addr_loopback() -> net_ipv6_is_addr_loopback()
     net_is_my_ipv6_maddr() -> net_ipv6_is_my_maddr()
etc.

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2018-11-02 14:52:33 -04:00
Vinayak Kariappa Chettimada
133d3870b3 Bluetooth: controller: Fix integer overflow in scheduling code
Fix an integer overflow in the scheduling implementation
that calculates whether resources required for next radio
event be retained.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2018-11-02 12:26:32 -04:00
Jonas Norling
cb53a1a2d5 drivers: clock_control: Remove asserts that break LF clock on nRF5
There are two asserts in the ISR for clock events on the nRF5 that
appear to be accidental.

The first assert fails if there are any LF clock started events, which
there will be when starting up the RC oscillator with calibration.

The second assert fails when we decrement the refcount on the HF
oscillator after finishing a calibration. There will typically be
users left of the HF oscillator, so _m16src_stop() doesn't actually
stop it and thus doesn't return 0.

This code typically works fine because it's not built with asserts
enabled by default. Can be reproduced on a BBC microbit with the
default config plus CONFIG_ASSERT=y.

Signed-off-by: Jonas Norling <jonas.norling@greeneggs.se>
2018-11-02 12:25:06 -04:00
Pavel Kral
e781997450 logger: rtt backend don't let starve others in blocking mode
When a RTT logger backend is configured to blocks, allow other threads
to continue during waiting for data to be transferred to host.

Signed-off-by: Pavel Kral <pavel.kral@omsquare.com>
2018-11-02 12:24:05 -04:00
Krzysztof Chruscinski
62d011549a logging: Support for up to 15 arguments in log message
Extended support in the log_core and log_output to 15 arguments
which is the hard limitation of log message format.

Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
2018-11-02 12:22:01 -04:00
Pushpal Sidhu
1f1faa9195 tests: fat_fs_api: add renaming tests
Test both directory and file renaming.

Signed-off-by: Pushpal Sidhu <psidhu.devel@gmail.com>
2018-11-02 12:21:22 -04:00
Pushpal Sidhu
4c0441b666 fs: fat_fs: Implement fs_rename API
This API call clobbers the destination path as per the fs.h API
definition.

Signed-off-by: Pushpal Sidhu <psidhu.devel@gmail.com>
2018-11-02 12:21:22 -04:00
Christoph Schramm
ff50393bf0 doc: shell: rtt: Add documentation for RTT shell backend
Please see notes for running RTT on macOS

Signed-off-by: Christoph Schramm <schramm@makaio.com>
2018-11-02 12:19:58 -04:00
Christoph Schramm
f17a9c93b4 shell: Add a Segger RTT backend
Fixes: #8394

Signed-off-by: Christoph Schramm <schramm@makaio.com>
2018-11-02 12:19:58 -04:00
Aurelien Jarno
e8a59728e1 samples: usb: mass: rewrite documentation
The USB mass storage documentation was completely outdated. Rewrite it
using reStructuredText, and mentioning the two possible overlays.

Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2018-11-02 12:08:53 -04:00
Anas Nashif
91159849a1 CODEOWNERS: maintainer updates
- Updated maintainers for riscv32: Added @nategraff-sifive
- Removed @tarunkum who is not working on the project anymore

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2018-11-02 10:44:21 -04:00
Johan Hedberg
62fb942d74 tests: bluetooth/tester: Fix having unique log domains
Each c-file must have unique log domains or building will fail at the
linker stage.

Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2018-11-02 10:41:11 -04:00
Jukka Rissanen
f87c4c03f4 tests: net: ipv6: Calculate ICMPv6 checksum for RA message
The IPv6 test was failing because the ICMPv6 checksum was
wrong.

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2018-11-02 16:03:18 +02:00
Jukka Rissanen
75ed6d78df tests: net: mld: Fix ICMPv6 checksum calculation
The ICMP checksum was not placed to correct position in the
created test packet. This caused the checksum to be bad, and
because we now check the ICMP checksum, the packet was rejected
and the mld test failed.

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2018-11-02 16:03:18 +02:00
Jukka Rissanen
6c628737e0 net: ipv6: Verify ICMPv6 checksum before accepting packet
Make sure that ICMPv6 checksum is correct before continuing
processing the packet.

Fixes #10971

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2018-11-02 16:03:18 +02:00
Anas Nashif
b0ebe0dcbd drivers: interrupt_controller: fix cmake file
We were trying to build a file that does not exist, should include .S
file instead of .c

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2018-11-02 09:39:15 -04:00