Commit graph

295 commits

Author SHA1 Message Date
Anas Nashif 23f81eeb42 tests/samples: fixed yaml syntax
Use a map directory, avoid the list which makes parsing a bit
cumbersome.

Fixes #5109

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2017-12-11 14:47:08 -05:00
Kumar Gala 6b38f57225 Add missing license and copyright headers
The following files didn't have any copyright or license headers on them
when they got contributed.  So add the SPDX Apache license and
appropriate copyright info:

boards/arm/stm32l476g_disco/pinmux.c
samples/basic/threads/src/main.c
tests/net/socket/tcp/src/main.c

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2017-12-05 08:21:05 -06:00
Zhang WenChao b6171378fc sample: blink_led: Add support for stm32f4_disco
Signed-off-by: Zhang WenChao <zhangwenchao001@gmail.com>
2017-11-14 07:04:00 -05:00
Carles Cufi 08183f7e73 samples: basic: Convert doc to CMake
Convert doc for samples/basic to CMake.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2017-11-12 21:13:23 -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
Sahaj Sarup b6c70fd331 samples: Basic Thread Demo
A basic demo to showcase multi-threading using K_THREAD_DEFINE

Signed-off-by: Sahaj Sarup <sahaj.sarup@linaro.org>
2017-11-07 08:28:32 -05:00
Anas Nashif 0356590df5 tests: samples: fix yaml syntax
Fix indentation and syntax and make it pass yamllint tool.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2017-10-15 08:15:00 -04:00
Gil Pitney 4f67a6c76d cc3200: Remove TI cc3200 SOC and LaunchXL board support
Per ZEP-1958, Phase 2 of adding CC3220sf LaunchXL support,
was to "deprecate the CC3200 launchxl support in Zephyr
(redundant to the CC3220)."

Effectively, the CC3220 SOC replaces the CC3200.

This patch removes the following:
* the imported CC3200 SDK
* CC3200 SOC, board, DTS files.
* adjusts other files where cc3200 was mentioned.

Also, it fixes explicit references to CC3200 in generic
CC32xx driver files.

Jira: ZEP-1958

Signed-off-by: Gil Pitney <gil.pitney@linaro.org>
2017-08-15 11:02:48 -05:00
Maureen Helm a580bc5b2e samples: rgb_led: Add support for hexiwear_k64
The hexiwear_k64 board can drive the leds with a pwm, so update the
rgb_led sample to work with this board.

Jira: ZEP-2025

Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
2017-08-09 18:13:29 -04:00
Maureen Helm 3b5577d102 samples: fade_led: Add support for hexiwear_k64
The hexiwear_k64 board can drive the leds with a pwm, so update the
fade_led sample to work with this board.

Jira: ZEP-2025

Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
2017-08-09 18:13:29 -04:00
Maureen Helm 28bf1a554a samples: blink_led: Add support for hexiwear_k64
The hexiwear_k64 board can drive the leds with a pwm, so update the
blink_led sample to work with this board. Reduces the maximum blinking
frequency from 500 Hz to 64 Hz because your eye can't distinguish these
higher frequencies (the led appears solidly on). Increases the minimum
blinking frequency from 0.5 Hz to 1 Hz because the mcux pwm driver can't
handle frequencies less than 1 Hz.

Jira: ZEP-2025

Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
2017-08-09 18:13:29 -04:00
Anas Nashif 3c50f7aa12 tests: samples: remove duplicate filtering
We have many testcases doing filtering both on the architecture level
and the platform level, which is redundant. Also many testcases are
running the same test twice on the same SoC for no good reason, cleanup
the tests and cleanup the filtering.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2017-06-27 17:44:23 -04:00
Anas Nashif 470c5f3189 tests: remove testcase.ini files
We now use yaml files.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2017-06-21 20:56:53 -04:00
Anas Nashif cc24f4b03c tests: samples: convert testcase files to yaml
This will prepare test cases and samples with metadata and information
that will be consumed by the sanitycheck script which will be changed to
parse YAML files instead of ini.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2017-06-21 20:56:53 -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
Florian Vaussard 5671c15fee samples: blink_led: Add support for STM32F412
The STM32F412 has PWM output capabilities. Add support to the blink_led
samples.

Tested using a Nucleo STM32F412ZG board (PWM output on pin 28 of the
CN11 Morpho connector and pin 29 of the CN10 Zio connector).

