Commit graph

201 commits

Author SHA1 Message Date
Kumar Gala 0ff2ae1fe8 dts: Cleanup warnings associated with interrupt controller nodes
We get several warnings of the form:

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

Fix by removing the unit address from the nodes.  Some cases we had a
reg property and a unit address for such interrupt controllers, in those
cases remove both the reg & unit address in the node name.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2018-09-18 10:44:45 -07:00
Kumar Gala 6e240da26f dts: Use new DT_SIZE_{K,M} macros
Now that we have a common DT_SIZE_K macro use it instead of defining
__SIZE_K eveywhere.  We also have DT_SIZE_M, so use that in a few
places as well.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2018-09-15 09:23:07 -05:00
Anas Nashif f183444682 arc: move soc to top-level dir soc/
Move the SoC outside of the architecture tree and put them at the same
level as boards and architectures allowing both SoCs and boards to be
maintained outside the tree.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2018-09-13 00:56:48 -04:00
David B. Kinder 5f4cb3fd69 doc: fix reference to props file
Fix reference to misspelled file name in nsim_em documentation

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2018-09-05 00:41:40 -04:00
Punit Vara c83769f859 boards: quark_se_c1000_ss_devboard: Enable ADC node
Enable ADC node in dts.

Signed-off-by: Punit Vara <punit.vara@intel.com>
2018-08-29 13:46:57 -04:00
Punit Vara c995c4b42b dts: arc: Use dts tree for designware driver
Get required data from dts tree.

Signed-off-by: Punit Vara <punit.vara@intel.com>
2018-08-29 13:46:57 -04:00
Wayne Ren 0be1875e42 boards: cleanup and update the default config of arc boards
apply to snps arc boards

Signed-off-by: Wayne Ren <wei.ren@synopsys.com>
2018-08-24 09:31:24 -07:00
David B. Kinder 7c89b63b7c doc: fix kconfig misspellings
Fix misspellings in Kconfig files missed during normal reviews

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2018-08-08 01:48:24 -05:00
Anas Nashif d44c900143 boards: nsim_em: mark as simulation platform
Mark this board as simulation board to be run with nsimdrv.
See documentation for how to get nsimdrv.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2018-07-19 18:59:07 -04:00
Anas Nashif fd62b7a085 boards: nsim_sem: fix identifier
Fix identifier of board, was duplicating nsim_em.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2018-07-19 18:59:07 -04:00
Anas Nashif 7ce9615a2b nsim: add run target
Support 'make run' with this target rather than using 'flash' which
might be confusing.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2018-07-19 18:59:07 -04:00
Wayne Ren 3bda93a3aa dts: arc: fixes the warning msgs during cmake
fixes the warning msgs during cmake which are
caused by the missing info in dts files

Signed-off-by: Wayne Ren <wei.ren@synopsys.com>
2018-07-19 09:20:38 -05:00
Wayne Ren c056340162 boards: arc: fix the wrong mpu configuration of nsim board
fix the wrong mpu configuration.

verified by tests/kernel/mem_protection/userspace

Signed-off-by: Wayne Ren <wei.ren@synopsys.com>
2018-07-18 07:16:37 -04:00
Wayne Ren b6e41e715c boards: arc: add virtual board based on nsim
two configs are contained in this board

* nsim_em: em with arc MPUv2
* nsim_sem: em with arc SecureShield and MPUv3

