Commit graph

500 commits

Author SHA1 Message Date
Iván Sánchez Ortega 3b8c6c70e6 samples: usb: webusb: Add MS-OS descriptors for compatible IDs
This adds some vendor-specific microsoft USB descriptors, which
makes the win8/win10 enumeration process to report a "WINUSB"
capability, which in turn automatically binds a WinUSB.sys driver
to a specific set of interfaces. This, in theory, makes userspace
drivers easier to handle in win32/win64 platforms.

Signed-off-by: Iván Sánchez Ortega <ivan@sanchezortega.es>
2018-05-15 18:56:32 +02:00
Ramakrishna Pallala ef4cb15f04 samples: subsys: debug: sysview: Adapt k_thread_foreach API
Use k_thread_foreach() API instead of iterating over the
_kernel.threads list.

Signed-off-by: Ramakrishna Pallala <ramakrishna.pallala@intel.com>
2018-05-15 13:43:00 +03:00
Laczen JMS b1e45b413e subsys: fs: Add Non Volatile Storage (NVS) for zephyr
Zephyr supports fatfs, nffs and fcb as storage layer. fatfs and nffs
are less suited for application in memory restricted IC's. fcb has a
smaller footprint but has a complex api.

The proposed module is a module with a even smaller footprint compared
to fcb and a simple interface for reading and writing entries. The
module provides wear levelling of flash. This allows the module to be
used not only to store configuration settings but to store device state
(e.g. state of a light switch over reboots) of a zephyr device.

Fixes buffer overflow by introducing maximum read length in nvs_read()
and nvs_read_hist().

Fixes nvs_write() not to reflash the same data. Allows the user to do
call nvs_write() for all defined entries without worries about flash
wear.

Fixes garbage collection error where wrong data could be copied.

Add nvs_delete() to allow deleting a stored entry. A deleted entry will
not be copied to a new flash sector

Include flash wear information in the README.md documentation

0/25 Update module after reviewers remarks, added documentation to
nvs.h, removed README.md by nvs.rst in doc/subsystems folder

04/26 Update module after reviewers remarks, updated nvs.rst, added more
documentation to samples/subsys/nvs/src/main.c, updated doxygen info
in nvs.h (hope this time it works).

04/26 Update subsystems.rst to include nvs.restart

04/27 Updated nvs.c and nvs.h to avoid a possible flash deletion loop
when the file system is full.

04/29 Updated nvs_write to detect and ignore deletes of non-existing
items

05/06 Update NVS module to return standard error codes, removed low
level API, added configuration options. NVS now uses the board dts to
determine the flash storage location (FLASH_AREA_STORAGE_OFFSET).

05/06 Update nvs.rst. Updated intendation and added intermediate
variables in nvs.c to make the code easier to read.

05/06 Update nvs.rst.

05/07 Update nvs.rst

05/08 Changed the API to a more standard file system API.

05/08 Removed cnt_max from nvs_read() as it is not used.

05/08 Removed #ifdef(CONFIG_NVS_LOG) from nvs_priv.h, now the module can
be build with debugging off.

05/09 Removed configuration options for SECTOR_SIZE, SECTOR_COUNT and
MAX_ELEM_SIZE. It is now easy to support multiple NVS filesystems on
one or multiple devices. Changed logging to support newlib systems.
Thanks to Olivier Martin for reporting and proposed changes.

Signed-off-by: Laczen JMS <laczenjms@gmail.com>
2018-05-15 10:29:16 +02:00
Andrzej Puzdrowski c913c6710d smaples/mgmt/mcumgr/smp_svr: fix missing nffs.h header
Header was missing after merging PR #6970
`Add support for File System multiple instances`

Signed-off-by: Andrzej Puzdrowski <andrzej.puzdrowski@nordicsemi.no>
2018-05-09 11:01:23 +02:00
Ramakrishna Pallala 9413682942 samples: subsys: usb: Set disk name Kconfig option
Assign the appropriate disk name Kconfig option to the
usb mass storage sample test.

Signed-off-by: Ramakrishna Pallala <ramakrishna.pallala@intel.com>
2018-05-08 08:53:01 -04:00
Johann Fischer b2ca5ee5bc subsys: usb: rework USB DFU class driver
This patch moves USB DFU class driver to subsys/usb/class.

