This adds support for the SAM0 DMA Controller (DMAC). Chained
transfer are not currently implemented.
Tested with tests/drivers/dma/loop_transfer and custom modifications
to that test using three parallel reloading channels. Also tested
with a trivial program that did memory->serial.
Signed-off-by: Michael Hope <mlhx@google.com>
[hageman@inthat.cloud: Rebased and updated commit message]
Signed-off-by: Derek Hageman <hageman@inthat.cloud>
While configure_linker_script() may be useful for other linkers, it
currently only aimed at GNU ld. To really be useful among different
linkers, we would need to abstract its usage of the C preprocessor.
We can do this later, if needed.
No functional change expected.
Signed-off-by: Mark Ruvald Pedersen <mped@oticon.com>
Rather than associating defines within the function, let the call sites
themselves pick the appropriate define. Add new argument for this.
This also permits us to remove regex matching.
No functional change expected.
Signed-off-by: Mark Ruvald Pedersen <mped@oticon.com>
Reduce the amount of {pre,post}fixing magic: I.e. let it be clearer at
call sites that "linker.cmd" is a file, rather than having to know that
"linker" will be postfixed with ".cmd" internally.
Change argument name to linker_script_gen, to better indicate that we
are producing a generated file.
No functional change expected.
Signed-off-by: Mark Ruvald Pedersen <mped@oticon.com>
Now that we avoid the two-step procedure, we can simplify the name of
the construct_add_custom_command_for_linker_pass macro.
Move description comment up to head of definition, making the purpose
clearer.
No functional change expected.
Signed-off-by: Mark Ruvald Pedersen <mped@oticon.com>
Change construct_add_custom_command_for_linker_pass from function into
macro. The purpose of the function was to set the output variable to a
string that would be fed to add_custom_command. This meant all use
required a two-step procedure and an intermediate
variable (custom_command).
The environmental leakage from a macro in this case is small, so let's
just simplify to a macro and avoid the two-step.
No functional change expected.
Signed-off-by: Mark Ruvald Pedersen <mped@oticon.com>
Full grep reveal ALIGN_SIZING_DEP is only mentioned in cmake, where
it is never assigned a value.
No functional change expected.
Signed-off-by: Mark Ruvald Pedersen <mped@oticon.com>
There are limits to CMSIS stack sizes, we can't just
add a number to it. Use the configured maximum.
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
Set to same default as regular stacks. This doesn't use
any extra memory until CMSIS_V2_THREAD_DYNAMIC_MAX_COUNT
is set. 0 is not a valid default if that is set.
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
Update the name of mem-domain API function to add a partition
so that it complies with the 'z_' prefix convention. Correct
the function documentation.
Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
No functional change expected.
This is motivated by the wish to abstract Zephyr's usage of toolchains,
permitting non-intrusive porting to other (commercial) toolchains.
Signed-off-by: Mark Ruvald Pedersen <mped@oticon.com>
Fix missing BT_CTLR_FILTER conditional compilations that
cause compile errors when device whitelisting feature is
disabled in builds.
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
No functional change expected.
This is motivated by the wish to abstract Zephyr's usage of toolchains,
permitting non-intrusive porting to other (commercial) toolchains.
Signed-off-by: Mark Ruvald Pedersen <mped@oticon.com>
Move GNU ld linker specific flags related to orphan handling into
toolchain_ld_baremetal().
No functional change expected.
This is motivated by the wish to abstract Zephyr's usage of toolchains,
permitting non-intrusive porting to other (commercial) toolchains.
Signed-off-by: Mark Ruvald Pedersen <mped@oticon.com>
Move --gc-sections flag to toolchain_ld_base()
Move --build-id=none flag to toolchain_ld_base()
No functional change expected.
This is motivated by the wish to abstract Zephyr's usage of toolchains,
permitting non-intrusive porting to other (commercial) toolchains.
Signed-off-by: Mark Ruvald Pedersen <mped@oticon.com>
Depending on configuration, this value could end up as
a variable and not an array symbol, causing a crash if
newlib decides to call _sbrk on behalf of a user thread,
which needs to perform arithmetic on it.
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
Depending on optimization level, the TC_RESULT_STR[]
array could actually be placed in memory instead of
being expanded at compile time, resulting in memory
access errors from user mode.
Just replace TC_RESULT_TO_STR() with an inline function
containing a switch statement instead.
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
The various struct pipe_sequence were not located in memory
accessible to user mode. With optimization turned on, they
weren't in memory at all, but with code coverage enabled
the arrays were actually being read, resulting in memory
access failures from user mode.
Fix them by placing in ROM, they never get modified.
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
Renamed function vendor_cmd_handle to vendor_cmd_handle_common for
shared vendor commands. This allows vendor to implement
vendor_cmd_handle, containing both common and specific handling.
Signed-off-by: Morten Priess <mtpr@oticon.com>
The pkt variable cannot be NULL at this point so the check for
nullness is not needed.
Coverity-CID: 198002
Fixes#15777
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
* Rename the stack local 'done' to 'evdone' so as to disambiguate from
MFIFO_DEQUEUE_PEEK(done) which is actually 'mfifo_done'.
* add comment on ull_slave_done
* add comments to addr_us_get
* add comments to HCI_CLASS
Signed-off-by: Mark Ruvald Pedersen <mped@oticon.com>
Fix the missing reset of Encryption Procedure state when the
peripheral responded with error reason as pin or key missing
which otherwise caused connection disconnection on next
reception of data or control packet.
Relates to #15570.
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
settings_read_cb is defined to return ssize_t and not size_t. This
also eliminates several Coverity warnings.
Fixes#15765Fixes#15768Fixes#15771Fixes#15774Fixes#15778
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
This makes use of BT_GATT_SERVICE_DEFINE to statically define services
for services that are not required to be dynamically registered.
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
This reintroduces support for static service in the form of a new API,
BT_GATT_SERVICE_DEFINE, and changes the internal services (GAP/GATT)
to be defined as const as they are never register/unregistered.
Internal service needed to be renamed in order to keep the same order
as before since the section elements are sorted by name.
The result is the following (make ram_report):
before:
gatt.c 572 0.66%
cf_cfg 32 0.04%
db 8 0.01%
db_hash 16 0.02%
db_hash_work 32 0.04%
gap_attrs 180 0.21%
gap_svc 12 0.01%
gatt_attrs 160 0.18%
gatt_sc 80 0.09%
gatt_svc 12 0.01%
sc_ccc_cfg 32 0.04%
subscriptions 8 0.01%
after:
gatt.c 210 0.24%
cf_cfg 32 0.04%
db 8 0.01%
db_hash 16 0.02%
db_hash_work 32 0.04%
gatt_sc 80 0.09%
last_static_handle 2 0.00%
sc_ccc_cfg 32 0.04%
subscriptions 8 0.01%
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
The 96Boards Argonkey mezzanine board has been officially
published on ST website:
https://www.st.com/en/evaluation-tools/steval-mki187v1.html
Update documentation with official picture and website info.
Signed-off-by: Armando Visconti <armando.visconti@st.com>
Introduce new API function for ieee802154 driver configuration.
Currently this function is used for ACK configuration.
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
STACK_POINTER_RANDOM depends on a random generator, this can be either a
non-random generator (used for testing purpose) or a real random
generator. Make this dependency explicitly in Kconfig to avoid linking
problems.
Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
The PR removes the exclusive limit on enabling both UART_ASYNC_API
and UART_INTERRUPT_DRIVEN so that both options can be enabled
together for same uart driver.
Also, the interrupt handler will be used for both cases. So, enable
definition of interrupt handler for both.
However, nRF UART driver still wants to enable only one of them.
So, a new config is added to disable the code for UART_ASYNC_API
when the option UART_INTERRUPT_DRIVEN is enabled.
Signed-off-by: Jun Li <jun.r.li@intel.com>
Modern versions of GDB support multiple architectures
with the same binary.
In fact, Ubuntu stopped shipping a gdb-arm-none-eabi
package, gdb-multiarch should be used instead.
This fixes a failure on those systems where otherwise CMAKE_GDB will be
assigned to CMAKE_GDB-NOTFOUND.
Signed-off-by: Benjamin Valentin <benjamin.valentin@ml-pa.com>
k_poll_signal_raise() returns an error code to indicate that the raise
was too late to notify an expiring poll. Make clear that this does not
mean that the signal was lost: a subsequent poll will find it and expire
immediately.
Signed-off-by: Peter A. Bigot <pab@pabigot.com>
device_get_binding() compares pointers first before doing strcmp().
However, enabling coverage forces -O0 to disable any compiler
optimizations. There would be multiple copies of the same string,
and the code pathing doing pointer comparsion would not be tested
at all. So add this flag to merge string constants such that
the pointer comparison would be exercised.
This also adds a bad driver which fails initialization. This is
to make sure that execution path is covered.
Signed-off-by: Daniel Leung <daniel.leung@intel.com>