Signed-off-by: Wayne Ren <wei.ren@synopsys.com>
2018-07-10 19:05:13 -04:00
Anas Nashif 7c15934b53 toolchains: add xtools support for ARC
Latest crosstools NG supports ARC, so add it here for those who build
their own toolchains using xtools-ng or use the scripts from sdk-ng repo
in the zephyr project.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2018-07-08 15:39:35 -04:00
Ulf Magnusson 02b5f3edc8 drivers: gpio: Fix GPIO_QMSI_{0,1}_NAME Kconfig references
These symbols were removed by commit ed26b95 ("drivers/gpio:
Removing dts generated options in QMSI Kconfig"). The settings should
come from DTS now.

Commit 9611002f7a ("boards/x86: Use right GPIO names for CC2520")
fixed some of the references, but there are still others left. Guess
that the same fix is appropriate in those spots (hardcoded
"GPIO_0"/"GPIO_1" names).

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2018-06-13 13:35:56 -04:00
Anas Nashif f0bafc307b boards: make em_starterkit_em7d default test platform
This is a core platform that needs to be tested by default. Fix the
default tag in the board YAML (it was duplicated in the wrong section).

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2018-06-07 18:01:49 -05:00
Ulf Magnusson 1d1bd60d16 boards: arduino_101: Fix separated-line interrupt Kconfig setting
The SPI_DW_INTERRUPT_SEPARATED_LINES symbol was removed and replaced by
SPI_DW_PORT_{0,1,2,3}_INTERRUPT_SINGLE_LINE in commit 423f0095c7
("drivers/spi: Specify options per-port on DW driver"), but an
assignment to it remains.

Remove the assignment and set SPI_DW_PORT_0_INTERRUPT_SINGLE_LINE to 'n'
instead. The Arduino has a single SPI port.

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2018-05-23 08:50:27 -04:00
Marti Bolivar 59dc82e0d2 boards: adjust openocd runner arg syntax
The current method of setting the openocd runner arguments works for
direct invocation from the command line, but the values that are
written to the CMake cache are not properly separated and are
difficult to parse, due to the fact that in several cases, option
values contain spaces.

Adjust these runner arguments so that the options and their values are
separate list items. This makes it possible to parse them accurately
from the CMake cache.

No functional changes.

Signed-off-by: Marti Bolivar <marti@opensourcefoundries.com>
2018-05-19 07:01:39 +03:00
Wayne Ren b8196c8906 boards: em_starterkit: add pmod mux init
* add pmod mux init to config the pmode interfaces
  to the specific functions

* without pmod mux init, all pmod interfaces will be
GPIO, no interfaces for spi/i2c0/i2c1/uart0

Signed-off-by: Wayne Ren <wei.ren@synopsys.com>
2018-05-15 09:48:11 +02:00
Wayne Ren 532e4d22ee dts: optimize and bug fixes the dts of em_starterkit
* add gpio, i2c, spi definitions
* optimize and bug fix the dts.fixup
* optimize and bug fix the em_starterkit related definitions
  in dts folder

Signed-off-by: Wayne Ren <wei.ren@synopsys.com>
2018-05-15 09:48:11 +02:00
Wayne Ren 9c7d92a694 dts: fixes in the dts of em_starterkit em9d configuration
* em9d is configured to use ccm, and no sram
* choose dccm as virtual sram to generate the correct definitions
of CONFIG_SRAM_XXX which are used in many places, e.g. lib-hooks.c.

Signed-off-by: Wayne Ren <wei.ren@synopsys.com>
2018-05-15 09:48:11 +02:00
Wayne Ren 15f2035cab doc: update the doc of em_starterkit
update some content of doc of em_starterkit

Signed-off-by: Wayne Ren <wei.ren@synopsys.com>
2018-05-15 09:48:11 +02:00
Wayne Ren 99e1f849bf dts: optimize the dts for em_starterkit
eliminate unnecessary duplication

Signed-off-by: Wayne Ren <wei.ren@synopsys.com>
2018-05-15 09:48:11 +02:00
Wayne Ren 6307b8b97d arch: arc: refactor the soc part of em_starterkit
The original em7d, em9d and em11d are different configurations of
em_starterkit. They have the same peripherals, e.g. uart, spi, gpio
, ddr. The differences of them are in arc core configurations, interrupt
number assignment.

So em7d, em9d and em11d can be viewed in the same SoC family or SoC
series.

Referring other arch's implementation, this commit merges em7d, em9d
and em11d into the same SoC, named snps_emsk. This will eliminate
unnecessary duplication and make it easier for future maintainment.

Signed-off-by: Wayne Ren <wei.ren@synopsys.com>
2018-05-15 09:48:11 +02:00
Kumar Gala c542c0e33e boards: dts: Cleanup aliases
Underscore ('_') isn't a valid char for alias names based on the device
tree spec.  Newer dtc compilers flag this as a warning so lets clean it
up.  Replaced '_' with '-' to keep things simple.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2018-04-12 04:03:46 -05:00
Anas Nashif 993c350b92 cleanup: replace old jira numbers with GH issues
Replace all references to old JIRA issues (ZEP) with the corrosponding
Github issue ID.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2018-03-26 13:13:04 -04:00
Kumar Gala 8a824356e0 arch: arc: em{7,9,11}d: Add initial DTS UART support
Add support for getting some basic params from the DTS for the UART.
The ns16550 driver still needs to be updated to get IRQ and address
info from DTS.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2018-03-23 10:13:53 +01:00
Kumar Gala 311e6b9e3e arch: arc: Use DTS for all ARC SoCs
Now that all ARC SoCs we can remove code associated with !HAS_DTS and
select HAS_DTS at the architecture level.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2018-03-23 10:13:53 +01:00
Kumar Gala 60ec8be309 arch: em{7,9,11}d: Add dts support
Add initial device tree support for the em{7,9,11}d SoC and associated
em_starterkit boards.  The device tree at this point specifies cpu core,
memory, interrupt controller, uart's and i2c controllers.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2018-03-23 10:13:53 +01:00
Tomasz Bursztyka 8f891ba702 drivers/i2c: Use standard bitrate settings for DW driver
Applying the change to relevant arch/boards, either in their Kconfig or
the dts specific files.

Taking the opportunity in dw driver to rename the variable the same way
as they are everywhere else in the code (s/dev/dw and s/port/dev) in
init function.

Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
2018-03-23 10:42:33 +08:00
Tomasz Bursztyka 9ddd8d1e4d arch/x86: Enable i2c through DTS for quark_se SS
And adapt relevant boards accordingly.

Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
2018-03-23 10:42:33 +08:00
Wayne Ren 848d15e8e5 boards: em_starterkit: fix the board default config
Change TICKS_PER_SEC from 1000 to 100
* em_starterkit is a FPGA board with cores running at max 30 Mhz.
  1000 ticks per second is a little heavy for it.
* the tests/kernel/common requires 200 ticks per second at most,
  or the testcase will stall.

disable the generation of bin file.
* there is no flash in em_starterkit
* there is huge gap between ICCM and DCCM which will cause the bin
  file too large, alomst 2GB

Signed-off-by: Wayne Ren <wei.ren@synopsys.com>
2018-03-08 11:01:11 +01:00
Wayne Ren ef174f0140 boards: em_starterkit: fix the mpu regions definition
_image_rom_end to _image_rom_size

Signed-off-by: Wayne Ren <wei.ren@synopsys.com>
2018-03-08 11:01:11 +01:00
Kumar Gala 6becb64dfc dts: quark_se_c1000_ss: Refactor dts.fixup into arch/arc/soc
Move common SoC dts.fixup defines into
arch/arc/soc/quark_se_c1000_ss/dts.fixup so we remove duplication in the
boards and only have board specific defines in
boards/arc/<FOO>/dts.fixup.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2018-02-26 10:55:36 -06:00
Wayne Ren e91733c78b arch: arc: bug fixes and add user space support in secure mode
* bug fixes
* add user space support in secure mode

Signed-off-by: Wayne Ren <wei.ren@synopsys.com>
2018-02-16 12:20:16 +01:00
Wayne Ren f81dee0b2b arch: arc: add user space support for arc
* add the implementation of syscall
  * based on 'trap_s' intruction, id = 3
* add the privilege stack
  * the privilege stack is allocted with thread stack
  * for the kernel thread, the privilege stack is also a
    part of thread stack, the start of stack can be configured
    as stack guard
  * for the user thread, no stack guard, when the user stack is
    overflow, it will fall into kernel memory area which requires
    kernel privilege, privilege violation will be raised
* modify the linker template and add MPU_ADDR_ALIGN
* add user space corresponding codes in mpu
* the user sp aux reg will be part of thread context
* When user thread is interruptted for the 1st time, the context is
  saved in user stack (U bit of IRQ_CTLR is set to 1). When nest
  interrupt comes, the context is saved in thread's privilege stack
* the arc_mpu_regions.c is moved to board folder, as it's board
  specific
* the above codes have been tested through tests/kernel/mem_protect/
  userspace for MPU version 2

Signed-off-by: Wayne Ren <wei.ren@synopsys.com>
2018-02-16 12:20:16 +01:00
Anas Nashif 8949233390 kconfig: fix more help spacing issues
Fix Kconfig help sections and add spacing to be consistent across all
Kconfig file. In a previous run we missed a few.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2018-02-15 23:20:55 -05:00
Anas Nashif 44cab35004 boards: arc: default board with MPU enabled
em_starterkit_em7d has MPU enabled, so make it default for better test
coverage.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2018-01-30 21:05:24 -05:00
Anas Nashif 4e2fcccc4c boards: make em_starterkit the defaule for ARC
When testing, make em_starterkit the default for sanitycheck to test new
features such as MPU.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2018-01-30 17:18:01 -05:00
Wayne Ren 1ca60ffdb2 board: em_starter_kit: add default config for em7d in version 22
* arc MPUv2 is only available in em7d em starterkit version 22.
  Add a default config for this to simply the config.

* The change of board version in menuconfig, e.g, version 23 to
  v22, will not cause other options depending on board version
  change automatically, users still need to change these options
  manually. This is another reason to need a new default config file.

Signed-off-by: Wayne Ren <wei.ren@synopsys.com>
2018-01-18 11:50:59 -08:00
Wayne Ren 9a40bf6b7e arch: arc: Add the intial support of memory domain
Refering the ARM's implementation, the initial support of memory
domain in ARC is added:
* changes in MPU drivers
* changes in Kconfig
* codes to configure memory domain during thread swap
* changes in linker script template
* memory domain related macro definitions

the commited codes are simply tested through
samples/mpu/mem_domain_apis_test.

Signed-off-by: Wayne Ren <wei.ren@synopsys.com>
2018-01-18 11:50:59 -08:00
Carles Cufi 7d764b35f3 cmake: Use path-corrected version of ZEPHYR_BASE
Instead of accessing the environment variable ZEPHYR_BASE every time we
require accessing the source code root, use an intermediate variable
that has OS path separators correctly set to '/' to avoid issues on
Windows.

Note: This removes the ZEPHYR_SOURCE_DIR CMake variable. External
applications using that will need to change to use the new ZEPHYR_BASE
variable.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2018-01-11 14:59:03 -05:00
Anas Nashif be61a66e14 boards: remove panther board
This board was never released and is similar in many ways to the
quark_se_c1000_devboard.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2017-12-15 18:09:34 -05:00
Savinay Dharmappa 21c2cf78f2 driver: serial: Get interrupt number from dts
Signed-off-by: Savinay Dharmappa <savinay.dharmappa@intel.com>
2017-12-15 11:22:55 -06:00
Marti Bolivar 7a3462de7a scripts: runner: use arguments, not environment vars
The various runners (flash/debug scripts) use environment variables to
take arguments. This is legacy behavior which is not desirable.

Use command line arguments instead.

Note: this leaves more general environment variables with publicly
      documented behavior in place for now, for compatibility, e.g.:

      ZEPHYR_FLASH_OVER_DFU, OPENSDA_FW, ESP_IDF_PATH, PYOCD_DAPARG

For example, when using dfu-util to flash arduino_101, instead of
setting DFUUTIL_PID, DFUUTIL_ALT, and DFUUTIL_IMG environment
variables, have the script invocation look like this:

  python3 .../zephyr_flash_debug.py dfu-util flash \
          [common arguments omitted] \
          --pid=8087:0aba --alt=x86_app \
          --img=.../build/zephyr/zephyr.bin

Make similar changes for other runners (openocd, etc.) and
targets (debug, debugserver).

To implement this in the scripts:

  - have the individual scripts/support/runner/some-runner.py files
    register their own command line arguments

  - teach them to construct instances from arguments, not the
    environment

  - have zephyr_flash_debug.py request runners to register command
    line argument parsers, and handle arguments

In the build system:

  - add a new board_runner_args() extension function that board.cmake
    files can use to add to the zephyr_flash_debug.py command line

  - adjust cmake/flash/CMakeLists.txt to invoke with arguments

  - add new helper include files for each runner (like
    boards/common/dfu-util.board.cmake, etc.), which add default
    options as needed and then add on overrides from
    board_runner_args() calls

  - update board.cmake files to use the new includes and extension

This implied some tweaking when using openocd to make the CMake string
escaping and unescaping work properly.

Signed-off-by: Marti Bolivar <marti@opensourcefoundries.com>
2017-12-15 09:57:30 -05:00
Marti Bolivar e33ec242fd scripts: refactor flash/debug scripts to remove "shell"
The Python-based runners have replaced the old shell scripts. Refactor
the build system accordingly:

- FLASH_SCRIPT is now BOARD_FLASH_RUNNER
- DEBUG_SCRIPT is now BOARD_DEBUG_RUNNER

The values, rather than being the names of files, are now the names of
runners in scripts/support/runner. They are still short, descriptive
names like "openocd", "jlink", "em-starterkit", etc.

Adjust the zephyr_flash_debug.py call and runner internals
accordingly. Have each runner class report a name and the commands it
can handle. This lets us move some boilerplate from each do_run()
method into the common run() routine, and enables further improvements
in future patches.

The handles_command() method is temporary, and will be replaced by a
more general mechanism for describing runner capabilities in a
subsequent patch. The initial use case for extending this is to add
device tree awareness to the runners.

To try to avoid user confusion, abort the configuration if an
xxx_SCRIPT is defined.

Signed-off-by: Marti Bolivar <marti@opensourcefoundries.com>
2017-12-15 09:57:30 -05:00
Wayne Ren 9e6078690a board: em_starterkit: Update the defconfig to em_starter_kit version 2.3
As em7d is supported, all configurations of em_starter_kit version 2.3
are supported. Update all the defconfig to version 2.3.

Signed-off-by: Wayne Ren <wei.ren@synopsys.com>
2017-12-13 12:05:33 -05:00
Wayne Ren 0892cd7f46 board: arc: em_starterkit: Add em7d support of em_starterkit 2.3
* em7d of em_starterkit 2.3 supports secure mode. add the support
  in kconfig and build system.

* change the default configuration of em_starterkit 2.3 to em7d

Signed-off-by: Wayne Ren <wei.ren@synopsys.com>
2017-12-13 12:05:33 -05:00
Anas Nashif f0e562f614 boards: fix board yaml syntax
Use better indentation for yaml syntax.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2017-12-11 14:47:08 -05:00
Savinay Dharmappa 9e300b77e4 dts: arc: Get flash address from dts file
As flash address changes between different boards of same Soc,
it is derived from .dts file instead of hard coding in .dtsi.

Signed-off-by: Savinay Dharmappa <savinay.dharmappa@intel.com>
2017-11-21 07:05:07 -05:00
Savinay Dharmappa 987329f82c dts: arduino_101_sss: Add dts support
Signed-off-by: Savinay Dharmappa <savinay.dharmappa@intel.com>
2017-11-21 07:05:07 -05:00
Savinay Dharmappa f61d4266e4 dts: quark_se_c1000_ss_devboard: Add dts support
Signed-off-by: Savinay Dharmappa <savinay.dharmappa@intel.com>
2017-11-15 07:21:10 -06:00
Anas Nashif 4b54885f9f doc: em_starterkit: adapt with new configurations
We now have 3 configurations, so reflect this in the documentation.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2017-11-13 10:55:26 -05:00
Anas Nashif c833b90ec4 boards: em_starterkit: add EM11D and EM7D configurations
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2017-11-13 10:55:26 -05:00
Marti Bolivar aced11fb52 doc: boards: arc: convert make to cmake
Use zephyr-app-commands appropriately.

Signed-off-by: Marti Bolivar <marti@opensourcefoundries.com>
2017-11-10 18:35:50 -05:00
Sebastian Bøe f0346bfac0 flash: Change type of FLASH_SCRIPT_ENV_VARS
The old way of constructing FLASH_SCRIPT_ENV_VARS was corrupting the
values that were passed to the flasher. This new method is the
standard way of creating a dictionary/hashmap in CMake and does not
suffer from the same problem.

This fixes
https://github.com/zephyrproject-rtos/zephyr/issues/4844#event-1334599401

Signed-off-by: Sebastian Boe <sebastian.boe@nordicsemi.no>
2017-11-10 07:54:54 -05: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
Anas Nashif 95a8b20c9f boards: add supported features
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2017-10-17 08:55:38 -04:00
David B. Kinder 81f7c82625 doc: fix misspellings and missing EOF newlines
Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2017-08-16 17:38:41 -05:00
Wayne Ren 12cc6598b0 arch: arc: Add mpu support
* add arc mpu driver
* modify the corresponding kconfig and kbuild
* currently only em_starterkit 2.2's em7d configuration
  has mpu feature (mpu version 2)
* as the minimum region size of arc mpu version 2 is 2048 bytes and
  region size should be power of 2, the stack size of threads
  (including main thread and idle thread) should be at least
  2048 bytes and power of 2
* for mpu stack guard feature, a stack guard region of 2048 bytes
  is generated. This brings more memory footprint
* For arc mpu version 3, the minimum region size is 32 bytes.
* the codes are tested by the mpu_stack_guard_test and stackprot

Signed-off-by: Wayne Ren <wei.ren@synopsys.com>
2017-08-16 16:09:45 -04:00
Huaqi Fang 6dc13675c3 doc: em_starterkit: Fix doc issue reported by shippable
See
https://app.shippable.com/github/zephyrproject-rtos/zephyr/runs/3090/3/tests
for details

Signed-off-by: Huaqi Fang <huaqi.fang@synopsys.com>
2017-08-09 23:21:13 -04:00
Huaqi Fang d791dd2900 doc: em_starterkit: updated according to pull request #1017
Make some edits according to the suggestions provided by #1017

Signed-off-by: Huaqi Fang <huaqi.fang@synopsys.com>
2017-08-09 23:21:13 -04:00
Huaqi Fang 145d827272 doc: em_starterkit: add EM Starter Kit 2.2 support
Update EM Starter Kit documentation to cover support for
EM Starter Kit 2.2.

Signed-off-by: Huaqi Fang <huaqi.fang@synopsys.com>
2017-08-09 23:21:13 -04:00
Huaqi Fang 725c525a13 boards: em_starterkit: Move peripheral configs from soc to board level
Signed-off-by: Huaqi Fang <huaqi.fang@synopsys.com>
2017-08-09 23:21:13 -04:00
Huaqi Fang 55fc1f53fe boards: em_starterkit: Add board firmware version config option
Signed-off-by: Huaqi Fang <huaqi.fang@synopsys.com>
2017-08-09 23:21:13 -04:00
David B. Kinder abcb8d446e doc: fix sidebar nav issues with board docs
Sidebar navigation for supported boards is wonky: opens to show
all boards (making for lots of scrolling to see the sidebar) and
sidebar items aren't always clickable (as explained in the JIRA
issue).