For the first the USB DFU class driver depends on DFU image
manager and partition layout and is limited to use as an
application for the bootloader. The driver fetches the
information about the flash, erase block size, write block
size and partitions offset from the DT now. The driver has
two interfaces associated with the two partitions "SLOT-0"
and "SLOT-1". The "SLOT-0" can only be read.

In the following work the class driver can be extended so
that it can be used from the bootloader and update a flash
region directly from the bootloader.

Signed-off-by: Johann Fischer <j.fischer@phytec.de>
2018-04-30 17:42:40 -04:00
Iván Sánchez Ortega b35274a4e9 samples: usb: webusb: Prettify binary object store descriptor
This is a simple cosmetic change. Each field in the BOS (Binary
Object Store) descriptor has a comment, to understand it better.

Signed-off-by: Iván Sánchez Ortega <ivan@sanchezortega.es>
2018-04-20 21:06:11 -07:00
Erwan Gouriou 162b6e4b35 samples: Allow use of "CONTROLLER" postfix for LED and GPIO
Rework samples using LED and GPIO to enforce use of "CONTROLLER"
as LED and PGIO postifx.
Change impact all samples that could be run by boards yet moved to
GPIO node generations, which is only STM32 for now

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2018-04-19 09:32:39 -05:00
Ismael Fillonneau 28724732e7 doc: fix mgmt sample path
mgmt sample path in the documentation was incorrect

Signed-off-by: Ismael Fillonneau <ismael.fillonneau@stimio.fr>
2018-04-18 17:54:05 +02:00
Andrei Emeltchenko e295836b3a usb: dfu: Use USB Device defined VID / PID
Remove hardcoded DFU_VENDOR_ID and DFU_PRODUCT_ID and use
configuration values.

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2018-04-11 08:30:39 -04:00
Anas Nashif 156091fba6 samples: sample.yaml cleanup
Cleanup test names and filtering and add console harness support where
needed.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2018-04-09 22:55:20 -04:00
David B. Kinder e48b64d1be doc: fix doc misspellings in doc, boards, samples
Occasional spelling-check scan found some misspellings.

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2018-04-05 19:17:01 -04:00
Carles Cufi bd583ed92d samples: mgmt: Expand smp_svr sample documentation
Expand the contents of the smp_svr sample documentation so that it
covers all steps needed to perform DFU over BLE.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2018-04-05 16:56:46 +02:00
Andrei Emeltchenko 842ab93f6e usb: Add multifunction composite build test
Add multifunction composite test for building USB device with HID and
MSC functions.

Fixes: #2613

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2018-04-03 15:58:33 -04:00
Andrei Emeltchenko 0a39c15839 usb: sample: Add support for composite configuration for HID
The current problem with HID is that we need to "patch" static
descriptor table with the size of report descriptor defined in the
user application.

The proposed solution is to have composite_pre_init() defined with
priority CONFIG_KERNEL_INIT_PRIORITY_DEVICE which should run before
composite_init() defined with priority
CONFIG_APPLICATION_INIT_PRIORITY.

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2018-04-03 15:58:33 -04:00
Andrei Emeltchenko 3bf9b05b13 tests: Add USB HID composite test
Test also composite configuration

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2018-04-03 15:58:33 -04:00
qianfan Zhao b2570d2a55 samples: usb: add usb hid mouse sample
this sample expect there has a button in you board, that was
the mouse's left button, tested in linux by using evtest.

Signed-off-by: qianfan Zhao <qianfanguijin@163.com>
2018-03-28 10:44:58 -04:00
Carles Cufi 8761bf05d1 samples: mgmt: Remove unnecessary mbedTLS reference
Since the base64 encoding and decoding functionalit is now provided by a
separate library, remove the line in the CMakeLists.txt file that refers
to it.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2018-03-26 16:29:27 +02:00
Carles Cufi ab2d3e70c6 samples: mgmt: Remove unneeded DTC overlay
With the new CONFIG_BOOTLOADER_MCUBOOT option there is no longer a need
to define custom overlays in order for a project to be bootable by
MCUboot. Remove therefore those unnecessary complications in the sample.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2018-03-26 16:29:27 +02:00
Iván Sánchez Ortega eaaab7771b samples: usb: Make each sample have its own USB product string
Each USB sample, when compiled, will provide a different
USB product string. A "nice to have" feature when trying
out the USB samples (they will show up differently in
`lsusb` or `dmesg`), and also illustrates how to set up
custom USB constants in the config files.