Change-Id: I75fb986fa97bd1c07c6375938430e7963297cd9d
Signed-off-by: Florian Vaussard <florian.vaussard@heig-vd.ch>
2017-06-02 14:11:13 -04:00
Florian Vaussard acdbf7d093 samples: blink_led: Add support for STM32F413
The STM32F413 has PWM output capabilities. Add support to the blink_led
samples.

Tested using a Nucleo STM32F413ZH board (PWM output on pin 28 of the
CN11 Morpho connector and pin 29 of the CN10 Zio connector).

Change-Id: I3b25b09cab54265b28088ac9681aec588d9d48b5
Signed-off-by: Florian Vaussard <florian.vaussard@heig-vd.ch>
2017-06-02 14:11:13 -04:00
Erwan Gouriou 19a91c0272 soc: stm32l476rg: rename SOC config flag
Rename SOC_STM32L476XX to SOC_STM32L476XG to keep flash
size information.
Aim is to be able to distinguish flash size variants of
the SoC when needed (for instance in dts/arm/st/mem.h file)

Change-Id: I834bb5b83c24c39e90c0492a2b22a7c7802de361
Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2017-05-15 13:22:54 -04:00
Kumar Gala e547533435 samples: 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: I08c682bfc0b80dfa88de859e90a011bcd2db2762
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2017-04-21 09:53:53 -05:00
Vinayak Chettimada 9584456fc9 drivers: pwm: Add nRF5x GPIOTE based PWM driver
Add support for nRF5x series GPIOTE based PWM driver
implementation.

Provides upto 3 pins/channels using one HF timer, two PPI
channels per pin, and one GPIOTE config per pin.

Change-id: I6056b199ec2cff595ba8fea9f659a0338ed4635b
Signed-off-by: Vinayak Chettimada <vinayak.kariappa.chettimada@nordicsemi.no>
2017-04-14 01:53:07 +00:00
David B. Kinder b78ffc0e6b doc: add labels to basic sample docs
Docs need a label at the top so we can use :ref:`labelname`
to create a link to that doc from other docs.

Change-Id: I57d65a8888f78aa61d776f607a5db86bdb35726c
Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2017-04-04 19:51:47 +00:00
Kuo-Lang Tseng 5873fee475 samples: pwm: change hard-coded device name
Use the config name defined by the driver Kconfig in device
binding calls as that is safer because device name can change and
the app does not need to change.

Jira: ZEP-1764

Change-Id: I3c7716fd72e77c99fd29e4e90634c33f47f32e4c
Signed-off-by: Kuo-Lang Tseng <kuo-lang.tseng@intel.com>
2017-03-07 23:03:44 +00:00
Andrew Boie 138579a3ad samples: add some missing testcase.ini
Issue: ZEP-1768
Change-Id: Ia59e02bdaf9302b991f0423ef5eba7b0102877b0
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2017-02-23 13:28:03 +00:00
Kuo-Lang Tseng e7f261b748 samples: blink_led: change hard-coded device name
Use the config name defined by the driver Kconfig in device
binding calls as that is more portable and safer because device
name can change and the app does not need to change.

Jira: ZEP-1764

Change-Id: If8c14dd4eb186bace863432d454c9122461f2f9c
Signed-off-by: Kuo-Lang Tseng <kuo-lang.tseng@intel.com>
2017-02-23 13:25:20 +00:00
Kuo-Lang Tseng 0eed7eefee samples: fade_led: change hard-coded device name
Use the config name defined by the driver Kconfig in device
binding calls as that is more portable and safer because device
name can change and the app does not need to change.

Jira: ZEP-1764

