Commit graph

249 commits

Author SHA1 Message Date
Daniel Leung 1d55411a96 boards/intel_s1000_crb: fix Python string format
Fix the support script to actually use Python string formatting,
instead of C-style printf().

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2019-02-14 19:51:45 -05:00
Sathish Kuttan 2603bd81e8 boards: intel_s1000_crb: print short filename
Print just the basename of the Input and Output filenames
when creating the board specific image for Intel S1000 CRB

Signed-off-by: Sathish Kuttan <sathish.k.kuttan@intel.com>
2019-02-11 07:55:24 -05:00
Anas Nashif 762f4f26ad boards: qemu: add image to qemu boards
Add Qemu logo to qemu boards and expand intro.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2019-02-11 07:45:21 -05:00
Anas Nashif acaae579cc doc: boards: make board images consistent with board name
Having the image use the same name will help us script listing the
boards.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2019-02-10 17:48:08 -05:00
Anas Nashif 0e4ff809d7 doc: boards: move all board docs to be index.rst
Be consistent in how board docs are named and move all to index.rst.
This will make the URL to the board documentation predictable and easier
to remember.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2019-02-09 17:22:08 -06:00
Anas Nashif 28b2f32967 boards: fix intro text for many boards
The phrase "Zephyr applications use the ..." in many boards and
inconsistently. This is just to say what is the board identify is.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2019-02-09 17:22:08 -06:00
Peter A. Bigot 2856d1e997 dts: intel_s1000_crb: put back block sizes
Somehow these were getting generated as `FLASH_foo_BLOCK_SIZE` even
though there's no specification for them in the original yaml.  Put them
back until we can figure out what's going on.

Signed-off-by: Peter A. Bigot <pab@pabigot.com>
2019-02-03 10:42:37 -05:00
Kumar Gala 31503a868b arch: xtensa: dts: Move HAS_DTS to arch level
Now that all supported xtensa boards use DTS we can move the Kconfig
setting to the arch level.  Remove HAS_DTS from board Kconfig files.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2019-02-01 12:45:29 -06:00
Savinay Dharmappa 40e0f18e21 dts: qemu_xtensa/xt-sim: Enable device tree support
patch enables dts support for boards qemu_xtensa and xt-sim

Signed-off-by: Savinay Dharmappa <savinay.dharmappa@intel.com>
2019-02-01 07:49:28 -06:00
Peter A. Bigot ad812614b8 dts: intel_s1000_crb: switch flash to jedec spi-nor
Change compatible, move the JEDEC ID from Kconfig to DTS, convert DTS
size from bytes to bits, remove unreferenced DTS properties.  Remove DTS
fixups.

Signed-off-by: Peter A. Bigot <pab@pabigot.com>
2019-02-01 04:21:40 -06:00
Rajavardhan Gundi c8233c8830 intel_s1000_crb: CMakeLists: Define building of custom image
This patchset introduces support for building a board specific custom
image for intel_s1000_crb. This pads the output binary (zephyr.bin)
with some additional data as required by the s1000 BootROM.

Signed-off-by: Rajavardhan Gundi <rajavardhan.gundi@intel.com>
2019-01-30 21:30:49 -05:00
Kumar Gala 5c640cd0b5 audio: tlv320dac310x: Convert to new DT_<COMPAT>_<INSTANCE> defines
Convert tlv320dac310x 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-01-29 19:24:23 -06:00
Savinay Dharmappa 3bec750268 dts: xtensa: esp32: Add device tree support.
add device tree support for esp32

Signed-off-by: Savinay Dharmappa <savinay.dharmappa@intel.com>
2019-01-29 09:47:17 -06:00
Kumar Gala 94e02794f3 dts: intel_s1000: Fix dtc warnings
Fix the following dtc warnings on S1000:

	Warning (simple_bus_reg): /soc/pinmux@81C30: simple-bus unit
	address format error, expected "81c30"

	Warning (alias_paths): /aliases: aliases property name must
	include only lowercase and '-'

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2019-01-28 10:42:20 -06:00
Marti Bolivar 0aa87e15bb drivers: interrupt_controller: multi-level improvements
Some extensions to the multi-level interrupt controller are required
to support SoCs with more than four level 2 interrupt "aggregators".

Extend existing support to allow at most 8 level 2 or level 3
aggregators. Use Kconfig macro templates to cut down on boilerplate.
Try to clarify some aspects of the Kconfig help while we're at it, and
change the type of options which count things or are table offsets
from "hex" to "int", so that the generated .config is easier to read.

Finally, make some improvements to gen_isr_tables.py while we are
here. In particular, move some assignments around to cut down on
duplicated work, don't check for symbols we know must exist, and
improve the debug logging output's readability.

Signed-off-by: Marti Bolivar <marti@foundries.io>
2019-01-25 11:59:46 -05:00
Rajavardhan Gundi f5b60eeca8 Kconfig: spi_nor: Remove Erase configuration from Kconfig
Configuration of Erase command is specified in DTS. Hence
the corresponding changes in Kconfig are removed.

Signed-off-by: Rajavardhan Gundi <rajavardhan.gundi@intel.com>
2019-01-16 21:22:56 -05:00
Rajavardhan Gundi 74895bc099 dts: spi_nor: Rename DT_SPI_NOR_SPI_SLAVE to DT_SPI_NOR_SPI_SLAVE_ID
The "_ID" suffix for DT_SPI_NOR_SPI_SLAVE better represents what it
is used for.

