* K_APP_DMEM_SECTION/K_MEM_BMEM_SECTION macros now exist
to specifically define the name of the sections for data
and bss respectively.
* All boards now use the gen_app_partitions.py script, the
padding hacks for non-power-of-two arches didn't work right
in all cases. Linker scripts have been updated.
* The defined k_mem_partition is now completely initialized
at build time. The region data structures now only exist
to zero BSS.
Based on some work submitted by Adithya Baglody
<adithya.baglody@intel.com>
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
This particular rule of cmake was causing problems when run in
multi-threaded environment. This change in the dependency will
resolve all such issues and ensures that this script is executed
correctly.
Signed-off-by: Adithya Baglody <adithya.nagaraj.baglody@intel.com>
This patch will run the python scripts for all architectures
to determine the partitions available. This is needed for correct
operation of the app_shared_mem feature.
Signed-off-by: Adithya Baglody <adithya.nagaraj.baglody@intel.com>
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
This is a separate data section which needs to be copied into
RAM.
Most arches just use the kernel's _data_copy(), but x86 has its
own optimized copying code.
Signed-off-by: Adithya Baglody <adithya.nagaraj.baglody@intel.com>
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
We want CONFIG_APPLICATION_MEMORY specifically disabled
for this test, but it was being transitively selected by
CONFIG_TEST_USERSPACE which defaults to on for CONFIG_TEST.
Turn it off so that disabling application memory in the
config actually has an effect.
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
Dynamic kernel objects enforce that the permission state
of an object is also a reference count; using a kernel
object without permission regardless of caller privilege
level is a programming bug.
However, this is not the case for static objects. In
particular, supervisor threads are allowed to use any
object they like without worrying about permissions, and
the logic here was causing cleanup functions to be called
over and over again on kernel objects that were actually
in use.
The automatic cleanup mechanism was intended for
dynamic objects anyway, so just skip it entirely for
static objects.
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
Fixed typo: CONFIG_NET_NET_PKT_LOG_LEVEL_DBG, removed extra _NET.
Removed debug macro CONFIG_NET_DEBUG_NET_PKT that is not used.
Signed-off-by: Andrei Gansari <andrei.gansari@nxp.com>
The SAM GMAC Ethernet driver currently keeps a reference to the packet
being sent in addition than keeping of references of the fragments. In
practice this is only needed when PTP is enabled, otherwise the driver
only need to prevent the fragment (or even their content) to be changed.
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
The SAM GMAC Ethernet driver uses scatter gather DMA to transmit data.
Each fragment of a network packet is mapped from a set of descriptors
that is used by the controller to do the DMA transfer. This means that
the packet is not necessary sent when the send() function returns. For
that reason the driver calls net_pkt_ref() on the packet to prevent it
from being freed. It is then unreferenced with net_pkt_unref() in the
TX ISR when the packet has effectively been sent.
However this doesn't work if the packet is modified in the meantime,
like it will be done in PR #12563 to remove the Ethernet header
contained in the first fragment. To avoid that, call net_pkt_frag_ref()
on each fragment of the packet, and unreferenced them with
net_pkt_frag_unref() in the TX ISR when the packet has effectively been
sent.
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
IPv4 is not needed for packet socket sample. Previous commit
helps to remove dependencies.
Signed-off-by: Ravi kumar Veeramally <ravikumar.veeramally@linux.intel.com>
This commit fixes compilation warnings if user disables
CONFIG_NET_IPV4, CONFIG_NET_IPV6, CONFIG_NET_TCP and
CONFIG_NET_UDP.
E.g Samples like packet-socket doesn't need above configuration.
Signed-off-by: Ravi kumar Veeramally <ravikumar.veeramally@linux.intel.com>
The function to set channel alarm is called counter_set_channel_alarm.
To match the name of the function performing the reverse operation this
commit renames counter_disable_channel_alarm() function to
counter_cancel_channel_alarm().
Signed-off-by: Piotr Mienkowski <piotr.mienkowski@gmail.com>
Implemented via Zephyr's net_hostname_get(). As support for that call
is configurable and by default off, while many POSIX applications
assume that hostname is always available, we need a default value
in case CONFIG_NET_HOSTNAME_ENABLE is "n". Initial version of this
patch added that on the level of gethostname() call, but of was
suggested to move that down to net_hostname_get() instead.
Signed-off-by: Paul Sokolovsky <paul.sokolovsky@linaro.org>
The controller does not support trigger. However, the check for
this condition was incorrectly (as GPIO_INT_LEVEL is 0). So fix
it.
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
Interrupts default to trigger on level for historical reasons, so use of
GPIO_INT_LEVEL` as a mask results in a zero value. Use a mask macro to
isolate the trigger configuration.
Signed-off-by: Peter A. Bigot <pab@pabigot.com>
Interrupts default to trigger on level for historical reasons, so use of
GPIO_INT_LEVEL` as a mask results in a zero value. Use a mask macro to
isolate the trigger configuration.
Signed-off-by: Peter A. Bigot <pab@pabigot.com>
newlib is not supported with this toolchain, so mark it as such and
filter tests based on the variable defined in the toolchain file.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Parse CMakeCache.txt and filter based on variables defined in CMake.
The CMakeCache.txt parsing is borrowed from west.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
As in "#define string". More explicit.
Rename the parameters to name/value instead of k/v too.
Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
That the 'aliases' key isn't a regular property makes things a bit
confusing. Write the aliases separately, which should be a bit clearer.
That also makes it clear that the order doesn't matter.
The 'aliases' key always exists in defs[node], so use [] instead of
.get(). Also write "'aliases'" instead of "prop" when the value is
known.
Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
Probably easier to understand.
Also rename 'fd' to 'f'. "File descriptor" might make it sound like an
integer.
Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
That the 'aliases' key isn't a regular property makes things a bit
confusing. Write the aliases separately, which should be a bit clearer.
That also makes it clear that the order doesn't matter.
Also write "'aliases'" instead of "prop" when the value is known.
The .get() seems to be needed to work around a bug, and sometimes you
get DT_...=None in the output. Might look into that later.
extract_string_prop() could generate 'defs' entries without 'aliases'
keys. Make it add an empty 'aliases' dict instead, to remove existence
checks elsewhere.
Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
Returns the empty string for '/foo' and '/', but the old version did
that too, so maybe it's intended.
Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
Inline load_and_parse_dts() and generate_{keyvalue,include}_file().
Also specify UTF-8 for writing files, and fix some mis-indentation.
Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
Flags take a single argument by default, and removing nargs=1 avoids
getting it as a single-element list.
Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
Get rid of the parent_label variable.
Also avoid using "label" in two different senses (DT label and name of
define macro) within the same comment.
Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
Use the new i2c_write_read() wrapper to simplify the code.
Also add several overlays used to test the sensor on a variety of
boards, and conf file support for trigger testing.
Signed-off-by: Peter A. Bigot <pab@pabigot.com>
The scatter/gather API for I2C assumes that all SoC implementations are
capable of supporting such operations, in particular performing a single
write (read) transaction that transfers from (to) multiple addresses in
memory. This is not the case: for some driver implementations a write
of a device register address followed by a write of data to be stored in
that register will produce two bus transactions and be mis-interpreted
by the receiving device.
Extend the documentation of the I2C message flags to provide more
information about the breadth of implementation variation in their
interpretation.
i2c_burst_write cannot be deprecated because we have no replacement.
Clarify in the description that the behavior is not portable.
i2c_burst_read is not being deprecated because it is in use throughout
Zephyr. The description is updated to reflect that it can be replaced
by i2c_write_read().
Deprecate unused convenience wrappers that depended on the burst APIs
but were never used in the tree.
Signed-off-by: Peter A. Bigot <pab@pabigot.com>
Replace the sole use of i2c_burst_read_addr with a more generic API
function to allow the former to be deprecated along with its unreliable
sibling write and update functions.
Signed-off-by: Peter A. Bigot <pab@pabigot.com>
It is commonly necessary to execute a pair of I2C transactions where the
first is a write transaction that identifies information held on the
device and a second is a read transaction that retrieves the identified
information.
Add API that performs this operation generically, without restricting
the type or size of the identification or content messages. Follow the
argument order of the existing i2c_write and i2c_read methods.
This reduces the need to explicitly construct buffers for i2c_transfer,
or to use more restrictive API functions that perform a gather write
that is not reliable on all I2C bus driver implementations.
Signed-off-by: Peter A. Bigot <pab@pabigot.com>
error: a label can only be part of a statement and a declaration is not
a statement u32_t limit = _arc_v2_aux_reg_read(_ARC_V2_TMR0_LIMIT);
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
The latest update of the SAM E70 HAL (commit 6ad7e13608) shifted the
GMAC priority queues related registers by 4 bytes. It is not cleared
yet, if it is change is a mistake or a change from 0 based indexing
to 1 based indexing. Indeed the main queue is the number 0, and the
first priority queue is therefore the number 1.
In the meantime revert that change, and use the old registers addresses
matching the datasheet.
Fixes#12945
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>