Commit graph

99049 commits

Author SHA1 Message Date
Anas Nashif
115b811016 ci: do not build all tests when docs/images change
When we change documentation or board images, do not build all tests for
this board. Only add more tests when actual code has changed.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2019-02-09 17:22:08 -06:00
Yannis Damigos
6a676caab6 usb_dc_stm32: Fix check endpoint capabilities
DT_USB_NUM_BIDIR_ENDPOINTS includes EP0, which we should not
take it into account when we check endpoint capabilities

Signed-off-by: Yannis Damigos <giannis.damigos@gmail.com>
2019-02-09 16:58:22 -06:00
Robert Lubos
d942c1d718 doc: Add MQTT high-level description
Add high-level documentation for MQTT library.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2019-02-09 09:39:03 -05:00
Uri Shaked
2e68bc02b9 drivers: ssd1673: fix typo in string
then -> than

Signed-off-by: Uri Shaked <uri@urishaked.com>
2019-02-09 07:45:57 -05:00
Kumar Gala
561d6dd1ed scripts/dts/extract_dts_includes: Mark non DT_ defines as deprecated
Mark any define that doesn't start with DT_, LED, SW, or have PWM_LED in
the name as deprecated via __DEPRECATED_MACRO.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2019-02-09 04:47:59 -06:00
Ulf Magnusson
5c67ebe4a8 scripts/dts: Clean up Bindings.bindings()
Some more work will be done here later (yaml_list could be replaced by a
few plain variables, for example), but this is a start:

 - Extract the compat string from the 'compatible:' line directly in the
   regex, instead of separately

 - Flatten the code, turning

     if a:
       ...
       if b:
         ...
         if c:
           ...

   into

     if not a:
        continue

     ...

     if not b:
        continue

     ...

     if not c:
        continue

     ...

 - Add some comments

 - Use clearer naming

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2019-02-08 22:57:05 -06:00
Ulf Magnusson
4e5868f4af scripts/dts: Make all_compats() return a set with all compats
Previously, all_compats() returned a dictionary mapping nodes to their
'compatible' values. This dictionary was then (only) used to generate a
set() of all 'compatible' strings.

Save a step and get rid of some code by having all_compats() return a
set() with all 'compatible' strings directly.

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2019-02-08 22:57:05 -06:00
Ulf Magnusson
4fcdd134c2 scripts/dts: Improve naming in create_phandles()
k, v -> child_name, child_node

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2019-02-08 22:57:05 -06:00
Ulf Magnusson
8c515b25a3 scripts/dts: Remove unused create_phandles() 'handle' parameter
Unused.

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2019-02-08 22:57:05 -06:00
Ulf Magnusson
ace8450040 scripts/dts: Simplify get_all_compatibles()
- Rename to all_compats(). The "compats" part is consistent with
   elsewhere.

 - Don't require an empty dictionary to be passed in. Build the
   result within the function instead.

 - Use more specific names (k, v -> child_name, child_node)

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2019-02-08 22:57:05 -06:00
Ulf Magnusson
cb507889dd scripts/dts: Replace dts['/'] with 'root'
Factors out some code.

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2019-02-08 22:57:05 -06:00
Ulf Magnusson
b52290fa58 scripts/dts: Rename get_chosen() to create_chosen()
It creates the global 'chosen' dictionary. get_*() makes it sound like
it returns a value.

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2019-02-08 22:57:05 -06:00
Ulf Magnusson
28c76fd3d8 scripts/dts: Rename get_aliases() to create_aliases()
It creates the global 'aliases' dictionary. get_*() makes it sound like
it returns a value.

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2019-02-08 22:57:05 -06:00
Ulf Magnusson
6d824feb69 scripts/dts: Rename get_phandles() to create_phandles()
It creates the global 'phandles' dictionary. get_*() makes it sound like
it returns a value.

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2019-02-08 22:57:05 -06:00
Ulf Magnusson
ccf7de0306 scripts/dts: Rename get_reduced() to create_reduced()
It creates the global 'reduced' dictionary. get_*() makes it sound like
it returns a value.