Signed-off-by: Rajavardhan Gundi <rajavardhan.gundi@intel.com>
2019-01-16 21:22:56 -05:00
Rajavardhan Gundi 7d428bb0a8 flash: spi_nor: Remove Kconfig parameter for SPI_NOR_SECTORS
Number of sectors is now calculated from the flash density
i.e. (Flash size)/(sector size).

Signed-off-by: Rajavardhan Gundi <rajavardhan.gundi@intel.com>
2019-01-16 21:22:56 -05:00
Rajavardhan Gundi e584b05215 dts: intel_s1000: Exclude sram space dedicated for mcubootloader
The starting 192kB SRAM is reserved for the mcubootloader. Exclude
this region while building an application to be loaded by mcubootloader.

Signed-off-by: Rajavardhan Gundi <rajavardhan.gundi@intel.com>
2019-01-16 21:22:56 -05:00
Rajavardhan Gundi b5dd8ac37c Kconfig: intel_s1000: Move FIFO_DEPTH to soc Kconfig
FIFO_DEPTH should be in the SoC's Kconfig as this is a
configuration of SPI master controller in SoC.

Signed-off-by: Rajavardhan Gundi <rajavardhan.gundi@intel.com>
2019-01-16 21:22:56 -05:00
Rajavardhan Gundi 82b0296625 dts: intel_s1000_crb: Enable flash page layout support
This patchset introduces partitioning of flash in terms of blocks
(flash page layout) for s1000. This partitioning is currently to
be used for mcubootloader.

Signed-off-by: Rajavardhan Gundi <rajavardhan.gundi@intel.com>
2019-01-16 21:22:56 -05:00
Rajavardhan Gundi f885fd15bf DTS: flash: spi_nor: use DT_ for freq and other parameters
Use DT_ instead of CONFIG_ for spi freq, spi bus name, flash device
name and flash base address.

Signed-off-by: Rajavardhan Gundi <rajavardhan.gundi@intel.com>
2019-01-16 21:22:56 -05:00
Peter A. Bigot e0e9beee04 boards: arm: particle: refactor for commonalities
Provide a dtsi file that sets up common capabilities for all
Feather-based Particle Mesh devices.  Provide additional dtsi files for
some obvious peripheral options.

Remove the xtensa esp32 image: it didn't build, and there's no
indication of how the ESP32 firmware can be updated on the Argon board.
Use particle_argon as the nRF52840 side of the board.

Add Particle Boron support.

Note that dtsi files must be replicated in each board directory until
tooling supports DTS includes from a shared area.

Signed-off-by: Peter A. Bigot <pab@pabigot.com>
2019-01-12 09:10:43 -05:00
Matthias Boesl a600b138c4 boards: particle: add board support for particle argon
initial support for particle argon nrf52 and esp32

Signed-off-by: Matthias Boesl <matthias.boesl@gmail.com>
2019-01-12 09:10:43 -05:00
Sathish Kuttan 8f2e2c0088 boards: intel_s1000_crb: codec reset GPIO in DTS
Add the codec reset GPIO to intel_s1000_crb's DTS
Update the DTS fixup for intel_s1000_crb accordingly

Signed-off-by: Sathish Kuttan <sathish.k.kuttan@intel.com>
2019-01-09 12:52:52 -06:00
Anas Nashif fb4b33d598 boards: qemu_xtensa: support xtools
This board can now be built with xtools.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2019-01-04 14:32:30 -05:00
Savinay Dharmappa c99cb9d201 boards: xtensa: intel_s1000_crb: set USB_DFU_MAX_XFER_SIZE to 4096
patch set the config USB_DFU_MAX_XFER_SIZE to 4096. This will
reduce the time required for flashing.

Signed-off-by: Savinay Dharmappa <savinay.dharmappa@intel.com>
2018-12-30 16:24:33 -05:00
Anas Nashif f582e18271 doc: intel_s1000_crb: add picture and link
Add a picture of the kit and a link with more information about the kit.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2018-12-10 17:11:44 -05: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
Rajavardhan Gundi 022990f73d xtensa: Implement CONFIG_TEXT_SECTION_OFFSET
CONFIG_TEXT_SECTION_OFFSET allows the entire image to be moved
in memory to allow space for some type of header. The mcubootloader
can boot only such images which reserve some space for the header.

Signed-off-by: Rajavardhan Gundi <rajavardhan.gundi@intel.com>
2018-12-05 15:48:49 +01:00
Rajavardhan Gundi 7765c1adaf drivers: flash: spi_nor: Remove unused block_size parameter
Only page and sector size is used by the driver.

Signed-off-by: Rajavardhan Gundi <rajavardhan.gundi@intel.com>
2018-12-02 09:27:16 -05:00
Sathish Kuttan 4a2ffea65c boards: intel_s1000: add pinmux in default config
Added pinmux setting in default config of Intel S1000 CRB

Signed-off-by: Sathish Kuttan <sathish.k.kuttan@intel.com>
2018-11-29 14:23:24 -08:00
Sathish Kuttan a4991e2418 boards: intel_s1000: pinmux settings for CRB
Add I/O muliplexer settings for a typical Intel S1000 CRB usage

Signed-off-by: Sathish Kuttan <sathish.k.kuttan@intel.com>
2018-11-29 14:23:24 -08:00
Sathish Kuttan 23f11933b9 dts: intel_s1000: enable DTS for GPIO
Added GPIO to SoC device tree
Updated SoC DTS fixup
Removed Kconfig variables now replaced by DT