Fix is to not use multiple toctree directives in boards.rst and
create intermediate architecture-specific supported board docs.

JIRA: INF-132

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2017-06-27 19:21:29 -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
David B. Kinder d1bdb3e092 doc: fix board/sample broken links
Some files have moved from their original location, or are no longer
available.  For the mbedtls samples, tweak the link to point to a page
where links for current and previous downloads can be found.

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2017-06-13 20:49:13 -04:00
David B. Kinder 342bdda760 doc: spelling fixes in samples/ and boards/
regular spelling check on .rst files

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2017-06-12 18:28:08 -04:00
Huaqi Fang e32c1e3aea doc: boards: Update reference links in em starterkit documentation
+ Fixed some unused links in the em starterkit doc
+ Provided a link for em starterkit user guide

Signed-off-by: Huaqi Fang <huaqi.fang@synopsys.com>
2017-05-19 15:58:41 +02:00
Huaqi Fang 70a7c89021 doc: Update documentation for EM Starter Kit
* Change emsk to EM Starter Kit
* Fix some typos
* Add more statement for steps of using EM Starter Kit

Signed-off-by: Huaqi Fang <huaqi.fang@synopsys.com>
2017-05-19 15:58:41 +02:00
Huaqi Fang ed7d122982 doc: Update emsk board debug and flash section
Due to support updated from 2.2 to 2.3, a debug script is provided
for emsk, so developer can directly debug the zephyr application
using commands such as follows.
+ make BOARD=em_starterkit debug

