Commit graph

102 commits

Author SHA1 Message Date
Adithya Baglody 777407b9ea gcov: Add coverage supported boards.
Not all boards can get the coverage reports. The report generation
needs minimum of 64KB SRAM. This patch added support for mps2_an385,
qemu_cortex_m3, qemu_x86. This is just a subset. Also the previously
supported board native_posix is included in this patch.

If a board has 64KB RAM, it can generate reports by just
adding HAS_COVERAGE_SUPPORT in Kconfig.board.

Signed-off-by: Adithya Baglody <adithya.nagaraj.baglody@intel.com>
2019-01-16 06:12:33 -05:00
Kumar Gala 728ca62d0b boards: arm: Cleanup xtools toolchain support
Add 'xtools' as supported toolchain for new boards and remove duplicate
entry from mps2_an385

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2019-01-13 09:35:59 -05:00
Kumar Gala 67af71e01d boards: arm: Add xtools as a supported toolchain
Update all ARM boards to have xtools as a supported toolchain.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2019-01-09 14:18:58 -05:00
Vincenzo Frascino bd34448a75 dts: arm: Code Cleanup in mps2_an385
This patch cleans up the code in the recently added dts_fixup.h,
restoring the original alignment of the file.

Signed-off-by: Vincenzo Frascino <vincenzo.frascino@linaro.org>
2018-12-14 07:24:48 -06:00
Vincenzo Frascino 48721fb42a dts: arm: Fix Dual Timer IRQ config for mps2_an385
The dts.fixup for mps2_an385 contains a wrong setting for the IRQ fixup
for the Dual Timer IRQ.

This patch fixes the symbol included in the generated header.

Signed-off-by: Vincenzo Frascino <vincenzo.frascino@linaro.org>
2018-12-14 07:24:48 -06:00
Vincenzo Frascino ca502e1a60 dts: arm: Fix Dual Timer base address in mps2_an385
This patch fixes the Dual Timer base address in mps2_an385 device tree.

Signed-off-by: Vincenzo Frascino <vincenzo.frascino@linaro.org>
2018-12-14 07:24:48 -06:00
Jakub Rzeszutko f8178dcb05 shell: remove Console dependencies
Removed Console dependencies from shell uart backend.
Generated define: CONFIG_UART_SHELL_ON_DEV_NAME for each board.

Fixes #10191

Signed-off-by: Jakub Rzeszutko <jakub.rzeszutko@nordicsemi.no>
2018-12-07 12:11:11 +01:00
Patrik Flykt 25e8e4d4e7 boards: Add 'U' to unsigned variable assignments
Add 'U' to a value when assigning it to an unsigned variable.
MISRA-C rule 7.2

Signed-off-by: Patrik Flykt <patrik.flykt@intel.com>
2018-12-04 22:51:56 -05:00
Kumar Gala f210d11970 boards: Remove including soc.h in board.h
We should let drivers or board code include soc.h directly so we can keep
board.h to local info for board specific code.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2018-11-14 06:44:02 -06:00
Ulf Magnusson 4638652214 Kconfig: Use 'default' instead of 'def_bool' in Kconfig.defconfig files
This can help find unused symbols. Those end up without a type if
'default' is used instead of 'def_bool', which generates a warning.

Search for "Kconfig.defconfig" in
https://docs.zephyrproject.org/latest/application/kconfig-tips.html for
a longer explanation.

Keep the 'def_bool' for the following symbols, which seem to be
deliberately defined only in Kconfig.defconfig files:

 - ALTERA_AVALON_I2C
 - ALTERA_AVALON_MSGDMA
 - ALTERA_AVALON_PIO
 - ALTERA_AVALON_QSPI
 - ALTERA_AVALON_SYSID
 - CLOCK_CONTROL_IMX_CCM
 - CPU_EM4_DMIPS
 - CPU_EM4_FPUDA
 - CPU_EM4_FPUS
 - FP_FPU_DA
 - I2C_GECKO

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2018-11-13 16:04:01 -05:00
Ulf Magnusson fc210ab505 Kconfig: Remove unused symbols defined only in Kconfig.defconfig files
Turning 'def_bool' in Kconfig.defconfig files into 'default' revealed
three unused symbols (confirmed with 'git grep'). Remove them.

Search for "Kconfig.defconfig" in
https://docs.zephyrproject.org/latest/application/kconfig-tips.html for
an explanation of how def_bool->default can reveal undefined symbols.