Signed-off-by: Sathish Kuttan <sathish.k.kuttan@intel.com>
2018-11-26 06:56:48 -08:00
Anas Nashif 14ba292870 xtensa: fix dts_fixup.h with new DT_ prefix
This fixes majority of drivers, however we still see build failures with
the interrupt handler.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2018-11-14 12:59:12 -05:00
Anas Nashif 9c14767475 boards: xtensa: remove stray CONFIG_BOARD_XTENSA
BOARD_XTENSA was removed for Kconfig but was left in _defconfig, so
remove it.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2018-11-14 08:56:16 -05:00
Kumar Gala 758d5b14a9 boards: Remove board.h from boards that don't need it
These boards don't need board.h to work so remove it.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2018-11-14 06:44:02 -06:00
Savinay Dharmappa bc4d0faae6 board: xtensa: intel_s1000_crb: Add macronix flash support
patch enables necessary configs to add macronix flash
support for intel_s1000_crb board.

Signed-off-by: Savinay Dharmappa <savinay.dharmappa@intel.com>
2018-11-13 18:49:03 -05:00
Savinay Dharmappa cf58f83dd6 boards: xtensa: intel_s1000_crb: Enable SPI Master driver
patch enables SPI Master driver on intel_s1000_crb

Signed-off-by: Savinay Dharmappa <savinay.dharmappa@intel.com>
2018-11-13 18:49:03 -05: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
Anas Nashif c79dea567a intel_s1000: do not enable options in _defconfig
Application should be responsible for enabling various drivers and
features, we should not enable everything by default.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2018-11-12 13:50:21 -05:00
Anas Nashif ea50052e2b s1000: remove IPM config from board defconfig
This option is not related to the board.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2018-11-12 13:50:21 -05:00
Sathish Kuttan fe6bddf7d3 kconfig: intel_s1000: Add neural_net Kconfig
Added Kconfig files for Intel neural network accelerator
(GNA) driver

Signed-off-by: Sathish Kuttan <sathish.k.kuttan@intel.com>
2018-11-08 17:08:19 -05:00
Sathish Kuttan c91faf9008 drivers: dmic: Intel PDM digital mic driver
Added an implementation of driver for Intel PDM digital microphone
controller .

Signed-off-by: Sathish Kuttan <sathish.k.kuttan@intel.com>
2018-11-08 00:40:28 -05:00
Daniel Leung c229126f55 xtensa: intel_s1000: turn on XTENSA_ASM2
This adds the necessary bits to support ASM2 with XCC
for Intel S1000 SoC. With ASM2 enabled, xcc is now
required to build for Intel S1000 SoC.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2018-10-19 17:52:45 -04:00
Anas Nashif 98da95571a intel_1000_crb: fix path to xt-ocd
Capitilised Tensilica is not what we have in the documentation. should
be /opt/tensilica.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2018-10-11 10:49:56 -04:00
Anas Nashif 1e788a5142 boards: intel_s1000_crb: polish docs
Few structure changes and use CRB in the name.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2018-10-11 10:49:56 -04: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
Maureen Helm 8d89815084 boards: Remove redundant "select HAS_DTS_I2C"
The i2c drivers now consistently select HAS_DTS_I2C, so we no longer
need to select it at the board level.

Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
2018-09-27 05:54:54 +05:30
Anas Nashif cea0b3a9c2 xtensa: 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
Anas Nashif 52f82fa2cb doc: esp32: update flashing instructions
Details about using west for flashing instead of relying on environment
variables.

Fix #9389.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2018-09-06 08:23:27 -04:00
Sathish Kuttan 3c2a56bd8a boards: intel_s1000: audio codec in device tree
Add TLV320DAC to the device tree for Intel S1000 CRB
Add a DTS fixup for Intel S1000 CRB

Signed-off-by: Sathish Kuttan <sathish.k.kuttan@intel.com>
2018-08-19 11:04:32 -07:00
Sathish Kuttan 73c1093229 drivers: audio: Add audio support in Kconfig
Added an entry in drivers/Kconfig for audio
Added an entry in drivers/audio/Kconfig for audio codec
Added an Kconfig file in drivers/audio/ for TLV320DAC
Enabled audio coded in Intel S1000 CRB defconfig

Signed-off-by: Sathish Kuttan <sathish.k.kuttan@intel.com>
2018-08-19 11:04:32 -07:00
David B. Kinder 6750b8d2e8 doc: fix misspellings in docs
Occasional scan for misspellings missed during normal doc reviews.

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2018-08-08 01:49:14 -05:00
Gautier Seidel 4a8393dd66 esp32: add abitily to flash bootloader
'make flash' also flashes the bootloader

Signed-off-by: Gautier Seidel <gautier.seidel@tado.com>
2018-07-02 08:44:49 -04:00
Gautier Seidel 52ed379912 esp32: add ESP-IDF bootloader option
add ESP-IDF bootloader support

Signed-off-by: Gautier Seidel <gautier.seidel@tado.com>
2018-07-02 08:44:49 -04:00
Sathish Kuttan c738834854 doc: intel_s1000: Procedure to obtain toolchain
Added procedure to obtain the Cadence toolchain
Cleaned up the documentation a bit

Signed-off-by: Sathish Kuttan <sathish.k.kuttan@intel.com>
2018-06-20 16:00:23 -04:00
Sathish Kuttan 8792c5c936 boards: intel_s1000: Config for USB PHY 2.0
Added config USB_DW_USB_2_0 for 2.0 support in device controller/PHY

Signed-off-by: Sathish Kuttan <sathish.k.kuttan@intel.com>
2018-06-19 20:16:18 -04:00
Gautier Seidel 77643677a1 esp32: update to ESP-IDF v3.0-dev-2648-gb2ff235b
Recent ESP-IDF provides OS-agnostic wifi binary, needed by #3723