Signed-off-by: Huaqi Fang <huaqi.fang@synopsys.com>
2017-05-19 15:58:41 +02:00
Huaqi Fang 37df6e8b27 boards: Make em9d to the default core configuration for emsk
Signed-off-by: Huaqi Fang <huaqi.fang@synopsys.com>
2017-05-19 15:58:41 +02:00
Huaqi Fang 9bc69a46fa boards: Update arc em_starterkit support from 2.2 to 2.3
Here are the main changes:
* board: Update EMSK onboard resources such as Button, Switch and LEDs
  + update soc.h for em7d, em9d, em11d
  + update board.h for em_starterkit board
* arc: Add floating point support and code density support
  + add kconfig configuration
  + add compiler options
  + add register definitions, marcos, assembly codes
  + fixes in existing codes and configurations.
* arc: Update detailed board configurations for cores of emsk 2.3
* script: Provide arc_debugger.sh for debugging em_starterkit board
  + make BOARD=em_starterkit debug
    This will start openocd server for emsk, and arc gdb will connect
    to this debug server, user can run `continue` command if user just
    want to run the application, or other commands if debugging needed.
  + make BOARD=em_starterkit debugserver
    This will start an openocd debugger server for emsk, and user can
    connect to this debugserver using arc gdb and do what they want to.
  + make BOARD=em_starterkit flash
    This will download the zephyr application elf file to emsk,
    and run it.