Requires #6589.

Signed-off-by: Iván Sánchez Ortega <ivan@sanchezortega.es>
2018-03-22 12:41:40 +01:00
Michael Hope 4d6d04d3ea hid: change the API table to const.
A minor change to put the API function table into flash.

Signed-off-by: Michael Hope <mlhx@google.com>
2018-03-21 19:45:11 -04:00
Carles Cufi 8aa9a37902 drivers: flash: nrf: Rename nrf5 to nrf
With upcoming ICs that are not in the nRF5x family, rename the flash
driver and all its dependencies from nrf5 to nrf.

Should also fix the issue introduced by f49150cab6 which broke the
assignment of the flash device due to a partial rename.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2018-03-20 20:07:09 +01:00
Anas Nashif e5f1b51f01 debug: fix RTT console Kconfig
Use HAS_ Kconfig option as intended, those are invisible option that
signify support of a certain feature that can be selected by a hardware
or platform.

For RTT and system view this was not dont in an inconsistent way.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2018-03-19 15:37:26 -04:00
Andrei Emeltchenko 4304b4c38b usb: cdc_acm: yield in the waiting loop
Add k_yield() when waiting for data to be transmitted

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2018-03-15 15:58:02 -07:00
Andrei Emeltchenko 756c50aa53 usb: cdc_acm: Fix write when USB writes only chunk
Current implementation of cdc_acm writes 4 bytes for quark_se at a time
and current code misses remaining data chunks. Make sense to check
written bytes for other platforms as well.

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2018-03-15 15:58:02 -07:00
Sundar Subramaniyan 4a90d97588 tests: samples: Add nrf52840_pca10056 board to USB test cases
Add nrf52840_pca10056 to platform whitelist for hci_usb and cdc_acm
samples.