Closes #8240

Signed-off-by: Gautier Seidel <gautier.seidel@tado.com>
2018-06-13 18:53:43 -04:00
Marti Bolivar cddd9e796e boards: intel_s1000: move runner config out of boards/common
The file boards/common/intel_s1000_crb.board.cmake is not common at
all; it is specific to this board. Move its contents into the board's
board.cmake.

Signed-off-by: Marti Bolivar <marti@opensourcefoundries.com>
2018-06-01 10:34:52 -04:00
David B. Kinder d07d5e8700 doc: fix broken table display
Needed a blank like before the table

Fixes: #8070

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2018-06-01 08:42:05 -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
Sebastian Bøe cde6bef778 kconfig: Drop support for CONFIG_TOOLCHAIN_VARIANT
The Kconfig option TOOLCHAIN_VARIANT (not to be confused with
ZEPHYR_TOOLCHAIN_VARIANT) is a legacy configuration option that has
very few use-cases and can easily be dropped.

It's functionality is easily covered by CONFIG_X86_IAMCU and
ZEPHYR_TOOLCHAIN_VARIANT.

This commit removes all references of it from Zephyr.

Signed-off-by: Sebastian Bøe <sebastian.boe@nordicsemi.no>
2018-05-22 11:15:36 -04:00
Savinay Dharmappa 2ebb6a1fee dts: intel_s1000: use dts to set i2c0 priority.
patch removes Kconfig used i2c0 priority, instead use the
macro generated from dts.

Signed-off-by: Savinay Dharmappa <savinay.dharmappa@intel.com>
2018-05-22 09:30:14 -04:00
Sathish Kuttan cdd108f66c boards: intel_s1000_crb: Assign Intel VID and PID for S1000 CRB
Added following configs
+ CONFIG_USB_DEVICE_VID
+ CONFIG_USB_DEVICE_PID
+ CONFIG_USB_DEVICE_MANUFACTURER
+ CONFIG_USB_DEVICE_PRODUCT
to boards/xtensa/intel_s1000_crb/intel_s1000_crb_defconfig

Signed-off-by: Sathish Kuttan <sathish.k.kuttan@intel.com>
2018-05-03 10:04:41 -04:00
Savinay Dharmappa 9ee4929d56 dts: i2c: Add dts support for i2c
Change-Id: I9104f5230a4efbf1b6979e146e7ea73a76891947
Signed-off-by: Savinay Dharmappa <savinay.dharmappa@intel.com>
2018-05-01 16:46:41 -04:00
Savinay Dharmappa 97f721d928 dts: xtensa: Add device tree support for xtensa
Change-Id: I309bc50c6b575caa84fbc7ab98cc9890771b4274
Signed-off-by: Savinay Dharmappa <savinay.dharmappa@intel.com>
2018-05-01 16:46:41 -04:00
Savinay Dharmappa e57df9a3ed tests: boards: intel_s1000_crb: select application based on config
Add support to enable test application selectively based
on defconfig

Change-Id: I8111750ff099edd95ffa22c6e312999c801678ea
Signed-off-by: Savinay Dharmappa <savinay.dharmappa@intel.com>
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2018-05-01 16:46:41 -04:00
Rajavardhan Gundi 699759a0d6 doc: brief description on intel_s1000 usage
A brief description about intel_s1000 and ways to connect,
flash, debug etc.

Change-Id: I459c64d8d9574bc3511da7f983d68e044cacc1d0
Signed-off-by: Rajavardhan Gundi <rajavardhan.gundi@intel.com>
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2018-05-01 16:46:41 -04:00
Savinay Dharmappa 5060f4bd14 driver: usb: enable usb2.0 on intel_s1000
Change-Id: I59091c465e84f1d6ba64433b7320182d83ff9589
Signed-off-by: Savinay Dharmappa <savinay.dharmappa@intel.com>
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2018-05-01 16:46:41 -04:00
Rajavardhan Gundi 46d6ba4674 boards: intel_s1000: enable I2S
Enable the CAVS I2S on intel_s1000. Also, introduce a test to
validate I2S in ping-pong and normal modes.

Change-Id: Iea78e22cedc7724c1c2e821c68d7030cc0a65047
Signed-off-by: Rajavardhan Gundi <rajavardhan.gundi@intel.com>
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2018-05-01 16:46:41 -04:00
Rajavardhan Gundi cea1c75e2b boards: intel_s1000_crb: enable DMA
Enable the CAVS DMA on intel_s1000. Also, introduce a test to
validate the DMA.

Change-Id: I2ff233c45cfd8aea55e254d905350a666aa649a0
Signed-off-by: Rajavardhan Gundi <rajavardhan.gundi@intel.com>
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2018-05-01 16:46:41 -04:00
Rajavardhan Gundi b3153d2405 intel_s1000: scripts: debug, debugserver and flash scripts
This patchset creates Debug, Debugserver and Flash scripts
ensuring support in the ZephyrBinaryRunner mode.

Change-Id: Ib4f7820b1c6a045bd67cf4a031be99cf61e65eca
Signed-off-by: Rajavardhan Gundi <rajavardhan.gundi@intel.com>
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2018-05-01 16:46:41 -04:00
Rajavardhan Gundi dadf9e7a81 xtensa: intel_s1000: implement interrupt mechanism
intel_s1000 has multiple levels of interrupts consisting of core, CAVS
Logic and designware interrupt controller. This patchset modifies
the regular gen_isr mechanism to support these multiple levels.