Signed-off-by: Huaqi Fang <huaqi.fang@synopsys.com>
2017-05-19 15:58:41 +02:00
David B. Kinder 2f41cb8329 doc: misspelling and UTF-8 fixes
More general spelling fixes, and cleaning up stray UTF-8 characters
such as curly-quotes, em- and en-dashes.  Use replacement strings
for |reg| and |trade|.

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2017-05-09 20:15:49 -04:00
David B. Kinder 0d88984b76 doc: fix broken link in em_starterkit board doc
Change-Id: I49e4607d1b0112e031f97b6cb4a2112cbd1fc0c2
Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2017-04-28 00:44:10 +00:00
Piotr Mienkowski ce6ad70c06 scripts: openocd.sh: align usage of OPENOCD_*_CMD variables
OPENOCD_PRE_CMD, OPENOCD_POST_CMD variables require adding
'-c' in front of an actual OpenOCD command. This is in contrary
to other OPENOCD_*_CMD varialbles which specify OpenOCD commands
directly. This patch aligns usage of various OPENOCD_*_CMD variables.
It is no longer required to add '-c' in front of OPENOCD_PRE_CMD,
OPENOCD_POST_CMD variables.

Change-Id: I276fab00b099694c83c3bf74aa5dd59c8d6a308b
Signed-off-by: Piotr Mienkowski <piotr.mienkowski@gmail.com>
2017-04-01 12:21:36 +00:00
Patrice Buriez 1f429cd4a2 boards: arduino_101: support 'make flash' over DFU
Let 'make flash' invoke the dfuutil.sh support script, and
export the relevant DFUUTIL_* environment variables, for all
3 cores of the Arduino 101 board: x86, ARC and BLE.

