Commit graph

41120 commits

Author SHA1 Message Date
Erwan Gouriou
1b7b384639 samples/subsys/nvs: Fix typo in samples description.
Typo fix.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2019-02-19 07:45:50 -06:00
Ulf Magnusson
a8c851771c scripts/dts: Remove block in extract_property()
Turn

  if a:
    if b:
      ...

into

  if a and b:
    ...

Simplify some error messages with .format() as well, and get rid of some
redundant str()s. '{0} {1} {1}'.format('foo', 'bar') gives
'foo bar bar'.

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2019-02-19 07:44:44 -06:00
Ulf Magnusson
af3580c314 scripts/dts: Clean up generate_node_defines() a bit
- Reduce the indentation and remove the awkward line breaks. This is
   possible now that there's no recursion.

 - Be consistent with quotes

 - Move some initialization closer to where it's used

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2019-02-19 07:44:44 -06:00
Ulf Magnusson
44467ef8dc scripts/dts: Remove recursion from generate_node_defines()
The recursion was used to implement 'properties:' within 'properties:'
in binding files, which seems to be a dead leftover (and undocumented).

Removing it gets rid of code and makes things more transparent.

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2019-02-19 07:44:44 -06:00
Ulf Magnusson
8455d5f900 dts/bindings/mtd: Remove dead definitions from partition binding
The 'partition\d+:' definition might be a leftover from an older way of
handling partitions. There are no 'partition[0-9]' properties anywhere
in the DTS files.