Change-Id: I0450666d4e601dfbc8cadc9c9d8100afb61a214c
Signed-off-by: Rajavardhan Gundi <rajavardhan.gundi@intel.com>
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2018-05-01 16:46:41 -04:00
Rajavardhan Gundi 9cc381c07a intel_s1000: i2c: enable I2C for intel_s1000
intel_s1000 makes use of DesignWare IP for I2C.

Change-Id: Ie091318c5959b95e1febeb5cefa440f35a6d144b
Signed-off-by: Rajavardhan Gundi <rajavardhan.gundi@intel.com>
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2018-05-01 16:46:41 -04:00
Rajavardhan Gundi 63d50e158e intel_s1000: gpio: enable GPIO handling
Enable GPIO handling for intel_s1000. It uses a DesignWare IP.

Change-Id: I522534935e4ef3a56d93aca669f6de961d927481
Signed-off-by: Rajavardhan Gundi <rajavardhan.gundi@intel.com>
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2018-05-01 16:46:41 -04:00
Rajavardhan Gundi 47ff96593f intel_s1000: uart: configure UART for intel_s1000
intel_s1000 uses DesignWare IP for UART. National Semiconductor
16550 (UART) component specification is followed in this IP.

Change-Id: Ied7df1dc178d55b6dbe71d729d6383ba07274ea4
Signed-off-by: Rajavardhan Gundi <rajavardhan.gundi@intel.com>
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2018-05-01 16:46:41 -04:00
Rajavardhan Gundi 02736e5935 intel_s1000: add intel_s1000_crb board
intel_s1000_crb board makes use of the intel_s1000 SoC. It has
a built-in ROM which gets executed upon applying power. It then
executes the secondary bootloader followed by the FW (like zephyr).

Change-Id: If334c359b4372a56997c3b2e1eb9250e80847f07
Signed-off-by: Rajavardhan Gundi <rajavardhan.gundi@intel.com>
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2018-05-01 16:46:41 -04:00
Rajavardhan Gundi 0090fd4d15 intel_s1000: create xt-sim_intel_s1000_defconfig
Create xt-sim_intel_s1000_defconfig to build intel_s1000 SoC
for simulator.

Change-Id: I938bc397ed636b333a14a715a03653de7f3e9351
Signed-off-by: Rajavardhan Gundi <rajavardhan.gundi@intel.com>
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2018-05-01 16:46:41 -04:00
Anas Nashif 9e9784fc1d qemu_xtensa: ignore net and bluetooth tests
Do not run any networking/bluetooth tests here. Not supported on this
architecture yet.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2018-04-09 22:55:20 -04:00
Anas Nashif 7ee8bb9677 build: deprecate ZEPHYR_GCC_VARIANT
We want to support other toolchain not based on GCC, so the variable is
confusing, use ZEPHYR_TOOLCHAIN_VARIANT instead.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2018-02-13 07:44:45 -08:00
Anas Nashif 8acdbd796e sanitycheck: support new simulation keyword
Some boards are supported natively by qemu. This option will allow us to
run tests using those platforms directly without having to go via a
dedicated qemu board definition.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2018-01-18 21:37:48 -05:00
Carles Cufi 72046a8abc doc: getting_started: Support multi-OS instructions
In order to be able to document the build on Windows and UNIX
systems, slight variations are required on the app commands
that are used throughout the documentation system.

This includes getting rid of the prompt symbol and providing commands
for both UNIX and Windows operating systems.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2018-01-18 16:53:31 -05: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 f006ea3b58 boards: add supported features
Update board definitions with supported feature. This is temporary
until we have full coverage for device drivers in DTS, then we can use
DTS instead.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2017-12-28 20:24:29 -05: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
Anas Nashif 429c2a4d9d kconfig: fix help syntax and add spaces
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2017-12-13 17:43:28 -06:00
David B. Kinder cbf3e7b287 doc: fix broken footnote reference in esp32 doc
Footnote reference in a code block is ignored.  This text shouldn't
really be in a code block anyway, so just make it a paragraph with a
trailing footnote reference.

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2017-12-05 12:47:22 -05:00
Anas Nashif 1f1143ac87 build: use kconfig to select generated artifacts
Not all boards require the various binary formats zephyr generates. So
be selective based on the arch, SoC or board and only geenrate the
binaries actually needed.

Fixes #5009

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2017-11-23 07:29:13 -05:00
Marti Bolivar b4842d5339 doc: boards: xtensa: 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 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
Leandro Pereira da9b0ddf5b drivers: Rename random to entropy
This should clear up some of the confusion with random number
generators and drivers that obtain entropy from the hardware.  Also,
many hardware number generators have limited bandwidth, so it's natural
for their output to be only used for seeding a random number generator.

Signed-off-by: Leandro Pereira <leandro.pereira@intel.com>
2017-11-01 08:26:29 -04:00
Andy Ross 03a62726cd esp32: More JTAG docs
Clean up & rework JTAG documentation for ESP-32 boards to provide full
commands and clarify gotchas.

Signed-off-by: Andy Ross <andrew.j.ross@intel.com>
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2017-10-16 11:37:01 -04:00
Leandro Pereira e1effa0e73 drivers: esp32: I2C driver implementation
Supports both master and slave mode, standard and fast modes,
configurable timeouts, and a few other tunable settings.

Signed-off-by: Leandro Pereira <leandro.pereira@intel.com>
2017-10-09 20:53:22 -04:00
Leandro Pereira 357d6004be boards: esp32: Add note about fetching an older version of ESP-IDF
ESP-IDF is in constant development and it's likely that files Zephyr
depends on will be moved, removed, or renamed.  Make a note that an
older version of ESP-IDF should be used instead.

