The defines should have had a _0 on them, now that we generate the
proper defines, fixup the cases that used that old scheme.
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
The alias generation wasn't doing the right thing with regards to
keeping the names consistent. We would drop the index from the define
name for aliases.
So we'd get
DT_NXP_KINETIS_GPIO_GPIO_D_IRQ
which should be
DT_NXP_KINETIS_GPIO_GPIO_D_IRQ_0
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
Add a deprecate flag to add_prop_aliases so we can make the aliases it
generates as deprecated if needed.
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
The last FCB test to run (fcb_test_last_of_n) uses uninitialized
test_data[] and leaves behind a flash.bin with random content. Pick
another one (fcb_test_reset) that leaves a deterministic flash.bin
behind and run that last instead.
Signed-off-by: Marc Herbert <marc.herbert@intel.com>
The binding specified 2 cells for an interrupt, but in reality we only
have an IRQ number. Remove the 'pri' cell from the binding to match
what the dts files are doing.
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
There is no point allowing smaller alignments. And on 64-bit systems the
minimum becomes 8 rather than 4, so let's adjust things automatically.
Signed-off-by: Nicolas Pitre <npitre@baylibre.com>
The block alignment must be enforced for statically allocated slabs
as well as runtime initialized ones. It is best to implement this
check only once in create_free_list() which is invoked by both
k_mem_slab_init() and init_mem_slab_module(), where pointers are about
to be set for the first time. It is then unnecessary to perform this
test on every slab allocation as the alignment won't change at that
point.
And not only the block size needs to be aligned, but the buffer
as well.
Signed-off-by: Nicolas Pitre <npitre@baylibre.com>
Many things are currently aligned on 32-bit boundaries. On 64-bit
targets this should be 64-bit boundaries instead. Provide a pair of
macros, namely WB_UP() and WB_DN(), that do the right thing in both
cases.
The naming is short on purpose as this gets will be used within other
macro definitions, sometimes multiple times per line, and having a
longer name would make for excessively long lines.
Signed-off-by: Nicolas Pitre <npitre@baylibre.com>
If user supplies AF_UNSPEC, we need to do two queries, one for
IPv4 A record and one for IPv6 AAAA record.
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
We must query both IPv4 and IPv6 addresses if the hints parameter
is NULL i.e., user does not supply hints or if family is set to
AF_UNSPEC.
Fixes#16453
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
This function uses mqtt_read_publish_payload_blocking to perform a
blocking read of the specified number of bytes.
When reading out a payload, the normal use case is to read the
entire payload. This function facilitates that use case.
Signed-off-by: Håkon Øye Amundsen <haakon.amundsen@nordicsemi.no>
Think I understand it now, and that was the goal.
- _extract_partition() adds index-based entries. extract_partition()
adds label-based entries.
Rename them to _add_partition_index_entries() and
_add_partition_label_entries(), and call them from a top-level
extract_partition() function.
This makes the logic clearer. It took me a long time to spot it.
- Generate indicies with a simple counter and remove the _flash_area
logic. This would break if partitions were extracted more than once,
but they aren't, and now you know that they can't be.
- Rename _create_legacy_label() to add_legacy_alias() and make it
global. It doesn't use 'self'.
- Break the logic for finding the flash controller into a separate
helper function
- Add doc-comments for the new functions
- Misc. other small clean-ups
generated_dts_board.conf and generated_dts_board_unfixed.h were verified
to be identical for disco_l475_iot1 and frdm_kw41z before and after the
cleanup.
Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
Moved and renamed ull_entropy_get to lll_entropy_get, placed under
vendor specific ll_sw. This is needed for SW implemented entropy,
to allow vendor implementation of faster, less secure random number
generator for randomizing ADV timing.
Signed-off-by: Morten Priess <mtpr@oticon.com>
Found a few annoying typos and figured I better run script and
fix anything it can find, here are the results...
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
The pinctrl property in the bindings is meaningless, lets remove it and
add a proper pinctrl property when we are ready.
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
The ARCH_CHOICE symbol on the arch/Kconfig choice for Architecture
selection, allows for multiple definitions of the choice group which
makes it possible for out-of-tree architectures to add entries to the
list as needed.
For example, in $(ARCH_DIR)/$(ARCH)/Kconfig by adding something like;
choice ARCH_CHOICE
config xARCH
bool "xARCH architecture"
endchoice
No functional change expected.
Signed-off-by: Danny Oerndrup <daor@demant.com>
Zephyr has two unrelated build _VERSIONs: KERNEL_VERSION and
BUILD_VERSION. Prefix them slightly differently in BOOT_BANNER so anyone
can instantly zoom in on which one is being used without having to
compare the implementation details of both.
Signed-off-by: Marc Herbert <marc.herbert@intel.com>
The way sanitycheck did its ordered regexes is that it would test
every regex against every line, and store the matching lines and their
regexes in an OrderedDict and check that they happened in the right
order.
That's wrong, because it disallows matching against a line that
previously appeared (and should have been ignored) in the input
stream. The watchdog sample is the best illustration: the first boot
will (by definition) contain all the output already, but the regex has
to match against a line from the SECOND boot and not the same one it
saw earlier.
Do this the simple way: keep a counter of which regex we're trying to
apply next and increment it on a match. This is faster too as we only
need to check one pattern per line.
Signed-off-by: Andy Ross <andrew.j.ross@intel.com>
This sample has to be operated manually (it's a USB DFU implementation
that needs to be plugged into a host to validate). Sanitycheck is
failing right now becuase it tries to flash and run it, and doesn't
see a harness declaration.
Set it to build_only when run under sanitycheck.
Signed-off-by: Andy Ross <andrew.j.ross@intel.com>
Right now this fails needlessly under sanitycheck for lack of a
harness declaration. It's short, just stuff in a simple regex check.
Signed-off-by: Andy Ross <andrew.j.ross@intel.com>
The regexes for the power states entered were in the wrong order, and
this tests takes 2 minutes to get to that point, blowing past the
default sanitycheck timeout.
Signed-off-by: Andy Ross <andrew.j.ross@intel.com>
There is a case where using startswith to determine if a path is a
subdirectory of another path can erroneously match. When using a
testcase root outside of ZEPHYR_BASE, an erroneous match will cause the
relative path containing ".." to get prepended to the test output
directory.
Example:
$HOME/zephyr/zephyr # ZEPHYR_BASE
$HOME/zephyr/zephyr-rust/tests # testcase root
The relative path prepended to the testcase name is ../zephyr-rust/tests
and an example test output dir is
./sanity-out/qemu_x86/../zephyr-rust/tests/rust/rust.main
In this case, the build directory escapes the board directory and is no
longer unique. Parallel tests then clobber each other.
Use pathlib instead of string matching to cover this case.
Signed-off-by: Tyler Hall <tylerwhall@gmail.com>
No-cache SRAM section is currently used for ARM-only builds
with support for no-cacheable memory sections (i.e.
CONFIG_ARCH_HAS_NOCACHE_MEMORY_SUPPORT) and it holds
uninitialized data. This commit properly defines the
corresponding linker section using SECTION_DATA_PROLOGUE
and GROUP_DATA_LINK_IN macros.
Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
We would like to test the HW stack protection feature in ARM
builds with no user-mode support, i.e. CONFIG_USERSPACE=n. For
that we add a new test-case in tests/kernel/fatal test suite.
Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
This test case is so timing sensitive that gathering code
coverage data screws up the results.
Since this is an abnormal execution environment anyway,
just skip the assertions if CONFIG_COVERAGE=y.
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
We didn't have any coverage of the system call handlers for
k_wakeup() and k_is_preempt().
Increase RAM requirements due to stack alignment constraints
on MPU platforms when user mode is enabled.
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
Fix how the tstacks array was declared extern so this
actually compiles on all platforms with user mode enabled.
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
The start of generated/cfb_font_dice.h looked like this:
/*
* This file was automatically generated using the following command:
* /home/john/zephyrproject/zephyr/scripts/gen_cfb_font_header.py
* --input fonts/dice.png --output
* /home/john/tmp/build/zephyr/include/generated//cfb_font_dice.h
* --width 32 --height 32 --first 49 --last 54
*/
For build reproduction and "privacy" reasons, change it to this:
/*
* This file was automatically generated using the following command:
* ${ZEPHYR_BASE}/scripts/gen_cfb_font_header.py
* --input fonts/dice.png --output
* zephyr/include/generated//cfb_font_dice.h
* --width 32 --height 32 --first 49 --last 54
*/
Test with:
sanitycheck -p reel_board \
-T $ZEPHYR_BASE/samples/display/cfb_custom_font/
Signed-off-by: Marc Herbert <marc.herbert@intel.com>
Add __ASSERT() for coverity issue CID: 198874. Assert is used instead
of check since this is callback we get from stm32cube.
Fixes#16573
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
YAML document separators are needed e.g. when doing
$ cat doc1.yaml doc2.yaml | <parser>
For the bindings, we never parse concatenated documents. Assume we don't
for any other .yaml files either.
Having document separators in e.g. base.yaml makes !include a bit
confusing, since the !included files are merged and not separate
documents (the merging is done in Python code though, so it makes no
difference for behavior).
The replacement was done with
$ git ls-files '*.yaml' | \
xargs sed -i -e '${/\s*\.\.\.\s*/d;}' -e 's/^\s*---\s*$//'
First pattern removes ... at the end of files, second pattern clears a
line with a lone --- on it.
Some redundant blank lines at the end of files were cleared with
$ git ls-files '*.yaml' | xargs sed -i '${/^\s*$/d}'
This is more about making sure people can understand why every part of a
binding is there than about removing some text.
Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
When advertising with different identities we need to flag any
programmed RPA as invalid if it was generated using a different
identity.
Fixes#16893
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
This array was created because more than 4 bytes were needed, however
now the minimum is 8 bytes, so we can use the net_buf user data
directly.
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
Commit b65fe62719 updated the minimum
required net_buf user data to 8 bytes, so increase this define as
well. It has no other practical purpose except to trigger build
asserts if the user data is for some reason ever decreased below this
minimum.
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
Some MPU systems require region power-of-two alignment
and can't automatically use remaining RAM for the newlib
heap. Set it for this case. Fixes this test on mps2_an385.
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
pyocd 0.21.0 provides pack support 'pack support' functionality,
as opposed to current 'buitlin support'.
This new feature enables the possibility to add pyocd support
for any chip that is documented in Keil database. Then one doesn't
need anymore to wait pyocd is updated with a new target to use
pyocd with his target, as long as it is populated in Keil database.
Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
The zephyr-file role creates a link to the GitHub copy of a file. Some
files have been moved so update the file references in the documentation
(found by scanning for uses of :zephyr-file:)
Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
Fix misspellings and doc issues missed during regular reviews (including
some files without a trailing newline)
Signed-off-by: David B. Kinder <david.b.kinder@intel.com>