The reason I want to get rid of this is that it's the only place where
you get a 'properties:' nested inside inside a 'properties:'. That's an
undocumented feature, and removing it will make generate_node_defines()
much simpler (non-recursive).

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2019-02-19 07:44:44 -06:00
Ulf Magnusson
b80905fd8e scripts/dts: Inline filter_list in generate_node_defines()
Makes it clear that it's a static list, and moves the values closer to
where they're used.

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2019-02-19 07:44:44 -06:00
Ulf Magnusson
c20598c84f scripts/dts: Clarify generate_defines() a bit
Use more descriptive naming, get rid of unused 'v' variable, and an
unnecessary None check (None won't appear in get_binding_compats()).

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2019-02-19 07:44:44 -06:00
Ulf Magnusson
3c1d9e893b scripts/dts: Remove unnecessary 'reduced' parameter
...in generate_node_defines(). 'reduced' is available as a global.

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2019-02-19 07:44:44 -06:00
Ulf Magnusson
90c73e3e5a scripts/dts: Rename extract_node_include_info()
...to generate_node_defines().

More explicit. "extract node include info" can be read in many ways:

 - Extract a node's "include info"

 - Extract node and include info

 - etc.

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2019-02-19 07:44:44 -06:00
Ulf Magnusson
0e40c9615b scripts/dts: Move DT_CHOSEN_* generation into generate_defines()
That way it consistently generates all #define's.

Add some related clarifying comments to main() too.

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2019-02-19 07:44:44 -06:00
Ulf Magnusson
cbf9afccbe scripts/dts: Rename generate_node_definitions() to generate_defines()
As in #define's. Easier to guess (to me anyway).

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2019-02-19 07:44:44 -06:00
Ulf Magnusson
c559825ed2 doc: dts: bindings: Document regex support and clean up a bit
- Regexes (e.g. 'pinctrl-.*') are supported in property names in
   bindings, but it was undocumented

 - Remove the mention of 'generation: structure'. The only implemented
   output format is #define's.

 - Clean up the language a bit and move related stuff so that it appears
   together

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2019-02-19 07:44:44 -06:00
Ulf Magnusson
1ca73e33a9 scripts/dts: Use re.fullmatch() instead of re.match(... + '$', ...)
Simpler, and makes it clearer that the regex'ing is deliberate.

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2019-02-19 07:44:44 -06:00
Ulf Magnusson
95385744f9 scripts/dts: Fix indentation in extract_node_include_info()
The for-loop body was indented by 8 spaces instead of 4.

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2019-02-19 07:44:44 -06:00
Mark Ruvald Pedersen
406dc2cb0e bluetooth: controller: Static mem_pdu_rx, remove PDU_RX_SIZE_MIN
mem_pdu_rx is not runtime resized meaning PDU_RX_SIZE_MIN is no longer
relevant.

Dynamic resizing was a left-over from the old bt controller.
Its size field was only ever set to PDU_RX_SIZE_MIN.
PDU_RX_SIZE_MIN only accounted for advertise PDUs.
So we remove size field from mem_pdu_rx.

However, the rest of the BT controller expects to be able to pull
RX_CNT-number of valid nodes from the pool at init/reset (rx_alloc)
time. This will fail unless we inflate the capacity by one.

To avoid inflation-by-one, mem_* would have to be rewritten to avoid
always-one-extra pattern.

Signed-off-by: Mark Ruvald Pedersen <mped@oticon.com>
2019-02-19 10:34:48 +01:00
Mark Ruvald Pedersen
e24d1efe7c bluetooth: controller: Refactor PDU_RX_POOL_SIZE
Refactor PDU_RX_POOL_SIZE into its constituents and name each term.

No functional change expected.

Signed-off-by: Mark Ruvald Pedersen <mped@oticon.com>
2019-02-19 10:34:48 +01:00
Anas Nashif
996c252e51 dfu: mcuboot: rename boot_swap_type> mcuboot_swap_type
This function conflicts with a function of the same name in mcuboot.
This happens when building USB DFU support into mcuboot.

DFU over USB uses image manager and mcuboot internals to manage images
downloaded to the device.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2019-02-19 09:32:02 +01:00
Vinayak Kariappa Chettimada
0d82116655 Bluetooth: controller: Fix bug in Encryption feature cond. compile
Fix a bug in Encryption Procedure feature conditional
compile which prevent any data transfer when the feature was
disabled.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2019-02-19 09:27:24 +01:00
Kumar Gala
8bd360fa14 boards: galileo: Fix I2C device name defaults
Fix setting of the I2C bus master device name for the GPIO_PCAL9535A
device and PWM_PCA9685.  We need to extract them from the dts otherwise
they will just get set to "".

Fixes #13458

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2019-02-18 23:39:12 -05:00
Maureen Helm
6de4578dc6 scripts: Update pyocd version to 0.16.1
Update the pyocd version to pick up a fix for the command 'pyocd erase',
which was broken in 0.15.0 and fixed in 0.16.0. Although we don't have
any in-tree uses of this command in zephyr, there will soon be in-tree
uses in mcuboot when the deprecated 'pyocd-flashtool' and 'pyocd-tool'
commands are replaced with the new unified pyocd commands.

Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
2019-02-18 22:34:25 -05:00
Ulf Magnusson
4c21bab620 dts: nxp: Fix typos: interrupts-names -> interrupt-names
Found with a 'git grep s-names' while figuring out some scripts/dts
code.

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2019-02-18 17:18:58 -05:00
Ivan kyb Kuvaldin
0cb88e0b5e doc: Fix links to docs.zephyrproject.org
append /index.html, and now browser loads page with CSS.

Signed-off-by: Ivan kyb Kuvaldin <i.kyb@ya.ru>
2019-02-18 17:18:33 -05:00
Maureen Helm
cf94d6811a soc: nxp_imx: Default to on-chip memories at soc level
Refactor the imx rt code/data location config defaults such that we
default to on-chip memories at the soc level and override to external
memories at the board level. This means that we frequently override soc
defaults for evk boards, but it removes the assumption that all imx rt
boards (particularly non-evk boards) will have the same external
memories as evk boards.

The end result is that imx rt evk boards still have the same defaults as
before, but the way we get there is different.

Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
2019-02-18 15:14:18 -05:00
Mark Ruvald Pedersen
10d3f070e6 bluetooth: controller: Document RX path flow from mayfly to HCI
No functional change expected.

Signed-off-by: Mark Ruvald Pedersen <mped@oticon.com>
2019-02-18 15:13:45 -05:00
Kamil Piszczek
6bb75a53d1 Bluetooth: gatt: ccc changed cb after connection cb
Changed the order of Bluetooth callbacks. Now the connected callback is
received before CCC changed callbacks.

Signed-off-by: Kamil Piszczek <Kamil.Piszczek@nordicsemi.no>
2019-02-18 15:13:25 -05:00
Bub Wei
55a0e7001d samples: net: zperf: Refactor udp_received
Use the state machine states to determine if the session has ended.
This way zperf will properly reply stat packet to remote client even if
duration of the session is non zero.

Also we don't need to update counter (received packet number) at end of
the session.

Note: if id < 0, it means session end, otherwise it's session ongoing.
(id is the first feild of application data from remote client).

Signed-off-by: Bub Wei <bub.wei@unisoc.com>
2019-02-18 15:12:27 -05:00
Jukka Rissanen
d4d61895b8 tests: net: ipv6_fragment: Fix interface index values
The test needs to use interface index starting from 1.

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2019-02-18 15:10:54 -05:00
Jukka Rissanen
299832738e tests: net: ip-addr: Fix interface index values
The test needs to use interface index starting from 1.

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2019-02-18 15:10:54 -05:00
Jukka Rissanen
3043b50403 tests: net: dns: Fix test as the interface index starts from 1
The test was using index 0 which is no longer correct.

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2019-02-18 15:10:54 -05:00
Jukka Rissanen
3206568e43 net: if: Start index numbering from 1
In order to follow the BSD socket numbering of the network
interfaces, start numbering from 1. The index 0 is reserved
to mean any interface in BSD socket code.

Fixes #13084

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2019-02-18 15:10:54 -05:00
Jukka Rissanen
f626c3ccbe samples: net: sockets: Add smoke testing support
The net-app based echo-server/client applications were used for
various smoke testing purposes. As those two apps are now removed
we need to introduce the same support into sockets based echo-client
and echo-server applications.

Fixes #13300 #13481

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2019-02-18 15:10:01 -05:00
Paul Sokolovsky
89dfa5bb5b samples: dumb_http_server: Fix typos and improve wording in docs
Both actual typos and just less word repetition.

Signed-off-by: Paul Sokolovsky <paul.sokolovsky@linaro.org>
2019-02-18 15:08:37 -05:00
Johann Fischer
853710993d boards: reel_board: remove cts,rts pins from uart node
Remove cts,rts pins from uart node.
The pins are used for expansion connector.

Signed-off-by: Johann Fischer <j.fischer@phytec.de>
2019-02-18 15:08:22 -05:00
Johann Fischer
b5b728495b boards: reel_board: enable pull-up on UART RX pin
Enable pull-up on UART RX pin to reduce power consumption.
If the board is powered by battery and the debugger is
not connected via USB to the host, the SoC consumes up
to 2mA more than expected.
The consumption increases because RX pin is floating
(High-Impedance state of pin B from Dual-Supply Bus Transceiver).

Signed-off-by: Johann Fischer <j.fischer@phytec.de>
2019-02-18 15:08:22 -05:00
Anas Nashif
f9e73c90f2 sanitycheck: do no overide OVERLAY_CONFIG
We have been overriding OVERLAY_CONFIG coming from tests. Concat all
files and create one variable that we pass to kconfig as list.

Fixes #13320

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2019-02-18 10:49:08 -05:00
Sathish Kuttan
d079ce05c7 doc: intel_s1000: update I2S sample app doc
Added documentation on loopback of audio to host

Signed-off-by: Sathish Kuttan <sathish.k.kuttan@intel.com>
2019-02-18 08:23:53 -05:00
Sathish Kuttan
1ef423e2bb samples: intel_s1000: loopback audio to I2S host
Updated I2S sample app for Intel S1000 CRB to loopback
the audio from host in addition to playing audio out to codec

When AUDIO_PLAY_FROM_HOST=Y, audio from host is both looped back
and played out to codec

When AUDIO_PLAY_FROM_HOST=N, audio from host is looped back and
app generated ones are played out to codec.

Signed-off-by: Sathish Kuttan <sathish.k.kuttan@intel.com>
2019-02-18 08:23:53 -05:00
Mark Ruvald Pedersen
0b3c65feea cmake: Toolchain abstraction: optimizations
Introduce toolchain_cc_optimize_for_* family of macros.
Each macro represents a general optimization class.
Each macro is then responsible for setting an output variable to that
class-of-optimization's flag.
The names of these output variables are decided from the root
CMakeLists.txt.

No functional change expected.

Clang's optimization flags are compatible with gcc, and are thus
inherited.

This is motivated by the wish to abstract Zephyr's usage of toolchains,
permitting easier porting to other (commercial) toolchains.

Signed-off-by: Mark Ruvald Pedersen <mped@oticon.com>
2019-02-18 08:22:42 -05:00
Marc Herbert
d5b2834f58 scripts/*syscalls.py: sort os.walk() for a more deterministic build
Found by "disordered --shuffle-dirents=yes".

Sorting os.walk() in scripts/subfolder_list.py removes the randomness in
the following files:

  build/zephyr/misc/generated/syscalls_subdirs.txt
  build/zephyr/CMakeFiles/syscall_list_h_target.dir/ or build.ninja

Sorting os.walk() in scripts/parse_syscalls.py removes the randomness
in:

  build/zephyr/misc/generated/syscalls.json
  build/zephyr/include/generated/syscall_dispatch.c
  build/zephyr/include/generated/syscall_list.h

Note my (limited so far) testing did *not* observe any randomness in any
object file that this would address; the main purpose here is to remove
a very large amount of noise in diffoscope.

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2019-02-17 07:32:05 -05:00
Kumar Gala
e6393dd22e scripts/sanitycheck: Add 'nocache' section to whitelist
Add 'nocache' to the whitelisted list of linker sections.

Fixes #13449

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2019-02-16 22:14:34 -05:00
David B. Kinder
1de7038f1e doc: fix doxygen API comment misspellings
Fix misspellings in doxygen comments missed during regular reviews

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2019-02-16 09:23:41 -06:00
Kumar Gala
64be8d3283 tests: mem_alloc: Fix build issue with malloc test
Since malloc takes a size_t, we should use 0x7fffffff as the max size
(ie what the larget unsigned int) would normall be.  Newer newlib's have
a check that will fail building since 0xf0000000 exceeds the size.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2019-02-16 09:23:16 -06:00
Maureen Helm
f0a20c62ac soc: nxp_imx: Add missing dts fixups for gpio 2,3,4 instances
The imx rt dts fixup was missing gpio 2,3,4 instances. This caused a
build error in the gpio driver when an application enabled:

CONFIG_GPIO_MCUX_IGPIO_2=y
CONFIG_GPIO_MCUX_IGPIO_3=y
CONFIG_GPIO_MCUX_IGPIO_4=y

Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
2019-02-15 21:34:49 -06:00
Maureen Helm
19d1fd0d6c soc: nxp_imx: Clean up whitespace in dts_fixup.h
Clean up whitespace in the imx rt dts_fixup.h so columns are aligned.

Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
2019-02-15 21:34:49 -06:00
Johan Hedberg
1cfa12276c Bluetooth: Mesh: Increase advertising thread size
In certain configurations, such as with MPU support enabled, the
consumption of the advertising thread has gone slightly up. In some
case it was seen to overflow by some 48 bytes. Let it always be 786,
like it was so far with CONFIG_BT_HOST_CRYPTO.

Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2019-02-15 18:49:14 -05:00
Johan Hedberg
3d53ee9a39 tests: bluetooth/mesh_shell: Fine-tune config for lower RAM footprint
This app was supposed to have userspace disabled, but it kept on being
forced on by CONFIG_TEST_USERSPACE (which in turn gets enabled by
CONFIG_TEST).

Also lower the shell stack size since stack analysis shows over 700
bytes being unused.

Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2019-02-15 18:49:14 -05:00
Jukka Rissanen
19475ffe05 net: dns: Fix DNS documentation
Doxygen comments added/fixed. Also hide internal symbols.

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2019-02-15 16:39:06 -05:00
Jukka Rissanen
64ccdecf24 net: ethernet: vlan: Add missing function documentation
VLAN helper functions were not documented.

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2019-02-15 16:39:06 -05:00
Jukka Rissanen
0bd364e847 net: timeouts: Fix documentation for net_timeouts.h
Doxygen comments were missing.

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2019-02-15 16:39:06 -05:00
Jukka Rissanen
592881d7c4 net: ethernet_mgmt: Add missing documentation
Ethernet management functions were not documented.

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2019-02-15 16:39:06 -05:00