Closes #1538.

Signed-off-by: Leandro Pereira <leandro.pereira@intel.com>
2017-10-09 18:50:24 -04:00
Anas Nashif 66f1f89da9 qemu: cleanup qemu configurations
Move all QEMU related defines to the boards and cleanup xtensa platforms
which were marked to be QEMU capable by mistake.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2017-09-23 16:51:20 -07:00
Andrew Boie 8deb09676d qemu_xtensa: enable stack sentinel
xtensa uses more stack than other arches, enable the sentinel since we
don't currently have HW-assisted stack checking on this arch.

Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2017-09-12 22:31:18 -04:00
Anas Nashif d4a0e88e37 boards: qemu_xtensa: add CONFIG_SIMULATOR_XTENS=y to defconfig
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2017-09-11 16:29:55 -04:00
Anas Nashif 0a38ce0395 boards: xt-sim: make board depend on SIMULATOR_XTENSA
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2017-09-11 16:29:55 -04:00
Anas Nashif 4857d03482 boards: esp32: make board depend on SOC
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2017-09-11 16:29:55 -04:00
David B. Kinder 2341cc1ce3 doc: fix misspellings in board docs
Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2017-08-16 13:46:19 -04:00
Anas Nashif 39cc489e01 board: xt-sim: add as a default test platform
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2017-08-16 13:05:54 -04:00
Anas Nashif 593f6d4a1b boards: qemu_xtensa: this is not supported by xcc
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2017-08-16 13:05:54 -04:00
Anas Nashif 3b6e9092b3 boards: xt-sim: add definition for supported configurations
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2017-08-16 13:05:54 -04:00
Anas Nashif 98f0e836b2 boards: esp32: add board definition file
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2017-08-14 19:14:59 -04:00
Andy Ross 0fd9afd974 esp32: Fix board cycle frequency
The ESP-WROOM-32 board exits the bootloader at 40 MHz, not 160 MHz as
suggested by documentation.  The CCOUNT special register works as
advertised, but not at the expected rate.  This was verified by
timestamping (at the host) the output of a dependency-free loop that
looks like:

	int key = irq_lock();
	while(1) {
		u32_t i, count;
		volatile int dummy;

		for(i = 0; i < 5000000; i++) {
			dummy++;
		}

		__asm__ volatile ("rsr.ccount %0" : "=a"(count));
		printk("%d\n", count);
	}

The SoC has a fairly robust set of possible CPU clocking modes, but we
don't have a driver for that yet.  Until we do, set the single
configured CPU frequency to the one we get at runtime.

Signed-off-by: Andy Ross <andrew.j.ross@intel.com>
2017-08-09 19:57:40 -04:00
Leandro Pereira 27ea2d8eb7 arch: xtensa: Convert Xtensa port to use gen_isr_table
The Xtensa port was the only one remaining to be converted to the new
way of connecting interrupts in Zephyr.  Some things are still
unconverted, mainly the exception table, and this will be performed
another time.

Of note: _irq_priority_set() isn't called on _ARCH_IRQ_CONNECT(), since
IRQs can't change priority on Xtensa: while the architecture has the
concept of interrupt priority levels, each line has a fixed level and
can't be changed.

Signed-off-by: Leandro Pereira <leandro.pereira@intel.com>
2017-08-09 12:26:14 -07:00
Leandro Pereira db6ff4da60 drivers: random: Add ESP32 random number generator driver
The random number generator from ESP32 uses noise from Wi-Fi and
Bluetooth radios.  If these are off, a pseudo-random number is
generated instead; this is currently the case, but even though it's a
black box, it's arguably better than returning a timestamp as a
pseudo-random number generator.

According to the ESP32 Technical Reference manual, the RNG passed the
Dieharder Random Number Test suite (version 3.31.1)[1], but nothing has
been said about the quality of the PRNG.

The RNG register is read directly; no effort is made to use its
contents to feed an entropy pool in a way that's similar to /dev/random
on POSIX systems, as no such subsystem exists on Zephyr at the moment.

[1] http://webhome.phy.duke.edu/~rgb/General/dieharder.php

Signed-off-by: Leandro Pereira <leandro.pereira@intel.com>
2017-08-09 12:26:14 -07:00
Leandro Pereira c0c79a8041 drivers: gpio: esp32: Add ESP32 GPIO driver
This provides basic GPIO support, with interrupts, and the ability to
read and write to ports on a pin-by-pin basis.

Jira: ZEP-2286
Signed-off-by: Leandro Pereira <leandro.pereira@intel.com>
2017-08-09 12:26:14 -07:00
Leandro Pereira f3b05c6a58 drivers: pinmux: Add pin multiplexer driver for ESP32
This implements a driver for the pin multiplexer as present in the ESP32
SoCs.

All APIs are supported.

Jira: ZEP-2297
Signed-off-by: Leandro Pereira <leandro.pereira@intel.com>
2017-08-09 12:26:14 -07:00
David B. Kinder 62a0cd246d doc: fix uses of back quotes in documentation
ReST defines interpreted text roles where text enclosed by single quotes
can be "intrepreted", for example :ref:`some name` becomes a link to
a label anywhere in the doc set named "some name", :c:func:`funcname()`
becomes a link to the API documentation for "funcname", and
:option:`CONFIG_NAME` becomes a link to, in our case, the documentation
for the generated Kconfig option.