Fix a comment that might make people think the global dictionaries are
Python lists too.

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2019-02-08 22:57:05 -06:00
Ulf Magnusson
9eb0d33ca0 scripts/dts: Simplify extract_string_prop()
Check if the node is missing from 'defs' first, and insert it if not.
That way, later code can assume it exists.

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2019-02-08 22:57:05 -06:00
Kumar Gala
2508818bc3 tests: fs: nffs_fs_api: Convert FLASH_AREA to DT_FLASH_AREA
Use DT_FLASH_AREA prefixed defined instead of FLASH_AREA as the non-DT
version is deprecated.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2019-02-08 22:39:07 -06:00
Kumar Gala
67a7b43fc9 dfu: img_util: Convert FLASH_WRITE_BLOCK_SIZE to DT_
Use DT_FLASH_WRITE_BLOCK_SIZE prefixed defined instead of
FLASH_WRITE_BLOCK_SIZE as the non-DT version is deprecated.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2019-02-08 22:39:07 -06:00
Kumar Gala
9237dbee4e dfu: boot: mcuboot: Convert FLASH_WRITE_BLOCK_SIZE to DT_
Use DT_FLASH_WRITE_BLOCK_SIZE prefixed defined instead of
FLASH_WRITE_BLOCK_SIZE as the non-DT version is deprecated.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2019-02-08 22:39:07 -06:00
Kumar Gala
3de6de305f west: sign: Convert FLASH_WRITE_BLOCK_SIZE to DT_
Use DT_FLASH_WRITE_BLOCK_SIZE prefixed defined instead of
FLASH_WRITE_BLOCK_SIZE as the non-DT version is deprecated.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2019-02-08 22:39:07 -06:00
Kumar Gala
22253fcf6d openthread: Convert FLASH_ERASE_BLOCK_SIZE to DT_
Use DT_FLASH_ERASE_BLOCK_SIZE prefixed defined instead of
FLASH_ERASE_BLOCK_SIZE as the non-DT version is deprecated.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2019-02-08 22:39:07 -06:00
Kumar Gala
b813ae2b54 samples: subsys: nvs: Convert FLASH_ERASE_BLOCK_SIZE to DT_
Use DT_FLASH_ERASE_BLOCK_SIZE prefixed defined instead of
FLASH_ERASE_BLOCK_SIZE as the non-DT version is deprecated.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2019-02-08 22:39:07 -06:00
Kumar Gala
7b4ee6bd45 flash: spi_nor: Convert FLASH_{WRITE,ERASE}_BLOCK_SIZE to DT_
Convert generic FLASH_{WRITE,ERASE}_BLOCK_SIZE to driver specific
generated define DT_JEDEC_SPI_NOR_0_{WRITE,ERASE}_BLOCK_SIZE.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2019-02-08 22:39:07 -06:00
Kumar Gala
b0308f7fcd flash: flash_gecko: Convert FLASH_WRITE_BLOCK_SIZE to DT_
Convert generic FLASH_WRITE_BLOCK_SIZE to driver specific generated
define DT_SOC_NV_FLASH_0_WRITE_BLOCK_SIZE.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2019-02-08 22:39:07 -06:00
Kumar Gala
73f2466f00 flash: flash_sam: Convert FLASH_{WRITE,ERASE}_BLOCK_SIZE to DT_
Convert generic FLASH_{WRITE,ERASE}_BLOCK_SIZE to driver specific
generated define DT_SOC_NV_FLASH_0_{WRITE,ERASE}_BLOCK_SIZE.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2019-02-08 22:39:07 -06:00
Kumar Gala
590b5a08a2 flash: soc_flash_mcux: Convert FLASH_ERASE_BLOCK_SIZE to DT_
Convert generic FLASH_ERASE_BLOCK_SIZE to driver specific generated
define DT_SOC_NV_FLASH_0_ERASE_BLOCK_SIZE.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2019-02-08 22:39:07 -06:00
Kumar Gala
f6c7e9a997 flash: flash_stm32: Convert FLASH_WRITE_BLOCK_SIZE to DT_
Convert generic FLASH_WRITE_BLOCK_SIZE to driver specific generated
define DT_SOC_NV_FLASH_0_WRITE_BLOCK_SIZE.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2019-02-08 22:39:07 -06:00
Kumar Gala
1b2496866c tests: fs: multi-fs: Convert FLASH_AREA to DT_FLASH_AREA
Use DT_FLASH_AREA prefixed defined instead of FLASH_AREA as the non-DT
version is deprecated.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2019-02-08 22:39:07 -06:00
Kumar Gala
a5c1bb59e0 dfu: boot: mcuboot: Convert FLASH_AREA to DT_FLASH_AREA
Use DT_FLASH_AREA prefixed defined instead of FLASH_AREA as the non-DT
version is deprecated.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2019-02-08 22:39:07 -06:00
Kumar Gala
65cd010fc1 west: sign: Convert FLASH_AREA to DT_FLASH_AREA
Use DT_FLASH_AREA prefixed defined instead of FLASH_AREA as the non-DT
version is deprecated.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2019-02-08 22:39:07 -06:00
Kumar Gala
8a6bd7e654 fs: nffs: Convert FLASH_AREA to DT_FLASH_AREA
Use DT_FLASH_AREA prefixed defined instead of FLASH_AREA as the non-DT
version is deprecated.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2019-02-08 22:39:07 -06:00
Kumar Gala
dc0ad52320 samples: nvs: Convert FLASH_AREA to DT_FLASH_AREA
Use DT_FLASH_AREA prefixed defined instead of FLASH_AREA as the non-DT
version is deprecated.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2019-02-08 22:39:07 -06:00
Kumar Gala
2a14a28d19 boards: reel_board: Convert FLASH_AREA to DT_FLASH_AREA
Use DT_FLASH_AREA prefixed defined instead of FLASH_AREA as the non-DT
version is deprecated.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2019-02-08 22:39:07 -06:00
Kumar Gala
ec63dca3ea scripts/dts/extract: Fix producing bogus alias if reg has no size
Its possible that a reg property is address only.  If that's the case we
should produce any alias information for the size.  We should check
nr_size_cells to decide to handle the alias case or not.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2019-02-08 22:39:07 -06:00
Kumar Gala
e3e87f624f scripts/dts/extract_dts_includes: Hand alias to alias for write_conf
If we have an alias pointing to another alias we would get None in the
resulting conf file.  However that alias might exist, so try looking it
up again in the aliases db.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2019-02-08 22:39:07 -06:00
Kumar Gala
5a20a418a2 scripts/dts/extract: Remove generation for FLASH_LABEL
FLASH_LABEL define isn't used anywhere so remove it.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2019-02-08 22:39:07 -06:00
Kumar Gala
873e4e950a scripts/dts/extract_dts_includes: Add DT_ prefix to FLASH_AREA defines
We generate the following FLASH prefixed defines:

	FLASH_AREA_MCUBOOT_LABEL
	FLASH_AREA_MCUBOOT_OFFSET
	FLASH_AREA_MCUBOOT_OFFSET_0
	FLASH_AREA_MCUBOOT_READ_ONLY
	FLASH_AREA_MCUBOOT_SIZE
	FLASH_AREA_MCUBOOT_SIZE_0