Removed unused symbols:

 - SPI_DW_CLOCK_GATE

 - PINMUX_MPS2

 - BOARD_XTENSA

Also remove an assignment to the promptless symbol ALTERA_AVALON_SYSID,
in tests/boards/altera_max10/sysid/prj.conf. Assignments to promptless
symbols have no effect.

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2018-11-13 16:04:01 -05:00
Andrzej Głąbek 20202902f2 dts_fixups: Use DT_ prefix in all defined labels not related to Kconfig
These changes were obtained by running a script  created by
Ulf Magnusson <Ulf.Magnusson@nordicsemi.no> for the following
specification:

1. Read the contents of all dts_fixup.h files in Zephyr
2. Check the left-hand side of the #define macros (i.e. the X in
   #define X Y)
3. Check if that name is also the name of a Kconfig option
   3.a If it is, then do nothing
   3.b If it is not, then replace CONFIG_ with DT_ or add DT_ if it
       has neither of these two prefixes
4. Replace the use of the changed #define in the code itself
   (.c, .h, .ld)

Additionally, some tweaks had to be added to this script to catch some
of the macros used in the code in a parameterized form, e.g.:
- CONFIG_GPIO_STM32_GPIO##__SUFFIX##_BASE_ADDRESS
- CONFIG_UART_##idx##_TX_PIN
- I2C_SBCON_##_num##_BASE_ADDR
and to prevent adding DT_ prefix to the following symbols:
- FLASH_START
- FLASH_SIZE
- SRAM_START
- SRAM_SIZE
- _ROM_ADDR
- _ROM_SIZE
- _RAM_ADDR
- _RAM_SIZE
which are surprisingly also defined in some dts_fixup.h files.

Finally, some manual corrections had to be done as well:
- name##_IRQ -> DT_##name##_IRQ in uart_stm32.c

Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
2018-11-13 10:44:42 -06:00
Andrzej Głąbek f39ba7230d dts_fixups: Update labels generated from DTS with DT_ prefix
All labels containing "_<8-hex-digits>_" or "16550_<3or6-hex-digits>_"
in their names, assumed to be generated by the extracting script,
are updated with the DT_ prefix, to reflect the recent changes made
to the script.

Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
2018-11-13 10:44:42 -06:00
Anas Nashif 8ee4b0f378 sanitycheck: make mps2_an385 default qemu for ARM
mps2_an385 does support MPU and Userspace.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2018-11-05 11:00:38 -05:00
Sebastian Bøe 8eb734cd82 DT: Rename from dts.fixup to dts_fixup.h
The Zephyr configuration system uses many different files in many
different formats. It makes it a lot easier for users to understand
what these files do if when we use the correct file extensions.

To this end we rename the dts.fixup files to the correct file
extension '.h'.

This is a breaking change for out-of-tree fixup files. Such files will
be detected and given an appropriate error message.

Signed-off-by: Sebastian Bøe <sebastian.boe@nordicsemi.no>
2018-10-08 11:38:56 -04:00
Erwan Gouriou 1ac3517c6a dts: Add missing 'compatible' property in flash base nodes
'compatible' property was missing in flash base nodes for
some .dtsi files. Fix this.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2018-09-21 07:23:49 -07:00
Adithya Baglody d547c9b26c boards: mps2_an385: Enable userspace for MPS2_AN385.
This patch will enable the userspace.

Signed-off-by: Adithya Baglody <adithya.nagaraj.baglody@intel.com>
2018-09-20 20:35:25 -04:00
Kumar Gala def322fe6d dts: Cleanup warnings associated with cpu node
When we fixed the missing reg property in the cpu node, we forgot to
add #address-cells & #size-cells for the node.

