Commit graph

87 commits

Author SHA1 Message Date
Michael Hope 8c1f1865af soc: sam0: add support for the BOSSA bootloader
This adds a new config option for SAM0 targets that use the BOSSA
bootloader.  If the CDC ACM driver is also enabled, then the
programmer can automatically reset the board into the bootloader for
programming.

Signed-off-by: Michael Hope <mlhx@google.com>
2020-07-22 13:24:37 +02:00
Stephanos Ioannidis 3322489d22 config: Rename TEXT_SECTION_OFFSET to ROM_START_OFFSET
The `TEXT_SECTION_OFFSET` symbol is used to specify the offset between
the beginning of the ROM area and the address of the first ROM section.

This commit renames `TEXT_SECTION_OFFSET` to `ROM_START_OFFSET` because
the first ROM section is not always the `.text` section.

Signed-off-by: Stephanos Ioannidis <root@stephanos.io>
2020-07-09 14:02:38 -04:00
Andrzej Puzdrowski c7ab1a178c Kconfig: update BOOTLOADER_MCUBOOT help message
Description was updated so reflects fact that this
option activates SW_VECTOR_RELAY_CLIENT feature now.

Signed-off-by: Andrzej Puzdrowski <andrzej.puzdrowski@nordicsemi.no>
2020-07-03 13:34:50 -04:00
Kumar Gala 9ca541a504 linker: Remove deprecated Kconfig options related to linker scripts
Remove Kconfig, linker script, and related bits associated with
CUSTOM_RODATA_LD, CUSTOM_RWDATA_LD, CUSTOM_SECTIONS_LD,
SOC_NOINIT_LD, SOC_RODATA_LD, and SOC_RWDATA_LD options that have been
deprecated since Zephyr 2.2.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2020-06-12 11:14:28 +02:00
Kumar Gala 1737bd082d zephyr: Use deprecated instead of legacy for Kconfig int types
Rename the Kconfig symbol from LEGACY_ZEPHYR_INT_TYPES to
DEPRECATED_ZEPHYR_INT_TYPES.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2020-06-09 06:49:56 -05:00
Kumar Gala e353d123fd zephyr: Make Zephyr int types deprecated by default
As the int types defined in include/zephyr/types.h are typdef's we
utilize a Kconfig option (LEGACY_ZEPHYR_INT_TYPES) to enable/disable
the support for them.  By default to LEGACY_ZEPHYR_INT_TYPES not
being enabled and add an explicit test to ensure the types continue to
function until removed in the future.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2020-06-08 08:23:57 -05:00
Kumar Gala 43cbb59db2 Kconfig: Default to 'n' for LEGACY_DEVICETREE_MACROS
Set LEGACY_DEVICETREE_MACROS to default to no since we are deprecating
the old macro style and all in tree users are now converted.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2020-05-13 21:22:53 +02:00
Rohit Gujarathi 35713f2ef6 cmake: Assembly listing containing all sections
Added support for creating an assembly listing containing all sections
like rodata, data and debug sections, not just those expected to
contain instructions.

Signed-off-by: Rohit Gujarathi <gujju.rohit@gmail.com>
2020-05-08 09:03:18 -04:00
Martí Bolívar 270dfffc8d devicetree: add CONFIG_LEGACY_DEVICETREE_MACROS
This default-y option allows continued use of the legacy devicetree
macros.

There are no functional changes yet, but when this is default n,
old-style DT code won't build. At that point, adding any of these will
be a fix to keep old-style code working:

- "CONFIG_LEGACY_DEVICETREE_MACROS=y" to prj.conf
- "-- -DCONFIG_LEGACY_DEVICETREE_MACROS=y" to the west build command
- "-DCONFIG_LEGACY_DEVICETREE_MACROS=y" to the cmake command

This option can be changed to default n in time for the Zephyr 2.3
release. That will provide users of Zephyr 2.2 with a smooth migration
path to the new devicetree.h API after 2.3 is released, which
nonetheless will alert them immediately that something is wrong due to
build errors.