Now we generate DT_ prefixed versions:

	DT_FLASH_AREA_MCUBOOT_LABEL
	DT_FLASH_AREA_MCUBOOT_OFFSET
	DT_FLASH_AREA_MCUBOOT_OFFSET_0
	DT_FLASH_AREA_MCUBOOT_READ_ONLY
	DT_FLASH_AREA_MCUBOOT_SIZE
	DT_FLASH_AREA_MCUBOOT_SIZE_0

And will deprecate the non DT_ prefixed versions in the future.  We keep
them around as aliases for the time being.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2019-02-08 22:39:07 -06:00
Kumar Gala
2024f6b2a0 scripts/dts/extract_dts_includes: Add DT_ prefix to FLASH defines
We generate the following FLASH prefixed defines:
	FLASH_LABEL
	FLASH_ERASE_BLOCK_SIZE
	FLASH_WRITE_BLOCK_SIZE

Now we generate DT_ prefixed versions:
	DT_FLASH_LABEL
	DT_FLASH_ERASE_BLOCK_SIZE
	DT_FLASH_WRITE_BLOCK_SIZE

And will deprecate the non DT_ prefixed versions in the future.  We keep
them around as aliases for the time being.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2019-02-08 22:39:07 -06:00
Kumar Gala
4c51684918 drivers: i2c: dw: Convert to new DT_<COMPAT>_<INSTANCE> defines
Convert designware i2c driver to use new defines so we can remove the
dts_fixup.h code for it.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2019-02-08 22:50:07 -05:00
Anas Nashif
b8fc4ec058 doc: create an empty Kconfig.modules
This file is now needed by Kconfig and was not created during doc
creation. So touch an empty file to make doc build go through.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2019-02-08 22:47:02 -05:00
Carles Cufi
01e0552f64 doc: west: Document build system integration
Document the build system integration with west and any projects managed
by it.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
Signed-off-by: Torsten Rasmussen <torsten.rasmussen@nordicsemi.no>
2019-02-08 22:47:02 -05:00
Torsten Rasmussen
7e9d1bdda4 CMake/Kconfig: CMake and Kconfig build integration
This commit allows for Zephyr modules to be natively integrated into
the build system with CMakeLists.txt and Kconfig files.