Signed-off-by: Sundar Subramaniyan <sundar.subramaniyan@gmail.com>
2018-03-15 12:39:53 +01:00
Andrzej Puzdrowski ca6ebbdf74 samples: subsys: mgmt: mcumgr: Fix FS part of smp_svr example
After introducing of Virtual File System Switch (#6318)
it i required to mount file system in order to use it.
This patch add to the example code which mounts NFFS
file system in the example.

Signed-off-by: Andrzej Puzdrowski <andrzej.puzdrowski@nordicsemi.no>
2018-03-14 17:40:18 +01:00
Iván Sánchez Ortega fa57ebd5b7 usb: Rename unicode into UTF16LE
In order to avoid confusion between "Unicode", UTF8, UTF16, UTF32,
and endianess of these encodings, rename all instances of "Unicode"
in the USB subsystem and samples into "UTF16LE".

Signed-off-by: Iván Sánchez Ortega <ivan@sanchezortega.es>
2018-03-14 13:40:59 +01:00
Christopher Collins 3e30e8164f samples: subsys: mgmt: smp_svr: add sample app
This commit adds the sample `smp_svr` app from the mcumgr repo.

Signed-off-by: Christopher Collins <ccollins@apache.org>
2018-02-20 22:07:52 +01:00
Alberto Escolar Piedras 6ef85ed6fc test: shell: native_posix also supports shell
The native_posix port also supports shell apps thru its
stdin redirection.

Signed-off-by: Alberto Escolar Piedras <alpi@oticon.com>
2018-02-02 07:48:46 -08:00
Andrei Emeltchenko f3653b1a5c usb: Add sanitycheck configuration
Add configuration for sanitycheck for HID sample

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2018-01-31 07:42:19 -05:00
Andrei Emeltchenko bab250a0e8 usb: samples: Add HID sample
Add simple USB HID sample device. Connecting to Linux registers as
input device, lsusb is able to show descriptors (unbinded from input)

...
        HID Device Descriptor:
          bLength                 9
          bDescriptorType        33
          bcdHID               1.10
          bCountryCode            0 Not supported
          bNumDescriptors         1
          bDescriptorType        34 Report
          wDescriptorLength      32
          Report Descriptor: (length is 32)
            Item(Global): Usage Page, data= [ 0x01 ] 1
                            Generic Desktop Controls
            Item(Local ): Usage, data= [ 0x00 ] 0
                            Undefined
            Item(Main  ): Collection, data= [ 0x01 ] 1
                            Application
            Item(Global): Logical Minimum, data= [ 0x00 ] 0
            Item(Global): Logical Maximum, data= [ 0xff 0x00 ] 255
            Item(Global): Report ID, data= [ 0x01 ] 1
            Item(Global): Report Size, data= [ 0x08 ] 8
            Item(Global): Report Count, data= [ 0x01 ] 1
            Item(Local ): Usage, data= [ 0x00 ] 0
                            Undefined
            Item(Main  ): Input, data= [ 0x82 ] 130
                            Data Variable Absolute No_Wrap Linear
                            Preferred_State No_Null_Position Volatile
Bitfield
            Item(Global): Report ID, data= [ 0x02 ] 2
            Item(Global): Report Size, data= [ 0x08 ] 8
            Item(Global): Report Count, data= [ 0x01 ] 1
            Item(Local ): Usage, data= [ 0x00 ] 0
                            Undefined
            Item(Main  ): Output, data= [ 0x82 ] 130
                            Data Variable Absolute No_Wrap Linear
                            Preferred_State No_Null_Position Volatile
Bitfield
            Item(Main  ): End Collection, data=none
...

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2018-01-31 07:42:19 -05:00
Anas Nashif 6de0dfad51 samples: event_logger: match more lines during sanitycheck
Have the test run for long by matching more lines in the output.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2018-01-25 04:45:35 +05:30
Anas Nashif d2b7749428 samples: event_logger: remove filter and support harness
Evaluate output from sample and record success/failure.

Enable on other platforms, this should not be whitelisted.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2018-01-25 04:45:35 +05:30
Anas Nashif d6cc2909b8 sample: kernel_event_logger: cleanup headers
Remove unused and duplicated header inclusion.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2018-01-25 04:45:35 +05:30
Anas Nashif ff0d690e79 samples: shell: add standalone version command
Combine modules with standalone commands.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2018-01-19 12:01:08 -05:00
Anas Nashif fa7f13ef00 shell: rename sample to be less generic
This sample implements a custom module, so rename it to allow for other
samples with specific features.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2018-01-19 12:01:08 -05:00
Anas Nashif dd013691b2 shell: add a shell banner
Give details about running version and add a line about usage.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2018-01-19 12:01:08 -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
Andrei Emeltchenko 7e80f41162 usb: Rename SYS_LOG_USB to SYS_LOG_USB_DEVICE
At the moment CONFIG_SYS_LOG_USB_LEVEL name does not specify that this
is log level for the Device Stack. Make it clear renaming to the
proper name.

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2018-01-17 18:53:05 -05:00
Andrei Emeltchenko 6e17e71fb5 samples: Correct default SYS_LOG_USB and SYS_LOG_USB_DRIVER levels
Making configuration files useful.

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2018-01-17 18:53:05 -05:00
Anas Nashif 94066e0f15 tests/samples: remove unknown option LOG_CBUFFER/LOGGER_BACKEND
Those options are not part of Zephyr.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2018-01-08 08:08:45 -05:00
Punit Vara 71948788eb tests: logger-hook: convert sample to ztest and move to test/
issue: #3302

Signed-off-by: Punit Vara <punit.vara@intel.com>
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2018-01-05 18:17:59 -05:00
Anas Nashif bca9c456d2 samples: remove build_only from various samples
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2017-12-28 20:24:29 -05:00
Anas Nashif e2122cbf89 lib: move ring_buffer from misc/ to lib/
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2017-12-15 20:02:01 -05:00
qianfan Zhao b4f45b8a1d samples: webusb: fix array length in Product and SN string descriptors
Signed-off-by: qianfan Zhao <qianfanguijin@163.com>
2017-12-12 09:28:42 -05:00
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
Anas Nashif 467b3401e3 samples: logger-hook: remove unused configs
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2017-11-27 22:15:30 -05:00
Carles Cufi d1235f9bd8 samples: subsys: Convert doc to CMake
Convert doc of samples/subsys to CMake.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2017-11-12 21:13:23 -05:00
Sebastian Bøe 5630ccfc23 cmake: Introduce a default VID and PID
Signed-off-by: Sebastian Boe <sebastian.boe@nordicsemi.no>
2017-11-08 20:00:22 -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
Johann Fischer cebc1c501b samples: webusb: rework usb descriptor
Remove Intel's VID and PID, rework usb descriptor
and remove cdc_acm.h header dependencies.

Signed-off-by: Johann Fischer <j.fischer@phytec.de>
2017-11-07 15:31:02 -05:00
Savinay Dharmappa 4cec15270d sample: subsys: logging: kernel_event_logger: Add sample application
patch adds a sample application to demonstrate use of kernel event
logger feature.

Signed-off-by: Savinay Dharmappa <savinay.dharmappa@intel.com>
2017-11-02 22:22:54 -04:00
Anas Nashif 0fb51fa849 headers: fix global includes for various source files
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2017-10-31 12:32:34 -04:00
Andy Ross 4a8a24fe39 Revert "cdc_acm : Restrict writing more than 4 bytes into TX USB Endpoint."
This reverts commit 1da0a9eebd.

The workaround caused a severe performance penalty, and only worked
for USB packets of 4-15 bytes in length (16+ byte packets weren't
subject to the hardware bug).  Single-byte packets (very common for
cdc_acm serial port transfers) would still be duplicated sometimes.

The upcoming DMA implementation does not share the performance
penalty, and also is not subject to the bug for those sizes of packets
(though it DOES still have a problem with single-byte packets!).

Signed-off-by: Andy Ross <andrew.j.ross@intel.com>
2017-10-28 14:38:19 -04:00
Andrei Emeltchenko 45c4d07287 usb: Add missing tag to sanity check configuration
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2017-10-19 09:30:58 -04:00
Andrei Emeltchenko 44a3cca2e2 usb: Remove default Vendor and Product ID
Vendor ID and Product ID should be assigned on build time by
respective process.

For sanity check we assign some random values which are only used for
build tests and should not be used for real products.

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2017-10-19 09:30:58 -04: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
Johann Fischer 5ab2cb96eb samples: cdc_acm: add composite configuration
Signed-off-by: Johann Fischer <j.fischer@phytec.de>
2017-10-13 09:18:14 -04:00
Johann Fischer 927cdf9c32 samples: usb: set default log levels in mass sample to error
Signed-off-by: Johann Fischer <j.fischer@phytec.de>
2017-10-05 12:09:59 -04:00
Anas Nashif 71a927955e usb: move headers to include/usb/class
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2017-10-03 14:50:14 -04:00
Anas Nashif 18a33edd39 usb: fix local includes and add usb namespace
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2017-10-03 14:50:14 -04:00
Andrei Emeltchenko 54831ec5c7 usb: webusb: Move USB version definition to right place
Make it possible to reuse definitions from other samples.

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2017-09-21 13:10:04 -04:00
Andrei Emeltchenko 4efaefba5c usb: Allow to select configuration for composite devices
Composite multifunction USB devices should be able to know about
configuration change, implement it through existing callback.

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2017-09-21 09:00:23 -04:00
Anas Nashif f7b2484219 samples: add missing sample.yaml and fix build
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2017-09-12 17:21:08 -07:00
Anas Nashif 1e8afbfe5a cleanup: remove lots of references to unified kernel
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2017-09-12 12:37:11 -04: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
Andrew Boie 3d346a1105 samples: ipm_mailbox: fix build error
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2017-08-02 11:15:25 -04:00
Johann Fischer bc2454fa9e samples: usb: add usb.rst and README.rst for CDC ACM sample
Signed-off-by: Johann Fischer <j.fischer@phytec.de>
2017-07-23 07:41:57 -04:00
Johann Fischer 1ff51986e5 samples: cdc_acm: use Arduino 101 as default board
Be consistent with other usb samples and use Arduino 101
as default board.

Signed-off-by: Johann Fischer <j.fischer@phytec.de>
2017-07-23 07:41:57 -04:00
Johann Fischer a8d7659a63 samples: dfu: fix usb configuration descriptor length
The macros for calculating the length of the configuration
descriptors have been interchanged, fix it, and use the
correct macro for the length of the DFU mode configuration
descriptor.

Signed-off-by: Johann Fischer <j.fischer@phytec.de>
2017-07-15 11:26:40 +03:00
David B. Kinder eeed8ce179 doc: fix wiki board references in non .rst files
Some README files referenced wiki articles that have been
moved to the doc area on the website.

Fixes #668

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2017-07-11 12:45:35 -05:00
Kumar Gala 5920acef8a samples: mark samples that require usb_device support
Add depends_on usb_device for those samples that need it.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2017-07-07 09:01:01 -05:00
Anas Nashif 07c0d3d0f0 samples: ipm_mailbox: fix thread creation
We have been starting the same thread twice. Introduced when we moved
from k_thread_spawn.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2017-07-03 20:57:44 -04:00
Kumar Gala 21cf3a6344 samples: Fix filtering on UART_CONSOLE
There were a few different issues with the UART_CONSOLE filtering:
* Filter was incorrect - UART_CONSOLE should be CONFIG_UART_CONSOLE
* platform_exclude was used for drivers that had a #error for lack of
  interrupt support.  We can now use CONFIG_SERIAL_SUPPORT_INTERRUPT in
  the filter for that.  This catches all the various drivers that needed
  don't support uart interrupts, not just the onces that had a #error

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2017-06-29 07:07:31 -04:00
Johann Fischer 08df5961b3 arch: intel_quark: use DW device driver when USB is selected
This patch allows more generic USB configuration in the samples
and removes platform dependent driver configuration.

Signed-off-by: Johann Fischer <j.fischer@phytec.de>
2017-06-28 15:14:15 -04:00
Johann Fischer 3dd51d52a2 drivers: usb: use generic option name for log level
Signed-off-by: Johann Fischer <j.fischer@phytec.de>
2017-06-28 09:02:27 -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
Andrew Boie e87eacacfa samples: use K_THREAD_STACK_DEFINE macros
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2017-06-09 18:53:28 -04:00
Anas Nashif 3405607d9e license: add missing licenses and copyright
We were missing license boilerplate in many files, add them

Jira: ZEP-1464

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2017-06-08 10:41:56 -04:00
Paul Sokolovsky 3cb13b9687 subsys: console: Add buffered output support to console subsystem
Signed-off-by: Paul Sokolovsky <paul.sokolovsky@linaro.org>
2017-05-15 15:56:56 -04:00
Youvedeep Singh 1da0a9eebd cdc_acm : Restrict writing more than 4 bytes into TX USB Endpoint.
Sometime it is observed on the Arduino 101 that when we write more than
4 bytes into TX USB Endpoint, first 4 bytes are getting repeated
(frequency of occurrence ~1/3000).

This patch does following :-

1. In sample application "cdc_acm", it adds capability to
handle partial transfer data incase data is transferred partially
if exceeds maximum data transfer size.
2. It restricts write of more than  4 bytes into TX USB Endpoint.
This is work around to  avoid issue occarance.

Jira: ZEP-2074

Signed-off-by: Youvedeep Singh <youvedeep.singh@intel.com>
Signed-off-by: Andy Ross <andrew.j.ross@intel.com>
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2017-05-13 15:12:27 -04:00
Andrew Boie 39962dc92c samples: use k_thread_create()
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2017-05-11 20:24:22 -04:00
Andrei Emeltchenko bca1077d3c samples: ipm_mailbox: Remove unneeded definitions
Make sample working for other architectures.
SCSS_REGISTER_BASE and SCSS_SS_STS are defined in soc.h

Change-Id: Ie477520d2fb9bfcbbb5038ff42356a56d8180a1f
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2017-05-10 09:08:58 -04:00
Kumar Gala 5899d750e8 samples: Cleanup uint types in SEGGER SystemView
Convert sample to using new u{8,16,32}_t types

Change-Id: I0f5d9ad6fecef59cd1552e48e0cf02173d631916
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2017-04-25 22:09:11 +00:00
Leandro Pereira 6ccfe5aa14 samples: Add SEGGER SystemView sample application
This sample application uses the kernel system logger already present
in Zephyr and publishes events through the SEGGER RTT protocol, so it's
available by the SEGGER SystemView application.

[1] https://www.segger.com/systemview.html?p=1731

Jira: ZEP-1463
Change-Id: If1eba4644b95175660b3040bdc4b2717b2cfc9ad
Signed-off-by: Leandro Pereira <leandro.pereira@intel.com>
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2017-04-25 02:16:37 +00: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
Anas Nashif 259949d10e samples: console: fixed filter and add CONFIG_
The filter expects CONFIG_, otherwise it is noop

Change-Id: I2b0a02b6450287a090b69a12324fe7f7cf494999
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2017-04-11 03:14:26 +00:00
Anas Nashif dac15b9b71 samples: shell: fix testcase.ini to be more inclusive
Filter was wrong and sample was not being built on any boards. Exclude
platforms that do not support interrupt based UART drivers.

Jira: ZEP-2014
Change-Id: I84a690e7c93fae52335434830b83086019cfd00d
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2017-04-11 03:14:25 +00:00
Anas Nashif 3781ed061b samples: usb: remove custom DBG macro and use sys_log
Change-Id: Icc83afe0c48ada9454104f0d1a7487027b1566b3
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2017-04-10 16:08:01 +00:00
David B. Kinder 1a9600b704 doc: add labels to 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: Ie5ff404ac23621dbcf6ca61734ed6f72832c1ce2
Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2017-04-04 20:48:08 +00:00
Anas Nashif fb5e9b9283 samples: console: filter boards without console
Change-Id: Ifdf0da9295d54cd1e95386297eff2e5ef3d45858
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2017-04-04 19:18:15 +00:00
Paul Sokolovsky 542c2b93d0 subsys: console: Add pull-style console API support.
This change introduces console_getchar() and console_getline() API
calls which can be used to get pending console input (either one
char or whole line), or block waiting for one. In this regard, they
are similar to well-known ANSI C function getchar/gets/fgets, and
are intended to ease porting of existing applications to Zephyr, and
indeed, these functions (shaped as an external module) are already
used by few applications.

The implementation of the functions is structured as a new "console"
subsystem. The intention is that further generic console code may be
pulled there instead of being in drivers/console/. Besides the
functions themselves, initialization code and sample applications
are included.

At this time, there're may limitations of how these functions can
be used. For example, console_getchar() and console_getline() are
mutually exclusive, and both are incompatible with callback
(push-style) console API (and e.g. with console shell subsystem
which uses this API). Again, the intention is to make a first step
towards refactoring console subsystem to allow more flexible
real-world usage, better reusability and composability.

Change-Id: I3f4015bb5b26e0656f82f428b11ba30e980d25a0
Signed-off-by: Paul Sokolovsky <paul.sokolovsky@linaro.org>
2017-04-01 20:44:17 +00:00
Anas Nashif 8c1a073bb1 samples: ipm sample using mailbox for Quark SE
re-add sample that was dropped by mistake and add a top level Makefile
for building and flashing two cores.

Change-Id: Ie22ac1efa7b5373999997489a2c866de19553128
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2017-03-29 15:53:28 -04:00
Anas Nashif eaffffd963 samples: move usb samples subsystem folder
Change-Id: Id1696bf18dc77a0afb1180f417b2bb641ad809ab
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2017-03-29 19:35:34 +00:00
Anas Nashif 52448f6a2b samples: move shell sample subsystem folder
Change-Id: I9729885ec2c6ceb0367323ed9b1f72f05517b2aa
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2017-03-29 19:35:33 +00:00
Anas Nashif da4ccce59e samples: move logger-hook sample to subsystem
Change-Id: I693ce41046bddcef21e3f634d602683f1512f927
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2017-03-29 19:35:33 +00:00