This is backward compatible with the current usage of OpenOCD
over JTAG, since this is only enabled when the environment
variable ZEPHYR_FLASH_OVER_DFU is set to y.

Change-Id: Ic5528cb87a180378d7120d150c27d1e24c9ebe75
Signed-off-by: Patrice Buriez <patrice.buriez@intel.com>
2017-03-14 23:39:38 +00:00
Juan Manuel Cruz 0212457c48 flash: Fixes wrong SPI device for flash memory in arduino 101 sss
The flash memory in arduino 101 pĺatform is connected to the
SPI MST 0 device and the CS is connected to the GPIO 0.

The arduino 101 sensor sub-system core maps the SPI MST 0 device
to the "SPI_2" name and the SPI SS 0 device to the "SPI_0" name.
In the same manner the GPIO 0 is mapped to the "GPIO_2" name and
the GPIO SS 0 is mapped to the "GPIO_0" name.

This commit fixes the SPI device name and the GPIO name used by
the W25QXXDV flash memory.

Jira: ZEP-1672

Change-Id: Ifdd5b664498d0eaa6ad073853b811951fe19ab09
Signed-off-by: Juan Manuel Cruz <juan.m.cruz.alcaraz@intel.com>
2017-02-28 12:51:42 +00:00
Anas Nashif df16cb92d4 arduino_101: bmi160: use new device name
Use new device name for SPI device