This fix the following warnings we get:
	Warning (reg_format): "reg" property in /cpus/cpu@0 has invalid
	length (4 bytes) (#address-cells == 2, #size-cells == 1)

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2018-09-18 16:13:21 -07:00
Kumar Gala 6856ad1423 dts: Cleanup warnings associated with flash and memory nodes
We get several warnings of the form:

	Warning (unit_address_vs_reg): /flash: node has a reg or ranges
	property, but no unit name

or

	Warning (unit_address_vs_reg): /memory: node has a reg or ranges
	property, but no unit name

Fix by adding unit address that is missing to flash & memory nodes.
Additionally the Silabs memory nodes didn't have a compatiable or
device_type, so add those properties as well.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2018-09-18 12:19:05 -07:00
Kumar Gala 716047f3b1 dts: Cleanup warnings associated with unit_address_vs_reg and cpu node
We get several warnings of the form:

	Warning (unit_address_vs_reg): /cpus/cpu@0: node has a
	unit name, but no reg property

Fix by adding reg property to missing cpu nodes.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2018-09-18 12:18:49 -07:00
Carles Cufi 957262e37d build: Replace GCC ARM Embedded with GNU Arm Embedded
The old GCC ARM Embedded website on launchpad
(https://launchpad.net/gcc-arm-embedded) has been superseeded by the new
GNU Arm Embedded one
(https://developer.arm.com/open-source/gnu-toolchain/gnu-rm).

This also means a change of name from "GCC" to "GNU". Reflect this in
the enviroment variables so that the proper term is used henceforth.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2018-08-09 13:57:55 +02:00
Anas Nashif ae5105c08b boards: more boards with xtools support
Add first set of boards which can be built with xtools, this will
include all boards at some point, so we might need a better way to
whitelist toolchains that does not include changing every single board
definition file. For now enabling those needed for testing the new
toolchain.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2018-07-08 15:39:35 -04:00
Alex Tereschenko 3c1a78ea0d cmake: replace PROJECT_SOURCE_DIR with ZEPHYR_BASE
Both variables were used (with the same value) interchangeably
throughout CMake files and per the discussion in GH issue,
ZEPHYR_BASE is preferred.

Also add a comment with explanation of one vs. the other.

Tested by building hello_world for several boards ensuring no errors.

Fixes #7173.

Signed-off-by: Alex Tereschenko <alext.mkrs@gmail.com>
2018-06-18 15:25:55 -04:00
Ulf Magnusson a3128e6a2c boards: defconfig: Consistently quote string defaults
In preparation for introducing a warning.

Unquoted string defaults work through a quirk of Kconfig (undefined
symbols get their name as their string value), but look confusing. It's
done inconsistently now too.

Suggested by Kumar Gala.

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2018-05-26 19:17:48 -04:00
Erwan Gouriou 081c9c3bec scripts: extract_dts_includes: Generate'_0' defines only when needed
Indexed defines were systematically generated even when there
was only one element to generate.
So we ended up generated a lot of _0 defines.
Then we needed to generate aliases to these _0 indexed defines,
in order to get useful defines.
For instance:
 #define GPIO_LEDS_0_GPIO_FLAGS_0	4
 #define GPIO_LEDS_0_GPIO_PIN_0		5
 #define GPIO_LEDS_0_GPIO_FLAGS		GPIO_LEDS_0_GPIO_FLAGS_0
 #define GPIO_LEDS_0_GPIO_PIN		GPIO_LEDS_0_GPIO_PIN_0

This commit allows to generate _0 indexed define only if a
property has more than one elements to define.
Aliases generation to _0 indexed defines are also removed.

Note: IRQ are left untouched since this is frequent to handle
multiple IRQs in a driver

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2018-05-10 10:38:23 -05:00
Kumar Gala 570be1b625 boards: mps2_an385: cleanup pinmux comments
Several of the pinmux comments where wrong.  Update them to match the
docs.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2018-03-13 15:29:21 -05:00
Kumar Gala c9b0208552 arm: mps2_an385: Move dts.fixup to board dir
Move the dts.fixup back to board dir in prep for support mps2_an521.
The memory maps between the two mps2_an385 and mps2_an521 differ greatly
so its easier to just keep the fixup files with the board.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2018-03-13 15:29:21 -05:00
Kumar Gala 97331d1e98 arch: arm: mps2: Remove soc_irq.h
Move IRQ numbers into device tree so we can remove soc_irq.h.  We are
already using IRQ defines generated form the DTS so no point in having
soc_irq.h

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2018-03-10 11:42:25 -06:00
Kumar Gala 40b7be5197 drivers: i2c: Add DTS support to ARM SBCon I2C controller
Added device tree support to the ARM SBCon I2C controller.  We utilize
the compatiable "arm,versatile-i2c" the binding from Linux for the some
peripheral block.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2018-03-10 11:42:25 -06:00
Kumar Gala 83fa6c9554 dts: arm: Refactor SoC dts.fixup into arch/arm/soc
Move common SoC dts.fixup defines into arch/arm/soc/<SOC>/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-26 10:55:36 -06:00
Anas Nashif 812e2eaad2 boards: mps2-an385: this platform is supported by qemu
In Qemu 2.10 we can run this board configuration in Qemu directly. Make
this possible by setting the board configuration to allow emulation.

Until we have the latest QEMU in the SDK this can be used with a recent
QEMU like this:

$ mkdir build; cd build
$ cmake -DQEMU=/usr/bin/qemu-system-arm -DBOARD=mps2_an385 ..
$ make run

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2018-01-18 21:37:48 -05:00
Marti Bolivar f0c95919b0 doc: boards: arm: convert make to cmake
Unify documentation formatting and use zephyr-app-commands where
applicable.

Signed-off-by: Marti Bolivar <marti@opensourcefoundries.com>
2017-11-10 18:35:50 -05:00
Kumar Gala ef912810d3 dts: Move dts files into board dirs
Move the dts files into the board dir so that board ports can be more
standalone.  This will allow us at some point to have board ports
outside of the tree.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2017-11-09 14:23:41 -06:00
Kumar Gala 09c63b373a dts: Move fixup files into board dirs
Move the dts fixup files into the board dir so that board ports can be
more standalone.  This will allow us at some point to have board ports
outside of the tree.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2017-11-09 14:23:41 -06:00
Sebastian Bøe 0829ddfe9a kbuild: Removed KBuild
Signed-off-by: Sebastian Boe <sebastian.boe@nordicsemi.no>
2017-11-08 20:00:22 -05:00
Sebastian Bøe 12f8f76165 Introduce cmake-based rewrite of KBuild
Introducing CMake is an important step in a larger effort to make
Zephyr easy to use for application developers working on different
platforms with different development environment needs.

Simplified, this change retains Kconfig as-is, and replaces all
Makefiles with CMakeLists.txt. The DSL-like Make language that KBuild
offers is replaced by a set of CMake extentions. These extentions have
either provided simple one-to-one translations of KBuild features or
introduced new concepts that replace KBuild concepts.

This is a breaking change for existing test infrastructure and build
scripts that are maintained out-of-tree. But for FW itself, no porting
should be necessary.

For users that just want to continue their work with minimal
disruption the following should suffice:

Install CMake 3.8.2+

Port any out-of-tree Makefiles to CMake.

Learn the absolute minimum about the new command line interface:

$ cd samples/hello_world
$ mkdir build && cd build
$ cmake -DBOARD=nrf52_pca10040 ..

$ cd build
$ make

PR: zephyrproject-rtos#4692
docs: http://docs.zephyrproject.org/getting_started/getting_started.html

Signed-off-by: Sebastian Boe <sebastian.boe@nordicsemi.no>
2017-11-08 20:00:22 -05:00
Kumar Gala 65e72be8f7 devicetree: Generate CONFIG_UART_CONSOLE_ON_DEV_NAME from dt
We can use the chosen property "zephyr,console" to determine what uart
should be used as the console and find its name to generate a define for
CONFIG_UART_CONSOLE_ON_DEV_NAME.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2017-07-11 12:09:10 -05:00
Anas Nashif 458d217398 update: board names
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2017-06-21 20:56:53 -04:00
Anas Nashif 295897c191 boards: add board meta-data
Add board metadata to be consumed by the sanitycheck script to provide
better matching with testcases and to test based on features declated in
the board files.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2017-06-21 20:56:53 -04:00
Kumar Gala 8fa523badb arm: mps2_an385: remove setting of baud rate in defconfig
We now get the baud rate for the serial port from the device tree so we
don't need to be setting it in the defconfig.

The baud rate changed from 38400 to 115200 when we introduced the device
tree for MPS2.  The default baud rate was based on matching mbed, but we
use 115200 to match the standard default we have for most boards now.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2017-05-19 10:06:48 -04:00
Kumar Gala 26811defc7 arm: dts: Cleanup HAS_DTS
Now that all ARM platforms have a device tree we can move selecting of
HAS_DTS up and remove any !HAS_DTS cases, as well as setting in all the
defconfigs.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2017-05-15 13:22:54 -04:00
Vincenzo Frascino 255f19891a dts: mps2_an385: Initial device tree support
This patch adds the intial device tree support to V2M MPS2 AN385
platform.

Signed-off-by: Vincenzo Frascino <vincenzo.frascino@linaro.org>
2017-05-09 11:16:52 -04:00
Jon Medhurst 14ce362972 boards: mps2_an385: Enable I2C devices
The FPGA on the MPS2 board implements 4 SBCon devices for I2C which are
connected to:
- a touchscreen controller
- the audio device (for configuration)
- both shield connectors

Change-Id: I55ca985e18b45d68f5e7421c4768dfc9bf2fcb3f
Signed-off-by: Jon Medhurst <tixy@linaro.org>
2017-05-03 13:51:37 -04:00
Kumar Gala 7352c4681d boards: convert to using newly introduced integer sized types
Convert code to use u{8,16,32,64}_t and s{8,16,32,64}_t instead of C99
integer types.

Jira: ZEP-2051

Change-Id: I27d51c316144251939b20cfa6787ff7ab8035fe6
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2017-04-20 11:56:00 -05:00
Jon Medhurst c27d1c88b4 mps2: Add defines and devices for FPGA system control block
These are fixed I/O registers for getting and setting the states of
LEDs, buttons, SPI chip-selects, and LCD control lines. It also contains
several free-running counters with no specific use.

Change-Id: Ib49306d5501574f7eb354165cdca6f29e3d4dad4
Signed-off-by: Jon Medhurst <tixy@linaro.org>
2017-04-04 17:55:13 -05:00
David B. Kinder e23099bcc4 doc: add cross-references to hello_world sample
Change-Id: I23c4d361251251cce8887dd67be2e548f7365491
Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2017-02-03 22:57:05 +00:00
David B. Kinder 304c24825f doc: use hlist directive for improved output
These two docs have a long skinny list of items that displays
better as a multi-column list (using the hlist directive).

Change-Id: Ia1a1f8555bdefe0c9051944d9946299395258bfc
Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2017-02-02 00:25:35 +00:00
Vincenzo Frascino 72b276a4c9 doc: Update mps2_an385 documentation
This patch updates the mps2_an385 documentation adding the information
of the CMSDK (Cortex-M System Design Kit) GPIOs Pinmuxing.

Change-Id: Icab0d47bf1a58be058f036fb3db346ef6390266a
Signed-off-by: Vincenzo Frascino <vincenzo.frascino@linaro.org>
2017-01-30 11:02:36 -06:00
Vincenzo Frascino 4276d2ec99 boards: arm: mps2: Add pinmuxing
This patch adds pinmuxing configuration the ARM MPS2 AN385 board.

Change-Id: If9825e325e8f3abf568537f3a279b5f0f56bd088
Signed-off-by: Vincenzo Frascino <vincenzo.frascino@linaro.org>
2017-01-30 11:02:36 -06:00
Vincenzo Frascino 6e55fd38de doc: Update mps2_an385 documentation
This patch updates the mps2_an385 documentation adding the information
of the new added CMSDK (Cortex-M System Design Kit) Drivers.

Change-Id: I5615ebec13e8831a0360fc32cfd8be0d3ebc85b5
Signed-off-by: Vincenzo Frascino <vincenzo.frascino@linaro.org>
2017-01-30 11:02:36 -06:00
Vincenzo Frascino 6fe2600fc5 boards: arm: mps2_an385: Enable CMSDK Drivers
This patch enables the CMSDK (Cortex-M System Design Kit) Drivers on
mps2_an385 (Cortex M3).

Change-Id: Iff51141a183ac94ad6b905acf10389ca94a451d3
Signed-off-by: Vincenzo Frascino <vincenzo.frascino@linaro.org>
2017-01-30 11:02:36 -06:00
Jon Medhurst ac4bfe49d1 boards: arm: Add board for MPS2 with AN383
ARM's Cortex-M Prototyping System (MPS2) is a board with an FPGA that
can be programmed with different 'SoCs'. To use these in Zephyr we need
a set of board files for each variant.

This adds a board for a variant which implements a Cortex-M3 CPU; the
naming of this matches that used for the Zephyr SoC (which is itself
based on ARM's documentation nomenclature).

Change-Id: Ie02a67a03016b8aeee31e3694f0edbcc37f9ee64
Signed-off-by: Jon Medhurst <tixy@linaro.org>
Signed-off-by: Vincenzo Frascino <vincenzo.frascino@linaro.org>
2017-01-23 15:15:54 -06:00