The sourcing of module files are done in following order:
- If <module>/zephyr/module.yml exists, use cmake and kconfig settings
  for sourcing of additional file
- Else if <module>/zephyr/CMakeLists.txt exists, source this file into
  CMake build tree and add <module>/zephyr/Kconfig as osource

If none of the above files are present, the project is considered to
not be a Zephyr module

Signed-off-by: Torsten Rasmussen <torsten.rasmussen@nordicsemi.no>
2019-02-08 22:47:02 -05:00
Francisco Munoz
11e5f7db6c boards : Add supoport for Microchip MEC2016 EVB ASSY 6797
This was tested with a the hello world application. UART 0 was used
as console for displaying "Hello World! mec2016evb_assy6797" to the
a serial terminal.

Signed-off-by: Francisco Munoz <francisco.munoz.ruiz@intel.com>
2019-02-08 21:38:54 -05:00
Francisco Munoz
f416327827 arch: arm: Add Microchip MEC1701 SoC
Initial support for Microchip MEC1701 series is incorporated to the
tree. Additional support for UART is also included. This SOC supports
two operation modes for interrupts (Direct and Aggregated). For this
commit, the interrupts are configured in direct mode.

Signed-off-by: Francisco Munoz <francisco.munoz.ruiz@intel.com>
2019-02-08 21:38:54 -05:00
Francisco Munoz
2ab60eb0ab serial/uart_ns16550: make UART_REG_ADDR_INTERVAL
On behalf of : Timo Teräs <timo.teras@iki.fi>

UART_REG_ADDR_INTERVAL is SOC / chip implementation specific feature,
and its width does not always correspond to current settings for
IOPORT/non IOPORT access method.

Signed-off-by: Francisco Munoz <francisco.munoz.ruiz@intel.com>
2019-02-08 21:38:54 -05:00
Francisco Munoz
d267250f7b ext : hal : mec1701 Add the MEC1701 external header.
Origin: Microchip CPG
URL: https://github.com/MicrochipTech/Peripheral-mec1701
Version: 0.2
Purpose: Official peripheral firmware library for MEC1701
License: Apache
Maintained-by: External

Signed-off-by: Francisco Munoz <francisco.munoz.ruiz@intel.com>
2019-02-08 21:38:54 -05:00
Sebastian Bøe
2a96312749 cmake: Fix dependencies for LD script generation
The dependencies relating to generating LD scripts are declared
incorrectly. This manifests itself as broken incremental builds as
shown in #13001.

This commit aligns the LD script generation with the Zephyr standard
for declaring custom commands.

For instance, custom commands should generate files that are wrapped
by targets. The custom commands should declare the dependencies, not
the targets.

Also, when using custom commands, the OUTPUT signature should be used,
not the TARGET signature, as app_smem was doing.

For details about how Zephyr uses custom commands see
https://samthursfield.wordpress.com/2015/11/21/cmake-dependencies-between-targets-and-files-and-custom-commands/

This fixes #13001.

Signed-off-by: Sebastian Bøe <sebastian.boe@nordicsemi.no>
2019-02-08 16:39:43 -06:00
Sebastian Bøe
b43c6120ab cmake: Allow deps to be added to the preprocessing of LD scripts
To be able to correctly express that preprocessing a file will depend
on targets and files we enhance the LD script preprocessing function
by adding all trailing arguments to the DEPENDS section of the custom
command.

Signed-off-by: Sebastian Bøe <sebastian.boe@nordicsemi.no>
2019-02-08 16:39:43 -06:00
Sebastian Bøe
7a6afcdc04 cmake: Various refactorings and whitespace fixes
This commit applies various refactorings and whitespace fixes in
preparation for the patch that fixes #13001.

It includes changing indentation from tabs to spaces and splitting
tokens across more lines to increase readability and minimize patch
sizes.

Signed-off-by: Sebastian Bøe <sebastian.boe@nordicsemi.no>
2019-02-08 16:39:43 -06:00
David B. Kinder
1cc8bbb4ae doc: fix misspelling in kconfig doc
Fix typos introduced by PR #13186

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2019-02-08 16:33:09 -06:00