This patch fixes uses of `some name` (without a role) by either adding
an explicit role, or changing to ``some name``, which indicates inline
code block formatting (most likely what was intended).

This is a precursor to changing the default behavior of interpreted
text to treat `some name` as :any:`some name` (as configured in
doc/conf.py), which would attempt to create a link to any available
definition of "some name".

We may not change this default role behavior, but it becomes an option
after the fixes in this patch.  In any case, this patch fixes incorrect
uses of single-quoted text (possibly introduced because GitHub's
markdown language uses single-quoted text for inline code formatting).

Jira: ZEP-2414

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2017-08-03 11:08:23 -04:00
Leandro Pereira 6000c70ea0 boards: doc: Add ESP32 documentation
The documentation details how to install and configure all the
pre-requisites to build Zephyr for the ESP32 SoC, including using the
vendor SDK and toolchain, the flashing tool, and how to use JTAG.

Jira: ZEP-2109
Signed-off-by: Leandro Pereira <leandro.pereira@intel.com>
2017-07-28 19:35:55 -04:00
Anas Nashif dd8fd72826 boards: mark qemu targets with a unified Kconfig
This will allow checking if we are building for QEMU globally, without
having to know the exact architecture and board name.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2017-07-26 07:40:45 -05:00
Anas Nashif e8776f6b69 doc: add qemu_xtensa board instructions
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2017-06-28 16:58:37 -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
Leandro Pereira c78f55d0af boards: esp32: Do not use undefined CONFIG_BOARD_XTENSA
Signed-off-by: Leandro Pereira <leandro.pereira@intel.com>
2017-06-21 18:09:13 -04:00
Leandro Pereira f0b4e174d7 esp32: Use esptool.py to flash with 'make flash'
This flashes Zephyr at 0x1000: that's where the first stage bootloader,
part of the ESP32 ROM, expects to find an "image header".

The second-stage bootloader, part of ESP-IDF, isn't used by the Zephyr
port.  However, the bootloader can be used if desired; please refer to
the ESP-IDF documentation on how to set up partitions tables and use
the bootloader.

The following environment variables will affect the ESP32 flashing
process:

  Variable              Default value
  ESP_DEVICE            /dev/ttyUSB0
  ESP_BAUD_RATE         921600
  ESP_FLASH_SIZE        detect
  ESP_FLASH_FREQ        40m
  ESP_FLASH_MODE        dio
  ESP_TOOL              espidf

It's impossible to determine which serial port the ESP32 board is
connected to, as it uses a generic RS232-USB converter.  The default of
/dev/ttyUSB0 is provided as that's often the assigned name on a Linux
machine without any other such converters.

The baud rate of 921600bps is recommended.  If experiencing issues when
flashing, try halving the value a few times (460800, 230400, 115200,
etc).  It might be necessary to change the flash frequency or the flash
mode; please refer to the esptool documentation for guidance on these
settings.

If ${ESP_TOOL} is set to "espidf", the esptool.py script found within
ESP-IDF will be used.  Otherwise, this variable is handled as a path to
the tool.

Signed-off-by: Leandro Pereira <leandro.pereira@intel.com>
2017-06-21 12:35:49 -04:00
Leandro Pereira 0e08b946de soc: esp32: Define __start as a C function
The first stage bootloader, part of the ESP32 ROM, already sets up
a stack that's sufficient to execute C programs.  So, instead of
implementing __stack() in assembly, do it in C to simplify things
slightly.

This ESP32-specific initialization will perform the following:

  - Disable the watchdog timer that's enabled by the bootloader
  - Move exception handlers to IRAM
  - Disable normal interrupts
  - Disable the second CPU
  - Zero out the BSS segment

Things that might be performed in the future include setting up the
CPU frequency, memory protection regions, and enabling the flash
cache.

Signed-off-by: Leandro Pereira <leandro.pereira@intel.com>
2017-06-21 12:35:49 -04:00
Leandro Pereira 4ca586e62d arch: xtensa: Use Zephyr configuration options
Unconditionally use CONFIG_SIMULATOR_XTENSA to determine if XT_SIMULATOR
or XT_BOARD should be defined.

If CONFIG_SYS_CLOCK_HW_CYCLES_PER_SEC, also define XT_CLOCK_FREQ.  This
isn't ideal as the clock frequency might be changed in runtime and this
effectively makes it a constant.

Until we can control the clock frequency in runtime, this will suffice.

Signed-off-by: Leandro Pereira <leandro.pereira@intel.com>
2017-06-21 12:35:49 -04:00
Leandro Pereira 37ea77173c drivers: esp32: Add minimal UART driver based on ROM routines
This is a minimal driver enabling console output during the port
bringup.  While the driver works, only one of the three UART devices
are supported, and there isn't any way to change any parameters or
use interrupts.  This will most likely be superceded by a proper
driver after the port has matured.

Signed-off-by: Leandro Pereira <leandro.pereira@intel.com>
2017-06-21 12:35:49 -04:00
Leandro Pereira c13174935b boards: xtensa: Add ESP32 board
This is based on the work of Rajavardhan Gundi.

Signed-off-by: Leandro Pereira <leandro.pereira@intel.com>
2017-06-21 12:35:49 -04:00
David B. Kinder 9faa5f2033 doc: spelling fixes in Kconfig files
regular spelling check on Kconfig.* files

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2017-06-12 19:40:51 -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
Anas Nashif 5fc80dce61 xtensa: dont set variant with gcc
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2017-05-20 07:04:33 -04:00
Andrew Boie 4f69bdaa0d sanitycheck: build more Xtensa SOCs
Now that we can specify what toolchain is intended for each
SOC, enable some more SOCs to be built.