Unfortunately, __DEPRECATED_MACRO is not sufficient in all cases as a
warning to users. This is because, at least in GCC, macros defined
using __DEPRECATED_MACRO cannot be used in preprocessor lines like
"#if DT_SOME_LEGACY_MACRO".

Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
2020-04-23 11:03:53 -05:00
Carles Cufi d212bc4d60 ext: lib: Move fnmatch to lib/
Since we already have similarly licensed 3-clause BSD files in the tree,
and in particular in our minimal libc, move the fnmatch functionality
from ext/ to lib/.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2020-03-20 22:56:19 -04:00
Piotr Mienkowski 6baff1b3b9 doc: update BOOTLOADER_MCUBOOT description
mcuboot.overlay is not used any more when BOOTLOADER_MCUBOOT Kconfig
option is selected. Update the documentation accordingly.

Signed-off-by: Piotr Mienkowski <piotr.mienkowski@gmail.com>
2020-02-19 07:30:43 -06:00
Ulf Magnusson e63b6525bf kconfig: Clarify Kconfig.defconfig explanation in Kconfig.zephyr
Group the 'source's of Kconfig.defconfig files together to make it
clearer what the comment is talking about. Remove blank lines between
the other 'source's too, splitting the 'source's into two groups.

Also touch up the comment to make it more concrete and shorten it a bit.
Mention that it applies to 'choice's as well.

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2020-02-11 17:40:12 +02:00
Alexey Brodkin 2d79dc3bcd kconfig: Make BUILD_NO_GAP_FILL independent
Even though it looks logical to not expose BUILD_NO_GAP_FILL
when we don't expect to use objcopy for creation of .bin, .hex etc
in reality generation of at least zephyr.hex happens if one wants
to use openocd runner, see CMakeLists.txt:
---------------------------->8----------------------
if(CONFIG_BUILD_OUTPUT_HEX OR BOARD_FLASH_RUNNER STREQUAL openocd)
  set(out_hex_cmd    "")
  set(out_hex_byprod "")
  set(out_hex_sections_remove
    .comment
    COMMON
    .eh_frame
    )
  bintools_objcopy(
    RESULT_CMD_LIST    out_hex_cmd
    RESULT_BYPROD_LIST out_hex_byprod
    STRIP_ALL
    GAP_FILL           ${GAP_FILL}
    TARGET_OUTPUT      "ihex"
    SECTION_REMOVE     ${out_hex_sections_remove}
    FILE_INPUT         ${KERNEL_ELF_NAME}
    FILE_OUTPUT        ${KERNEL_HEX_NAME}
    )
  list(APPEND
    post_build_commands
    ${out_hex_cmd}
    )
  list(APPEND
    post_build_byproducts
    ${KERNEL_HEX_NAME}
    ${out_hex_byprod}
    )
endif()
---------------------------->8----------------------

So if there's a good reason to disable gap filling
(like funny memory map wit huuuuge holes) let's keep that opportunity
instead of relying on sanity of all the other code.

Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com>
2020-02-08 09:59:20 +02:00
Kumar Gala 2630fbaa75 cmake: Introduce optional Kconfig for toolchains
Allow a given toolchain to specify Kconfig options that might be
relevant to a feature available in that toolchain.

For example, the ARM embedded GNU toolchain supports two variants of
newlib and you select the smaller one via a spec file.  We can use a
Kconfig option like HAS_NEWLIB_LIBC_NANO to convey that this feature is
supported by that toolchain.

We look for the toolchain Kconfig in ${TOOLCHAIN_KCONFIG_DIR}/Kconfig,
and default TOOLCHAIN_KCONFIG_DIR to:

${TOOLCHAIN_ROOT}/cmake/toolchain/${ZEPHYR_TOOLCHAIN_VARIANT})

toolchain specific cmake files can override the default if needed.

Additionally tweaked the zephyr/generic.cmake to use
${CMAKE_CURRENT_LIST_DIR} to reduce some duplication.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
Signed-off-by: Sebastian Bøe <sebastian.boe@nordicsemi.no>
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2020-01-29 12:22:31 -06:00
Sebastian Bøe d3a8fd40b9 cmake: Add option for exporting build metadata to Make
Add an opt-in feature that will generate a Makefile with build
variables like CC, and KBUILD_CFLAGS for consumption by third-party
Make-based build systems.

This emulates the 'outputexports' target that KBuild supported and is
supported for the same reasons that KBuild supported it. Easier
integration with third-party build systems.

Signed-off-by: Sebastian Bøe <sebastian.boe@nordicsemi.no>
2020-01-23 15:09:12 -05:00
Anas Nashif 22b95a2047 base: add error checking macros
Define there options for runtime error handling:
- assert on all errors (ASSERT_ON_ERRORS)
- no runtime checks (no asserts, no runtime error handling)
  (NO_RUNTIME_CHECKS)
