The different linker steps are all hardcoded to the output filename
"zephyr.map" and only the last one survives.
Un-harcode.
This removes some confusion when trying to follow who builds
what/when/how and it stops destroying intermediate linking information
useful when tracing/debugging new features or issues in the build.
Signed-off-by: Marc Herbert <marc.herbert@intel.com>
This allows for printing long long values. Because the code size
increase may be significant, this is made optional on 32-bit targets.
On 64-bit targets this doesn't change the code much as longs and
long longs are the same size so it is always enabled in that case.
The test on MAXFLD has to be adjusted accordingly. Yet, its minimum
value wasn't large enough to store a full-scale octal value, so this
is fixed as well.
Signed-off-by: Nicolas Pitre <npitre@baylibre.com>
On 64-bit systems the most notable difference is due to longs and
pointers being 64-bit wide. Therefore there must be a distinction
between ints and longs. Similar to the prf.c case, this patch properly
implements the h, hh, l, ll and z length modifiers as well as some small
cleanups.
Signed-off-by: Nicolas Pitre <npitre@baylibre.com>
This commit adds a test in tests/kernel/fatal test-suite, which checks
that the HW stack overflow detection works as expected during a user
thread system call.
Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
In order to expose west to the majority of users, default to 'all'
instead of 'cmake' in the 'tool' option. This means that, unless
otherwise specified, build instructions will be generated for both west
and cmake by default.
Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
Clean up some stray references to cmake in doc, boards and
samples that don't make explicit use of the zephyr app extension,
as well as other minor doc fixes.
Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
In order to simplify the current implementation and to prepare for a
change where we default to west as the standard build tool, partially
refactor the generation of cmake-based build instructions:
- Introduce `cd-into` as boolean flag that controls whether build
instructions are generated from the current working directory or from
inside the actual app folder. In the case of cmake, this includes
changing into the build folder to run ninja or make.
- Default to building from the current working directory, in the case of
cmake using the `-B` flag to create the build folder.
- Remove the usage of ZEPHYR_BASE with the `zephyr-app` option.
The option itslef is kept fsince it has semantic value, and a comment is
added when used.
- Consolidate the _generate_make and _generate_ninja functions into a
common code block inside _generate_cmake.
Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
Remove unused definition of MEMDOMAIN_ALIGN_SIZE macro
from include/app_memory/app_memdomain.h.
Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
In ARM architecture z_priv_stack_find() returns the start of a
thread's privilege stack; we do not need to subtract the length
of a (possible) stack guard. This commit corrects the assigning
of the start address of a thread privilege stack in
test/kerne/mem_protect/mem_protect/userspace.
Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
Clarify the last matching rule, as it is not too intuitive
(developers may have expected that all matching regexes would
be added as code owners)
Signed-off-by: Alberto Escolar Piedras <alpi@oticon.com>
Fix pending Tx control buffer leak on supervision timeout.
Queued tx buffers in LLL consists of both data and control
PDUs but only data buffers got correctly released.
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
Add self.require() checks before running commands. Increase test
coverage, including for this feature, while we are here.
Signed-off-by: Marti Bolivar <marti.bolivar@nordicsemi.no>
The runners/jlink.py script has a mechanism for erroring out if a host
tool is not installed. Abstract it into runners/core.py and handle it
from run_common.py. This will let it be used in more places.
Signed-off-by: Marti Bolivar <marti.bolivar@nordicsemi.no>
This makes it safe to allocate buffer from the TX callback by freeing
the context before calling the callback which should wake up the TX
thread had it be pending on add_pending_tx.
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
Some files cleanup was overlooked when STM32 clock_control
was re-factored in #16486.
Fix this by removing the now superfluous files.
Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
stm32mp1 was adding a STM32 specific Core selection Kconfig
symbol while zephyr generic CPU_CORTEX_M4 could be used for the
same purpose.
Remove STM32 specific symbol and use generic one.
Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
Get spi hci driver to define its own rx thread, in order
not to mix with bt own RX thread as driver use bt_recv_prio
that expect to be used in a different thread than BT host one.
Fixes#15714
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
Add new option --report-excluded to list all those tests with bad
filtering that never build or run. This option produces accurate results
with --all but can be used with default sanitycheck options to see what
does not run/build in CI for example. (limited coverage).
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Check the CONFIG_BUILD_OUTPUT_HEX and CONFIG_BUILD_OUTPUT_BIN options
are enabled before attempting to build signed versions of these formats.
Signed-off-by: Marti Bolivar <marti.bolivar@nordicsemi.no>
Add more error handling and warnings. Doing this nicely requires a bit
of re-work to the control flow.
Signed-off-by: Marti Bolivar <marti.bolivar@nordicsemi.no>
When signing binaries from multiple build directories, it is
inconvenient to have to specify the output file locations by hand each
time. It's also a little weird that they're not next to zephyr.bin and
zephyr.hex.
Move them to the build directory, next to their unsigned variants.
Suggested by Piotr Mienkowski.
Signed-off-by: Marti Bolivar <marti.bolivar@nordicsemi.no>
Let's leave self.args as the actual parsed argument namespace.
Pass the final computed build directory separately.
Signed-off-by: Marti Bolivar <marti.bolivar@nordicsemi.no>
This got broken in the patches which added the build.dir-fmt config
option when BUiLD_DIR_DESCRIPTION was renamed.
Signed-off-by: Marti Bolivar <marti.bolivar@nordicsemi.no>
Clean up the code a bit:
- Simplify the loops over the flash 'reg' properties by using range()
- Build identifier names with a plain .format() where possible. This
makes them stand out better in the code.
- Remove redundant variables
- Move variables close to where they're used
- Misc. other minor improvements
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>
* Fix white space in phy.yaml
* Fix property name in st,stm32-usbphyc.yaml and usb-nop-xceiv.yaml to
use "#phy-cells" and not "phy-cells"
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
Introduce uint8-array type for local-mac-address as we need to
distinguish it from 'array' meaning a uint32 array.
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
DT_ALIAS_<ALIAS>_<PROP> defines are a convenient and portable way to get
the device instance name despite different naming conventions used by
the device drivers.
Signed-off-by: Piotr Mienkowski <piotr.mienkowski@gmail.com>
The driver was using a mix of instance defines and alias, move to just
using the alias defines so its consistent.
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
Change code from using now deprecated DT_<COMPAT>_<INSTANCE>_<PROP>
defines to using DT_INST_<INSTANCE>_<COMPAT>_<PROP>.
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
This API had several issues:
- The parameter types and order were inconsistent with e.g.
bt_le_adv_start()
- There were no real users of num_params, which just caused increased
code size and memory consumption for no good reason.
- The error handling policy was arbitrary: if one of the
notifications would fail it would be impossible for the caller to
know if some notifications succeeded, i.e. at what point the
failure happened. Some callers might also want to make note of the
failure but continue trying to notify for the remaining parameters.
The first issue is easily fixable, but because of the other two I
think it's best we don't have this code as part of the stack, rather
require whoever needs it to do the for loop themselves. It's just a
few lines of code, so the benefit of having this in the stack was
anyway quite minimal.
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
The DT spec. only has "okay" and not "ok". The Linux kernel has around
12k "okay"s and 300 "ok"s.
The scripts/dts scripts only check for "disabled", so should be safe re.
those at least.
The replacement was done with
git ls-files | xargs sed -i 's/status\s*=\s*"ok"/status = "okay"/'
Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
* Rename stringlist to string-array to be closer inline with upstream
dtschema definitions.
* Add string-array to the device_node.yaml.template
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
This option uses a lot of typing, so point out there's a way to save
keystrokes using -C.
Tweak the language around the target toolchain.
Signed-off-by: Marti Bolivar <marti.bolivar@nordicsemi.no>
Make it clearer that the note about setting QEMU_BIN_PATH only applies
if you've got the Zephyr SDK installed.
Signed-off-by: Marti Bolivar <marti.bolivar@nordicsemi.no>
There are a few different places where alternatives for setting
environment variables are described. None of them is 100% complete, so
the results are likely to be confusing.
Make a single page on setting environment variables, how the zephyrrc
files work, how the zephyr-env scripts work, and some of the important
environment variables, with appropriate references elsewhere. (This is
inspired by the Arch wiki's excellent page on installing programs.)
Link to it from the getting started and application development pages
instead of repeating the information. This has the benefit of
shortening the getting started guide a bit more.
Add some concrete advice on checking the toolchain environment
variables in particular. This is a stumbling block for beginners.
Signed-off-by: Marti Bolivar <marti.bolivar@nordicsemi.no>
Updates based on discussion and changes in supported features.
- Make the guide shorter by removing content that's not relevant to
most users who are truly just getting started, such as information
about pre-LTS versions that did not support west, and by being more
concise in some places.
- Decrease the number of colored boxes. At the latest TSC F2F, the
"note / warning / note / tip" contents were identified as a
readability problem.
- Add additional information based on new west features, like "west
boards".
Signed-off-by: Marti Bolivar <marti.bolivar@nordicsemi.no>
We not analysing coverage data at all in CI right now. Disable this
while we figure out a better solution for reporting data.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>