- tx_tsv is never used anywhere
- and rx_rsv can be allocated on stack
Optimizing a bit the stack usage in eth_enc28j60_rx() function as well.
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
SPI API helps to directly transfer bytes from/to relevant buffers, so
let's take advantage of it.
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
Driver is still a bit messy, not using for instance the 0-copy
capabilities of SPI API, but this will be fix later.
Constify most of the spi buf structures, removing useless variables,
renaming function with common prefix eth_enc28j60_ etc...
It seems to fix an issue on verifying if tx was successful as well.
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
When we added support for the HiFive1 board we forget to make sure it
had a board yaml file. Add the file so we get sanitycheck running on
the board.
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
Assign special Product ID (0x101) to wpanusb protocol exporting
IEEE802.15.4 over USB.
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
Missing newline on end of the file - this cause failure
while try to use menuconfig.
Signed-off-by: Andrzej Puzdrowski <andrzej.puzdrowski@nordicsemi.no>
The Colibri iMX7D Computer on Module with Colibri Evaluation Board
configuration supports the following hardware features on the Cortex M4
Core:
+-----------+------------+-------------------------------------+
| Interface | Controller | Driver/Component |
+===========+============+=====================================+
| NVIC | on-chip | nested vector interrupt controller |
+-----------+------------+-------------------------------------+
| SYSTICK | on-chip | systick |
+-----------+------------+-------------------------------------+
| UART | on-chip | serial port-polling; |
| | | serial port-interrupt |
+-----------+------------+-------------------------------------+
The default configuration can be found in the defconfig file:
boards/arm/colibri_imx7d_m4/colibri_imx7d_m4_defconfig
Other hardware features are not currently supported by the port.
Connections and IOs:
The Colibri iMX7D Computer on Module with Colibri Evaluation Board
was tested with the following pinmux controller configuration.
+---------------+-----------------+---------------------------+
| Board Name | SoC Name | Usage |
+===============+=================+===========================+
| UART_B RXD | UART2_TXD | UART Console |
+---------------+-----------------+---------------------------+
| UART_B TXD | UART2_RXD | UART Console |
+---------------+-----------------+---------------------------+
Signed-off-by: Diego Sueiro <diego.sueiro@gmail.com>
The i.MX7 SoC is a Hybrid multi-core processor composed by Single/Dual
Cortex A7 core and Single Cortex M4 core.
Zephyr was ported to run on the M4 core. In a later release, it will
also communicate with the A7 core (running Linux) via RPmsg.
The low level drivers come from NXP FreeRTOS BSP and are located at
ext/hal/nxp/imx. More details can be found at ext/hal/nxp/imx/README
The A7 core is responsible to load the M4 binary application into the
RAM, put the M4 in reset, set the M4 Program Counter and Stack Pointer,
and get the M4 out of reset.
The A7 can perform these steps at bootloader level after the Linux
system has booted.
The M4 can use up to 5 different RAMs. These are the memory mapping for
A7 and M4:
+---------------+-----------------+---------------------------+
| Memory Name | Start Address | Size |
+===============+=================+===========================+
| TCML | 0x007F8000 | 32KB |
+---------------+-----------------+---------------------------+
| TCMU | 0x20000000 | 32KB |
+---------------+-----------------+---------------------------+
| OCRAM_S | 0x20180000 | 32KB |
+---------------+-----------------+---------------------------+
| OCRAM | 0x00900000 | 128KB |
+---------------+-----------------+---------------------------+
| DDR | 0x10000000 | 256MB |
+---------------+-----------------+---------------------------+
Signed-off-by: Diego Sueiro <diego.sueiro@gmail.com>
Adds a shim layer around the imx uart driver to adapt it to the Zephyr
serial interface.
Modem mode was introduce to control it as DCE and DTE and can be
configured in the device tree:
modem-mode:
type: int
category: required
description: Set the UART Port to modem mode 0 (dce) 1 (dte)
generation: define
For now only the UART 2 was tested.
Signed-off-by: Diego Sueiro <diego.sueiro@gmail.com>
This code component is used to add Zephyr support on iMX7 processors,
exclusively on Cortex M4 core, and to speed up the development process
it was decided to have it based on NXP FreeRTOS BSP implementation.
The source code was imported from the following folders:
FreeRTOS_BSP_1.0.1_iMX7D/platform/drivers
FreeRTOS_BSP_1.0.1_iMX7D/platform/devices
This source code depends on headers and sources from zephyr:
ext/hal/cmsis
Origin: iMX7D NXP FreeRTOS BSP Peripheral Driver
License: BSD 3-Clause
URL: https://www.nxp.com/webapp/Download?colCode=FreeRTOS_iMX7D_1.0.1_LINUX&appType=license
commit: no commit hash
Purpose: The peripheral driver wraps the H/W for i.MX7 M4 core
Maintained-by: External
Signed-off-by: Diego Sueiro <diego.sueiro@gmail.com>
commit ec7ecf7900 moved some code around
such that the total_size variable is used regardless of how
CONFIG_MPU_REQUIRES_POWER_OF_TWO_ALIGNMENT is set. So move the
decleration of total_size outside of the ifndef block so things build
properly.
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
If we have some error parsing a testcase or other files we treat these
as errors and will exit before continuing on building other tests.
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
Doc incorrectly said to use the word "retest" in a comment when the
correct word is "recheck".
Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
1. Add a tag in the testcase.yaml to deal with the following error from
sanitycheck:
E: tests/lib/rbtree/testcase.yaml: can't load (skipping):
<NotMappingError: error code 6: Value: None is not of a
mapping type: Path: '/'>
2. Reduced the MAX_NODES so the test will build on small memory systems
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
In order to generate defs for references in aliases dts node,
add some treatment in extract_xxx functions to generate
aliases #define's
Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
Returns true if the specified node is in the tree. Allows the tree to
be used for "set" style semantics along with a lessthan_fn that simply
compares the nodes by their address.
Signed-off-by: Andy Ross <andrew.j.ross@intel.com>
Test for the rbtree balanced tree.
The theory here is that the test uses a PRNG to randomly build and
modify trees build from an array of node objects (whose comparison
operator is just their memory address). It begins with tiny node
sets, so as to catch edge cases (e.g. nodes being the root, or a leaf,
or parent/child) in the balancing algorithm before increasing the size
and continuing.
At each iteration the resulting tree is walked, verifying that it
contains exactly the nodes that we expect it should, that they appear
in the correct sorted order in the walk, that their local structure
matches a correct binary tree, and that the red/black rules are
followed always:
* The root must be black
* Red nodes can have only black children
* The path from the root to any NULL child pointer in the tree must
cross the same number of black nodes.
Signed-off-by: Andy Ross <andrew.j.ross@intel.com>
A balanced tree implementation for Zephyr as we grow into bigger
regimes where simpler data structures aren't appropriate.
This implements an intrusive balanced tree that guarantees O(log2(N))
runtime for all operations and amortized O(1) behavior for creation
and destruction of whole trees. The algorithms and naming are
conventional per existing academic and didactic implementations, c.f.:
https://en.wikipedia.org/wiki/Red%E2%80%93black_tree
The implementation is size-optimized to prioritize runtime memory
usage. The data structure is intrusive, which is to say the struct
rbnode handle is intended to be placed in a separate struct the same
way other such structures (e.g. Zephyr's dlist list) and requires no
data pointer to be stored in the node. The color bit is unioned with
a pointer (fairly common for such libraries). Most notably, there is
no "parent" pointer stored in the node, the upper structure of the
tree being generated dynamically via a stack as the tree is recursed.
So the overall memory overhead of a node is just two pointers,
identical with a doubly-linked list.
Code size above dlist is about 2-2.5k on most architectures, which is
significant by Zephyr standards but probably still worthwhile in many
situations.
Signed-off-by: Andy Ross <andrew.j.ross@intel.com>
Following tests were failing on a microcontroller with 32KB flash:
benchmark.application
crypto.ecc_dh
crypto.ecc_dsa
test_build_ethernet
test_build_sensors_a_m
The min_flash option has been added in the test case yaml files.
Signed-off-by: Diego Sueiro <diego.sueiro@gmail.com>
The handler for k_thread_create() wasn't verifying that the
provided stack size actually fits in the requested stack object
on systems that enforce power-of-two size/alignment for stacks.
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
This uses the version and hash (git describe) and replaces the timestamp
currently used in the boot banner. This works much better than using
timestamps. It lets us point to the exact commit being used to run a
certain application or test.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
The actual behaviour of CONIG_FP_SOFTABI has not been matching the
documenation. The Kconfig documentation states that floating point
instructions should be generated, but this Kconfig option has been
turning off floating point instructions instead.
This commit causes floating point instructions to be generated when
CONFIG_FP_SOFTABI is enabled, as was originally intended and
documented.
This commit can cause regressions if users have been relying on the
actual behaviour instead of the documented behaviour.
Kconfig documentation:
config FP_SOFTABI
help
This option selects the Floating point ABI in which hardware
floating point instructions are generated but soft-float calling
conventions.
GCC documentation:
Specifying ‘soft’ causes GCC to generate output containing library
calls for floating-point operations. ‘softfp’ allows the generation of
code using hardware floating-point instructions, but still uses the
soft-float calling conventions. ‘hard’ allows generation of
floating-point instructions and uses FPU-specific calling conventions.
Signed-off-by: Sebastian Bøe <sebastian.boe@nordicsemi.no>
All boards based on STM32 should use dts for I2C and SPI.
Move CONFIG flags selection from boards to arch and select them
for all STM32 SoCs.
Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
The test actually has three network interfaces in native_posix board
and not two so check that correctly.
Fixes#6988
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
This will permit to tweak ethernet L2 and devices settings at runtime.
Currently, only devices settings are tweaked through this interface.
Fixes#6640
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
Depending on what's supported by the device, it could be possible to
configure these at runtime such as auto-negociation, link speed, etc...
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
There will be additional source files coming in, so let's not clutter l2
root directory.
Reordering a bit l2 Kconfig: offload part come first, then the l2
drivers.
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
Function should be exposed if only vlan is enabled.
Also, changing vlan_setup's signature to stay consistent with device
driver API.
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
Curently only link speed is exposed.
Opportunity taken to remove any post-fix enumerating the iface init
and/or the api: these must be generic and used by all the instances.
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
Instead of one global statistics, collect statistics information
separately for each network interface. This per interface statistics
collection is optional but turned on by default. It can be turned
off if needed, in which case only global statistics are collected.
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
Make sure that we return proper network statistics data if
someone asks it via network management interface.
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
The test case checks that many of the common header files are C++
compatible and checks that some of the primitives like ARRAY_SIZE
work.
Signed-off-by: Michael Hope <mlhx@google.com>
This patch lets a C++ application use more of Zephyr by adding guards
and changeing some constructs to the C++11 equivalent.
Changes include:
- Adding guards
- Switching to static_assert
- Switching to a template for ARRAY_SIZE as g++ doesn't have the
builtin.
- Re-ordering designated initialisers to match the struct field order
as G++ only supports simple designated initialisers.
Signed-off-by: Michael Hope <mlhx@google.com>