Jira: ZEP-1704
Change-Id: Iec39468bbef54423af2b3a681dd4ae1eee866d1e
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2017-02-10 16:02:22 +00:00
Anas Nashif 416757aeaf boards: add sensor subsystem for panther
Change-Id: Ibcd94006b4cea15ea3595a272f9d140326d6bff8
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2017-02-09 11:10:45 -05:00
Baohong Liu 6b5af856d3 boards: arduino_101_sss: use new gpio device name
Use new gpio device name for bmi160 device.

Change-Id: I0154173aa13f8e578b81469ee161d9aa9b378a65
Signed-off-by: Baohong Liu <baohong.liu@intel.com>
2017-02-04 19:21:08 +00:00
Anas Nashif 2ab4fa2d4e Revert "[REVERTME]boards: omit frame pointer for ARC boards"
This reverts commit 813d550361.

This change requires Zephyr SDK 0.9.

Change-Id: Ic296cee1cd472b99cad4f9140d608640eb9ed66a
Jira: ZEP-1403
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2017-02-03 04:15:53 +00:00
Anas Nashif 9fede72910 docs: add Arduino 101 board documentation
Change-Id: I5f0cab8ece3544d14cf328de918f8d076328b859
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2017-01-24 17:58:58 +00:00
Anas Nashif 78adda30c9 boards: arduino 101: set user LED values correctly
Change-Id: Ie6b2c4c4c0ac6af5bc5a7d628599313ab971f56b
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2017-01-23 17:32:53 +00:00
David B. Kinder ac74d8b652 license: Replace Apache boilerplate with SPDX tag
Replace the existing Apache 2.0 boilerplate header with an SPDX tag
throughout the zephyr code tree. This patch was generated via a
script run over the master branch.

Also updated doc/porting/application.rst that had a dependency on
line numbers in a literal include.

Manually updated subsys/logging/sys_log.c that had a malformed
header in the original file.  Also cleanup several cases that already
had a SPDX tag and we either got a duplicate or missed updating.

Jira: ZEP-1457

Change-Id: I6131a1d4ee0e58f5b938300c2d2fc77d2e69572c
Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2017-01-19 03:50:58 +00:00
Anas Nashif a6aa596770 boards: add em_starterkit board documentation
Change-Id: I703c31d82cc009b271f6c0907ab17a7d085765d8
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2017-01-16 18:13:03 -05:00
Kumar Gala eeda48b552 board: quark_se_c1000_ss_devboard: remove duplicate CONFIG_UART_CONSOLE
Fixes the following warning:

warning: override: reassigning to symbol UART_CONSOLE

Change-Id: I09805bdfa31146faf276ca4ec06487a5d71cdff5
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2017-01-11 19:40:02 +00:00
Anas Nashif 6d9ed994aa build: use target 'debugserver' for Qemu debugging
Use the existing debugserver target also for Qemu debugging. Qemu
should be maintained as one of many emulation/simulations platforms and
emulation should be abstracted in the Makefiles and not tied to Qemu.

qemugdb will still work, it is however being deprecated.

Change-Id: I0cd10fb66debb939b8f7f1304bf2ef4605da6a1d
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2017-01-10 20:20:46 +00:00
Anas Nashif f6e039062a kernel: remove dependency on CONFIG_NANO_TIMERS/TIMEOUTS
Remove legacy option and use SYS_CLOCK_EXISTS where appropriate.

Change-Id: I3d524ea2776e638683f0196c0cc342359d5d810f
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2017-01-08 18:09:52 +00:00
Baohong Liu e1153004f9 drivers: spi_shim: grant arc the access to spi on I/O fabric
Enable arc to access the spi controller on I/O fabric.