A full sanitycheck run will require the installation of both
RF-2016.4 and RG-2016.4 releases.

Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2017-05-18 07:18:36 -04:00
Andrew Boie fe70b0876f xt-sim: don't depend on sample_controller SOC
The xtensa simulator can in fact simulate a variety of Xtensa SOCs.
Fixes build for alternate xt-sim_* defconfigs.

Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2017-05-15 15:04:40 -04:00
Andrew Boie 3ddd7f274e xt-sim: fix board definition, rename
The xt-sim defconfigs were selecting CONFIG_SIMULATOR_XTENSA instead
of CONFIG_BOARD_SIMULATOR_XTENSA.

Fix defconfigs and rename to CONFIG_BOARD_XT_SIM to ease any future
confusion between these similarly named defconfigs.

CONFIG_SIMULATOR_XTENSA is automatically set by xt-sim's
Kconfig.defconfig, it doesn't need to be explicitly specified in the
defconfigs themselves.

Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2017-05-15 15:04:40 -04:00
Anas Nashif 63efc5f4bb xtensa: qemu: set correct clock frequency
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2017-05-12 07:00:04 -04:00
Anas Nashif f628c12b04 xtensa: rename SOC_SAMPLE_CONTROLLER
SOC_SAMPLE_CONTROLLER option name is too generic, make it Xtensa
specific to avoid confusion.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2017-05-12 07:00:04 -04:00
Anas Nashif 2a0d16593a xtensa: qemu: add qemu_xtensa board definition
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2017-05-11 16:51:56 -04:00
Anas Nashif 09b239102a xtensa: xt-sim: mark it as a board with simulator features
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2017-05-11 16:51:56 -04:00
Andrew Boie 18c949c9c9 xtensa: remove xt-sim_XRC_D2PM
This core configuration was removed from the tree since it cannot
implement irq_offload().

Remove an orphaned block in xtesna.ini.

Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2017-05-11 12:47:23 -04: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
Mazen NEIFER 37352c809e xtensa port: Added documentation for xt-sim board.
Issue: ZEP-1899

Change-Id: I4cf2878468e8c1c9703a2af13d9c2b3ac6f78042
Signed-off-by: Mazen NEIFER <mazen@nestwave.com>
2017-04-20 21:07:15 +00:00
Andrew Boie 6311ede125 xtensa: remove hifi_mini sim target
The core build in the SDK does not have a timer, making it impossible
to use this core with most of the sanity checks. We are working on
getting a special package of cores for Zephyr which meet our build
requirments; until then, remove this core as it doesn't build.

Change-Id: I3fa201f3c6b5724501e8cb1e1b8ba631436ebc23
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2017-04-13 11:45:52 -07:00
Andrew Boie 6922a22c28 xtensa: add simulator targets for more SOCs
Change-Id: Ibceaf01ed71783c597b030bcc5778da6a03e5699
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2017-04-13 12:42:07 +00:00
Andrew Boie d73641c50b xt-sim: remove extraneous C file
Change-Id: I8f2ac2e743e57e6a591b2f995fbef97ecfebf46e
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2017-04-13 12:42:06 +00:00
Andrew Boie 11ee791b32 xtensa: build similar to other Zephyr arches
* CONFIG_SOC is now properly set and we do not need a separate
  XTENSA_CORE build variable

* Some unnecessary macro -D CFLAGS in the Xtensa Makefile removed

* There is no default SOC selection, it is now done explicitly in
  the board's defconfig

* CONFIG_<board name> now renamed to CONFIG_SOC_<board name in
  uppercase> to conform to established style.

Issue: ZEP-1711
Change-Id: I88997530db09970b7fdd1c3e3d355bfca9d0be1a
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2017-04-13 12:42:06 +00:00
Andrew Boie 3a29b9cefa xt-sim: set default stack size for IPM console receiver
The default of 512 is insufficient.

Change-Id: I7dd1cca89d1f289ceb87aee8e8a80719846d139c
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2017-03-06 16:58:21 +00:00
Andrew Boie eb50958266 xt-sim: add support for 'make debug'
Change-Id: I60b64c6b8c83e1e1c49d8cb2c5f857faee88a7a0
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2017-02-13 11:39:01 -08:00
Andrew Boie 55acd15cc8 xt-sim: enable use of xtensa simulator with 'make run'
Change-Id: I450f24de73dc710ab3875b010ecf48e44370cfc0
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2017-02-13 08:04:27 -08:00
Mazen NEIFER 03857ccb23 Xtensa port: Enable console when building for Xtensa simulator as board.
Change-Id: I48f25b7c7bb36bd7248e7d9e6718bf365eac56d9
Signed-off-by: Mazen NEIFER <mazen@nestwave.com>
2017-02-13 08:04:27 -08:00
Andrew Boie aa3ab35c88 xtensa: fixup license identifiers
Master branch changed requirements for license headers while this
branch has been in development.

Change-Id: I9bce16ff275057a4bb664019628fc9b6de7aef7c
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2017-02-13 08:04:27 -08:00
Mazen NEIFER 4db0805ad0 Xtensa port: Added board config files for Xtensa simulator paltform
This platform is not a real board but let user handle the xtensa
simulator just like a board.
This is needed until a qemu like simulaotr is added to Xtensa.

Change-Id: I54ab28e86eea956cf85af3ee9b4a10f0d531e54d
Signed-off-by: Mazen NEIFER <mazen@nestwave.com>
2017-02-13 08:04:26 -08:00