Change-Id: I3287da5c5a9df24507efa84bbf7bbb051726bc2c
Signed-off-by: Kuo-Lang Tseng <kuo-lang.tseng@intel.com>
2017-02-23 13:25:05 +00:00
David B. Kinder 2cb045420c doc: fix .rst files canonical heading order
The headings on some .rst files were not following the expected
heading order of using # for h1, * for h2, = for h3, and - for h4
This patch fixes that, and the doc/templates/*.tmpl files created
for folks to use as templates for creating board and sample docs.

Change-Id: I0263b005648558d5ea41a681ceaa4798c9594dd9
Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2017-01-20 16:06:36 -08: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 567c294608 samples: doc: remove 'make pristine', it is not needed
Replace 'make qemu' with 'make run'

Change-Id: I62a8ff30ecf713fe2d2fd27d4de321265d9bb3f7
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2017-01-16 18:13:03 -05:00
Punit Vara 959988662f samples: basic: Move pwm driver samples
This patch moves pwm driver samples to samples/basic and also convert
documentation of PWM samples to RST.

Jira: ZEP-1536
Change-Id: Ib2b3ff8b1722a26618e9a6fe416e2138d82ca28b
Signed-off-by: Punit Vara <punitvara@gmail.com>
2017-01-11 15:15:31 +00:00
Anas Nashif 7cf2bfe466 boards: add quark_d2000_crb documentation
Change-Id: Idb4ed43c8639cee2673dff24b18ff2ccd76a1396
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2017-01-10 02:45:55 +00:00
Anas Nashif d8629bfc01 samples: disco: fix links to boards in README
Change-Id: Ic85eefb2de0afcae1bf2ca68cb2eef9b8f2d7bb9
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2017-01-09 16:20:05 +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
Anas Nashif a1d7794647 samples: minor documentation tweaks
Change-Id: I9efe25dbc808c635d895ffe2893afb68f4088ad1
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2017-01-06 18:49:24 -05:00
Anas Nashif fc6137001b doc: move documetnation context to root directory
This will allow inclusion of documentation files that exist outside of
doc/ and will make it possible to add rst files across the tree,
especially for boards, samples and tests.

Change-Id: I7afcf92d99f504b2bc0b2b7e3452acb2f8e08294
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2017-01-06 22:51:31 +00:00
Anas Nashif a2e7706140 samples: disco: convert to rst and expand documentation
Change-Id: I1252e3d95aaee877fa7f8bb4768e07ec75f8769a
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2017-01-06 16:32:31 -05:00
Anas Nashif 2b72ff397c samples: button: convert to rst and expand documentation
Change-Id: I8839d565325659ec1c00c9eb513a4dfa29cd6e2d
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2017-01-06 16:32:31 -05:00
Jean-Paul Etienne 1a3de7b4b6 samples: button: set EDGE to SW0_GPIO_INT_CONF if defined
SW0_GPIO_INT_CONF shall allow boards to define the
interrupt configuration for SW0 without having to modify
the button sample app.

If SW0_GPIO_INT_CONF is defined set EDGE to it, otherwise
used default EDGE value.

Change-Id: Ia697e06debc341463ed9cdee1db564f3727d27e3
Signed-off-by: Jean-Paul Etienne <fractalclone@gmail.com>
2017-01-05 16:35:47 +00:00
Flavio Santes 953f7ae45d samples/basic/disco: Add support for Nucleo F401RE and A101
The README.txt file is updated with information about wiring
and building. A testcase.ini file is also added by this patch.

Change-Id: I7354d844ac3dec41f0c9af02ede5da26f3ad0398
Signed-off-by: Flavio Santes <flavio.santes@intel.com>
2016-12-25 19:16:37 +00:00
Baohong Liu 2ca689da91 samples: button: stop the app if device binding fails
Stop the app from running if device binding fails. Otherwise,
dereferencing NULL pointer will happen. This was caught by
Coverity.

Coverity-CID: 151988

Change-Id: I8245d938498a51123249fbd069935900ad660314
Signed-off-by: Baohong Liu <baohong.liu@intel.com>
2016-11-18 02:01:22 +00:00
Baohong Liu 36b398f89f samples: button: fix variable type mismatching issue
The variable type mismatching was caught by LLVM.

Jira: ZEP-1179

Change-Id: I084406601badc64c257cbdd82b9c8b7509549303
Signed-off-by: Baohong Liu <baohong.liu@intel.com>
2016-11-16 02:09:11 +00:00
Anas Nashif d622b09bc0 samples: tests: remove obsolete KERNEL_TYPE and kernel variables
Remove those from Makefiles and testcase.ini, we now support unified kernel
only and sanitycheck script now knows how to deal with this.

Change-Id: I853ebcadfa7b56a4de5737d95f2ba096babb2e13
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-11-04 15:47:25 -04:00
Anas Nashif 0ad8e7c21a samples: convert to unified applications
Change-Id: Ic65886b9144e4c8b738f94ab228541ef4a34dea3
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-11-01 13:42:17 -04:00
Anas Nashif fa06c5b879 samples: move basic samples to samples/basic
Change-Id: I0915158424d9f105959e436af3378dc52753347c
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-10-27 22:14:31 +00:00
Anas Nashif febe9f5571 samples: add basic blinky application
The mandatory blinky sample at your service.

Change-Id: I999215fbda338effd6f7b65a2a165acf9b850a9a
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-10-27 20:56:13 +00:00