There are two spi controllers on quark se SoC. One is attached
to the I/O fabric and the other one is in the sensor system.
X86 cpu is only able to access the spi controller on the I/O
fabric and the access is supported by existing code. HW allows
arc to access both controllers. But, the existing code only
gives arc access to the controller in the sensor sub-system.
Let's grant arc the access to the controller on I/O fabric as
well by the following changes.

1. Add spi_qmsi.c into arc compilation.
2. Use the already defined macros to choose interrupt numbers
   and do interrupt unmasking automatically based on the
   compilation targets.
3. Add new symbols in Kconfig including driver names for both
   controllers

Jira: ZEP-1190

Change-Id: I40a5d423d4b7986a897834d1a3831938005eda6f
Signed-off-by: Baohong Liu <baohong.liu@intel.com>
2016-12-22 01:22:26 +00:00
Chuck Jordan 5fbbe44883 arc: em_starterkit default changed to EM7D
ZEP-1317 records a problem were em_starterkit appears to boot up
EM7d, sometimes, due to a misread of the dip-switches.
This could be a mechanical issue. I am seeing it on my board too,
and I often have to struggle with the dip-switch to get it to boot
EM9D. For automated-testing, perhaps it is better if the default is
EM7D, since this is the all-switches-up and contact in the switch
isn't needed. Meanwhile, I'll work with our board team to try to get
to the bottom of this.

ZEP-1317

Change-Id: I41095c1d8b07ce156cc3856a50196c064af2ee18
Signed-off-by: Chuck Jordan <cjordan@synopsys.com>
2016-12-21 12:56:23 +00:00
Anas Nashif bd90bb7105 boards: define onboard LED on quark se c1000 devboard
Change-Id: I215a4988b4ab8c99279202b6821f6685fa23e84f
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-12-16 16:36:53 -05:00
Chuck Jordan 314d94e7f8 arc: 1msec tick gives more stable scheduling
I notice that many of the other boards here use 1msec for the tick.
I notice also that when switching to unified kernel, scheduling based
on time has a lot more jitter with a 5msec tick.

I think a better default is 1000 ticks per second for em_starterkit.

Change-Id: Icc93345762dbea7d71ca9f4735bcf73f75cde273
Signed-off-by: Chuck Jordan <cjordan@synopsys.com>
2016-12-03 13:51:29 +00:00
Anas Nashif 813d550361 [REVERTME]boards: omit frame pointer for ARC boards
The current ARC GCC compiler used in Zephyr SDK v0.8.2 generates
incorrect code when using the "-fno-omit-frame-pointer" option. This bug
should have been fixed in the 2016.03 release of the compiler.

Jira: ZEP-1243, ZEP-1403

Change-Id: I0901f55973c1ea37491b07bf625d0d1918803f3e
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-12-02 00:14:25 +00:00
Iván Briano 7403a6348c quark_se_c1000_ss_devboard: Define the user buttons
With the driver for AON GPIO available to the ARC side, the user
buttons in the board are usable by both cores.

Change-Id: Ib8e67fba1513caec2e89c31c16f7ed0458c4ed76
Signed-off-by: Iván Briano <ivan.briano@intel.com>
2016-11-02 22:24:59 +00:00
Anas Nashif 513c1c91fc boards: define LED pin on boards with LED
Those defined will be used in sample applications that deal with
on-board LEDs.

Change-Id: Ia447adfd33547e01206a9fd7ceeae420ba806f31
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-10-27 20:56:08 +00:00
Chuck Jordan 669d581e0a arc: Let CONFIG_SYS_CLOCK_HW_CYCLES_PER_SEC be set by SOC
The value for CONFIG_SYS_CLOCK_HW_CYCLES_PER_SEC needs to be set
in the SOC, since each SOC will have a different frequency
on the EM Starterkit. The EM7D, for example, has a 30Mhz CPU clock.
It was already being defined in the SOC, but the board setting
would override the SOC.

Change-Id: I4daf3b94f15bad99c0f3c8674a15ad225aa3d274
Signed-off-by: Chuck Jordan <cjordan@synopsys.com>
2016-10-25 12:16:59 +00:00
Kumar Gala 8d35760fec board: organize boards based on architecture
Introduce an architecture sorting of boards.  This is to allow for
easier maintenance going forward as the number of boards grows.  It
will be easier for any scripts to know the board/arch mapping without
having to maintain an explicit list of what boards are associated with
which arch.  We can also do things like have architecture maintainers
cover reviews and branches for arch/${ARCH} and boards/${ARCH} going
forward.

Change-Id: I02e0a30292b31fad58fb5dfab2682ad1c5a7d5a7
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2016-10-24 19:59:42 +00:00