- full runtime error handling (the default) (RUNTIME_ERROR_CHECKS)

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2020-01-20 17:19:54 -05:00
Erwan Gouriou e3bed1f260 boards: Kconfig: Enable use of shield conditional Kconfig files
To make use of shields Kconfig.defconfig, parse these files
and newly created Kconfig.shield files which will define the
SHIELD_XXX Kconfig symbols that will be used for conditional
configuration.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2020-01-02 17:02:41 -05:00
Carlo Caione d048faacf2 aarch32: Add header shims to support old file locations
Out-of-tree code can still be using the old file locations. Introduce
header shims to include the headers from the new correct location and
print a warning message.

Add also a new Kconfig symbol to suppress such warning.

The shim will go away after two releases, so make sure to adapt your
application for the new locations.

Signed-off-by: Carlo Caione <ccaione@baylibre.com>
2019-12-20 11:40:59 -05:00
Kumar Gala 1342dadc36 include: Remove compat include headers
Remove the compat headers as its been 2 releases since we introduced
them.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2019-12-10 08:39:37 -05:00
Ulf Magnusson fd9981a7c4 kconfig: Factor out HAS_FLASH_LOAD_OFFSET dependency
Use a top-level 'if' instead of three separate 'depends on'. They're
exactly equivalent (top-level 'if's are just a shorthand for adding
'depends on' to each item within the 'if').

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2019-12-09 16:40:24 -05:00
Ulf Magnusson 90b9eb3a9e kconfig: Rename USE_CODE_PARTITION to USE_DT_CODE_PARTITION
USE_CODE_PARTITION is a bit vague as a symbol name ("use code partition
how?"). Rename it to USE_DT_CODE_PARTITION to make it clearer that it's
about devicetree.

This would break any third-party configuration files that set it, but
it'll generate an error since kconfig.py promotes warnings to errors, so
it's probably not a big deal.

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2019-12-09 16:40:24 -05:00
Ulf Magnusson 1f9c5f136d kconfig: Improve USE_CODE_PARTITION prompt and help string
The prompt and help string for USE_CODE_PARTITION were too terse and
didn't make it clear that it's related to devicetree, which confused me.
Spell things out in more detail.

Unless the meaning of a symbol is completely obvious from context, aim
for at least a few sentences of help text. Think about what would be
confusing for someone coming at it without much context.

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2019-12-09 16:40:24 -05:00
Ulf Magnusson 9cdb6f4033 kconfig: Make FLASH_LOAD_OFFSET/SIZE non-configurable when DT is used
Having FLASH_LOAD_OFFSET and FLASH_LOAD_SIZE always configurable froze
their values at 0 when BOOTLOADER_MCUBOOT was enabled in menuconfig,
when instead the values from /chosen/zephyr,code-partition in devicetree
should be used. BOOTLOADER_MCUBOOT selects USE_CODE_PARTITION, which is
a flag to use the devicetree information.

To fix it, only make FLASH_LOAD_OFFSET and FLASH_LOAD_SIZE configurable
when USE_CODE_PARTITION is disabled. It looks like no configuration
files set them at the moment.

See the added documentation in
https://github.com/zephyrproject-rtos/zephyr/pull/20722 for an
explanation of why this happens. This bit novalisek in
https://github.com/zephyrproject-rtos/zephyr/issues/20673.

Fixes: #20673

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2019-12-09 16:40:24 -05:00
Ulf Magnusson bd6e04411e kconfig: Clean up header comments and make them consistent
Use this short header style in all Kconfig files:

    # <description>

    # <copyright>
    # <license>

    ...

Also change all <description>s from

    # Kconfig[.extension] - Foo-related options

to just

    # Foo-related options

It's clear enough that it's about Kconfig.

The <description> cleanup was done with this command, along with some
manual cleanup (big letter at the start, etc.)

    git ls-files '*Kconfig*' | \
        xargs sed -i -E '1 s/#\s*Kconfig[\w.-]*\s*-\s*/# /'

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2019-11-04 17:31:27 -05:00
Ulf Magnusson 975de21858 kconfig: Global whitespace/consistency cleanup
Clean up space errors and use a consistent style throughout the Kconfig
files. This makes reading the Kconfig files more distraction-free, helps
with grepping, and encourages the same style getting copied around
everywhere (meaning another pass hopefully won't be needed).

Go for the most common style:

 - Indent properties with a single tab, including for choices.

   Properties on choices work exactly the same syntactically as
   properties on symbols, so not sure how the no-indentation thing
   happened.

 - Indent help texts with a tab followed by two spaces

 - Put a space between 'config' and the symbol name, not a tab. This
   also helps when grepping for definitions.

 - Do '# A comment' instead of '#A comment'

I tweaked Kconfiglib a bit to find most of the stuff.

Some help texts were reflowed to 79 columns with 'gq' in Vim as well,
though not all, because I was afraid I'd accidentally mess up
formatting.

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2019-11-01 15:53:23 +01:00
Kumar Gala 22e7449b73 kconfig: Introduce typed dt kconfig functions
Replace:
  dt_chosen_reg_addr
  dt_chosen_reg_size
  dt_node_reg_addr
  dt_node_reg_size

with:
  dt_chosen_reg_addr_int
  dt_chosen_reg_size_int
  dt_chosen_reg_addr_hex
  dt_chosen_reg_size_hex
  dt_node_reg_addr_int
  dt_node_reg_size_int
  dt_node_reg_addr_hex
  dt_node_reg_size_hex

So that we get the proper formatted string for the type of symbol.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2019-10-24 08:51:06 -05:00
Kumar Gala 2d7303e13f Revert "kconfig: Fix wrong partition size by changing type of FLASH_LOAD_SIZE"
This reverts commit f065eb4271.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2019-10-24 08:51:06 -05:00
Ulf Magnusson f065eb4271 kconfig: Fix wrong partition size by changing type of FLASH_LOAD_SIZE
FLASH_LOAD_SIZE gets its default from the $(dt_chosen_reg_size)
function, which is defined in scripts/kconfig/kconfigfunctions.py.
$(dt_chosen_reg_size) returns a decimal value rather than a hex value.

Previously, FLASH_LOAD_SIZE was declared as hex, which made Kconfiglib
automatically prepend 0x to its value (the same logic is in the C
Kconfig tools). This gave an incorrect size in .config, e.g.
CONFIG_FLASH_LOAD_SIZE=0x374784 where CONFIG_FLASH_LOAD_SIZE=374784 was
intended.

Fix it by changing the type of FLASH_LOAD_SIZE to int. All other symbols
that use $(dt_node_reg_size) and $(dt_chosen_reg_size) are int too
(FLASH_SIZE and SRAM_SIZE, plus BOOTLOADER_SRAM_SIZE is also int).

This has some subtle breakage potential in that FLASH_LOAD_SIZE has a
prompt (is user-configurable in the menuconfig or by changing .config
files). Nothing seems to directly assign in Zephyr at least.

Fixes: #19877

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2019-10-18 08:05:39 -05:00
Ulf Magnusson cfd3d4b935 kconfig: Remove long-unused LINK_WHOLE_ARCHIVE symbol
Seems to have been unused since commit 06e78de681 ("build: do not use
link-zephyr"), committed in 2015.

Discovered with a script.

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2019-10-18 08:03:48 -05:00
Kumar Gala 8ce0cf0126 kconfig: Convert device tree chosen properties to new kconfigfunctions
Convert how we get the various chosen properties like "zephyr,console"
to use the new kconfig functions like dt_chosen_to_label.

Because of how kconfig parses things we define a set of variables of the
form DT_CHOSEN_Z_<PROP> since comma's are parsed as field seperators in
macros.

This conversion allows us to remove code in gen_defines.py for the
following chosen properties:

zephyr,console
zephyr,shell-uart
zephyr,bt-uart
zephyr,uart-pipe
zephyr,bt-mon-uart
zephyr,uart-mcumgr
zephyr,bt-c2h-uart

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2019-09-13 11:42:34 -05:00
Håkon Øye Amundsen d3aa619f31 kconfig: fix name of cmake function in help text
The function is called zephyr_code_relocate.

Signed-off-by: Håkon Øye Amundsen <haakon.amundsen@nordicsemi.no>
2019-08-15 08:55:45 -04:00
Charles E. Youse f7a0dce636 arch/x86: remove support for CONFIG_REALMODE
We no longer support any platforms that bootstrap from real mode.

Fixes: #17166

Signed-off-by: Charles E. Youse <charles.youse@intel.com>
2019-07-29 21:29:38 -07:00
Andy Ross 50b78f08ea cmake: Remove check_link_map.py
This script is looking for a hyperspecific error (mismatched padding
when linking into two simultaneous output sections) that bit us once,
in an era where the linker scripts were less unified.  We haven't seen
it crop up since, and multiple platforms have changed the way they do
this anyway.

It's needless complexity.  Junk it.

Signed-off-by: Andy Ross <andrew.j.ross@intel.com>
2019-07-14 04:54:29 -07:00
Anas Nashif cdfddecb35 include/: cleanup: add Kconfig for suppressing warnings
Suppress warnings from deprecated header shims. Use when you have an
application that needs to work with older versions of Zephyr where
headers were located in different directories.

The shim will go away after two releases, so make sure to adapt your
application for the new locations.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2019-06-27 22:55:49 -04:00
Anas Nashif f2cb20c772 docs: fix misspelling across the tree
Found a few annoying typos and figured I better run script and
fix anything it can find, here are the results...

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2019-06-19 15:34:13 -05:00
Anas Nashif 8017c59cb0 modules: move module kconfig to main tree
Due to in-tree dependencies on Kconfig options defined in modules we end
up having warnings and errors when those modules are not part of the
manifest.

Users should be able to remove unwanted modules from their downstream
manifest and still build any board configurations.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2019-05-30 17:50:37 -04:00
Anas Nashif 658f6bc71f kconfig: enclose module Kconfigs into a menu
Solve the issue of having all module Kconfig land in the top level
Kconfig menu when viewed in menuconfig.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2019-05-29 07:27:32 -04:00
Øyvind Rønningstad 901c0a1cfd linker: Port usage of custom-sections to use Cmake
Mark custom-sections as deprecated

Signed-off-by: Øyvind Rønningstad <oyvind.ronningstad@nordicsemi.no>
2019-05-20 22:28:28 -04:00
Charles E. Youse 50c71e6043 arch/x86: CONFIG_BOOTLOADER_UNKNOWN renamed to CONFIG_X86_MULTIBOOT
The only use of the BOOTLOADER_UNKNOWN config option is on x86, where
it controls whether a multiboot header is embedded in the output.
This patch renames the option to be more descriptive, and makes it
an x86-specific option, rather than a Zephyr top-level option.

This also enables X86_MULTIBOOT by default, since the header only
occupies 12-16 bytes of memory and is (almost always) harmless.

Signed-off-by: Charles E. Youse <charles.youse@intel.com>
2019-05-08 14:49:19 -04:00
Sebastian Bøe 3a0597f099 cmake: LD: Allow input sections to remain unsorted
We have users that have problems in their linker scripts where the
order of input sections matters.

To allow users to use the latest Zephyr while working on a fix to
their linker scripts we add an option to allow leaving the sections
unsorted.

See discussion here for more details
https://github.com/zephyrproject-rtos/zephyr/pull/14183

Signed-off-by: Sebastian Bøe <sebastian.boe@nordicsemi.no>
2019-04-24 13:58:00 -07:00
Sebastian Bøe 7061c035cd kconfig: Move Kconfig.modules to the root build directory
Currently, the Kconfig.modules file is placed in the build directory
relative to the CMake "project". But technically, the file is not
project-specific, but global, or build-directory specific.

So we move it up one level to the CMAKE_BINARY_DIR instead. Currently,
there is only one project, so this change has no effect, but this
enables us to have multiple projects in the future, which again
enables multi-image builds.

Signed-off-by: Sebastian Bøe <sebastian.boe@nordicsemi.no>
Signed-off-by: Håkon Øye Amundsen <haakon.amundsen@nordicsemi.no>
2019-03-28 09:23:02 -04:00
Andrzej Puzdrowski 2b1227f155 zephyr: fix mcuboot can't link into boot-partition
Objective of the path is to allow to select by the application
to link into the chosen code-partition.
Introduced USE_CODE_PARTITION will be set by bootloader project.

fixes #14566

Signed-off-by: Andrzej Puzdrowski <andrzej.puzdrowski@nordicsemi.no>
2019-03-19 11:12:47 +01:00
Emanuele Di Santo 9acb643d23 kconfig: move Zephyr modules Kconfig entries to the top
Zephyr modules' Kconfig entries appear in a seemingly random spot
in menuconfig. This patch moves those entries at the top of the menu,
to improve their visibility and make their location predictable.

Signed-off-by: Emanuele Di Santo <emdi@nordicsemi.no>
2019-03-15 07:13:46 -05:00
Andy Ross fe04adf99b lib/os: Conditionally eliminate alloca/VLA usage
MISRA rules (see #9892) forbid alloca() and family, even though those
features can be valuable performance and memory size optimizations
useful to Zephyr.

Introduce a MISRA_SANE kconfig, which when true enables a gcc error
condition whenever a variable length array is used.

When enabled, the mempool code will use a theoretical-maximum array
size on the stack instead of one tailored to the current pool
configuration.

The rbtree code will do similarly, but because the theoretical maximum
is quite a bit larger (236 bytes on 32 bit platforms) the array is
placed into struct rbtree instead so it can live in static data (and
also so I don't have to go and retune all the test stack sizes!).
Current code only uses at most two of these (one in the scheduler when
SCHED_SCALABLE is selected, and one for dynamic kernel objects when
USERSPACE and DYNAMIC_OBJECTS are set).

This tunable is false by default, but is selected in a single test (a
subcase of tests/kernel/common) for coverage.  Note that the I2C and
SPI subsystems contain uncorrected VLAs, so a few platforms need to be
blacklisted with a filter.

Signed-off-by: Andy Ross <andrew.j.ross@intel.com>
2019-02-28 10:06:35 -08:00
Ulf Magnusson 7db2e20ba3 kconfig: tests: Fix double 'source' of subsys/testsuite/Kconfig
Both Kconfig.zephyr and subsys/Kconfig 'source's
subsys/testsuite/Kconfig, giving multiple redundant identical
definitions for all the symbols in it.

Remove the 'source' in Kconfig.zephyr.

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2019-02-26 20:12:09 -06:00
Anas Nashif ccad9d0d09 tests: move testsuite and configs into subsys/
Move test related code and the testsuite away from tests/ and make it a
proper subsystem.
The way tests were integrate in the tree was not obvious and actual
tests were intermixed with the testsuite code.

This will allow us to have trees with the testcode and without the
samples by just remove the folders tests/ and samples, needed for
isolating actual code from test/sample code.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2019-02-22 08:58:40 -05:00
Piotr Zięcik 9cc63e07e4 power: Fix naming of Kconfig options controlling deep sleep states
This commit changes the names of SYS_POWER_DEEP_SLEEP* Kconfig
options in order to match SYS_POWER_LOW_POWER_STATE* naming
scheme.

Signed-off-by: Piotr Zięcik <piotr.ziecik@nordicsemi.no>
2019-02-12 07:46:32 -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
Kumar Gala 87915cd36f dts: stop generating CONFIG_FLASH_LOAD_{OFFSET,SIZE}
As a step to completing removing use of Kconfig defines in dts files we
need to change how we configure/set CONFIG_FLASH_LOAD_{OFFSET,SIZE}.

Previously we would set them based on how the chosen property
'zephyr,code-partition' was set to.  If 'zephyr,code-partition' wasn't
set we would default the values to 0.  We had some generic overlay logic
which would define 'zephyr,code-partition' based on
CONFIG_BOOTLOADER_MCUBOOT.

Going forward if the DTS has 'zephyr,code-partition' set we will
generate DT_CODE_PARTITION_OFFSET & DT_CODE_PARTITION_SIZE defines.  We
will leave it to Kconfig to set CONFIG_FLASH_LOAD_OFFSET &
CONFIG_FLASH_LOAD_SIZE.

We introduce a python script that allows Kconfig to extract data from
the DTS and thus we can utilize DT_CODE_PARTITION_OFFSET and
DT_CODE_PARTITION_SIZE values to set defaults for
CONFIG_FLASH_LOAD_OFFSET & CONFIG_FLASH_LOAD_SIZE.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2019-02-01 10:16:06 -06:00
Ole Sæther 985446a704 kconfig: Removed prompt for TEXT_SECTION_OFFSET when MCUboot is used
When this syntax is used for the type definition:

hex "TEXT section offset"

Kconfig expect the user to enter the value for TEXT_SECTION_OFFSET and
the defaut value for BOOTLOADER_MCUBOOT is not used. Changing the syntax
to this:

hex
	prompt "TEXT section offset" if !BOOTLOADER_MCUBOOT

will tell Kconfig that TEXT_SECTION_OFFSET will not be set by the user
when BOOTLOADER_MCUBOOT is set and then Kconfig will use the default
value.

Signed-off-by: Ole Sæther <ole.saether@nordicsemi.no>
2019-01-29 17:50:41 +01:00