Extend storage_dev type beyond 'struct device' by changing
the variable type to void pointer. This will be needed if we
have additional transactional layers b/w filesystem and the
actual backend device.
Signed-off-by: Ramakrishna Pallala <ramakrishna.pallala@intel.com>
- Some tests start with test_, some do not, so make sure we parse both.
- Parse skipped tests
- Improve handling of test case identifier
- Handle Exceptions in device handler
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
We are passing global arguments from one level to the next when those
variables are available globally. Reduce the arguments and remove unused
arguments as well.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
init class in one place, no need to duplicate all class members in every
subclass.
run_log is not needed in the handler class.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Parse the test results and create a test report with more granular
results that can be imported to into test management/reporting system.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
This will allow us to run sanitycheck on real devices and get reporting
out of it the same way we do that with Qemu.
To use this, run sanitycheck with the following new options:
scripts/sanitycheck --device-testing --device-serial /dev/ttyACM0 -p
frdm_k64f -T tests/crypto/
--device-serial denotes the serial device the board is connected to.
This needs to be accessible by the user running sanitycheck. You can
run this on one board only at a time, the board is specified using the
--platform option.
This was tested with only a few boards, some board will not work
because how they reset the serial device during flashing.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Until now, Zephyr has used a patched Kconfiglib that turns 'source' into
a globbing source (by replacing 'source' with 'gsource' at the token
level). There's two problems with this:
- The patch needs to be maintained separately
- Misspelled filenames are silently ignored, as they look like glob
patterns that don't match anything
Fix it as follows:
1. Replace all 'source' statements that use wildcards with 'gsource'
2. Remove the custom Kconfiglib patch so that 'source' no longer globs
The sed pattern '/source.*[*?]/s/source/gsource/' was run over all
Kconfig* files to do the replacement.
source's that use environment variables that might contain glob patterns
were manually changed to gsource.
Building the docs in doc/ is a good test, as doc/Makefile deliberately
sets the environment variables to glob up as many Kconfig files as
possible.
Signed-off-by: Ulf Magnusson <ulfalizer@gmail.com>
num_entries can be as large as 255. However, based on the
_ti_adc108s102 implementation, num_entries must be less than
ADC108S102_CMD_BUFFER_SIZE or the cmd_buffer[] and
sampling_buffer[] arrays in the data struct could overflow.
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
Channel IDs start at 0, need to fail if the provided ID
equals ADC108S102_CHANNELS, not just larger than it.
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
The line control value could result in a baud divisor of zero.
Check this condition and return -EINVAL if that is the case.
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
The pinmux subsystem does not have any API documenation. Currently
none of the existing pinmux drivers do any kind of input validation
for the pin/op parameters, which has been shown to allow the caller
to access unauthorized memory, up to and including disabling the
MPU.
This requires a proper specification for the pinmux subsystem and
also modification of existingd drivers to validate arguments on a per
driver basis. Remove user mode access until #7390 is resolved.
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
Remove the C Kconfig tools and various scripts associated with them.
scripts/kconfig/diffconfig is popular, so keep it.
I don't know whether anyone is using scripts/kconfig/config. Remove it
and see if anyone screams.
scripts/kconfig/streamline_config.pl deals with modules ('m' values) and
can safely be removed. Zephyr's Kconfig files do not use modules.
Signed-off-by: Ulf Magnusson <ulfalizer@gmail.com>
They will no longer be available once the C Kconfig implementation is
removed.
oldconfig and allno/yesconfig implementations are available for
kconfiglib and could be added later if needed. savedefconfig (minimal
configuration generation) is available from the menuconfig.py
configuration interface.
cmake/usage/kconfig-usage.cmake becomes kinda pointless after this
change, so merge it into cmake/usage/usage.cmake.
Remove the kconfig_target, COMMAND_FOR_*, and COMMAND_RUNS_ON_WIN_*
CMake variables, as there's just the 'menuconfig' target now.
Signed-off-by: Ulf Magnusson <ulfalizer@gmail.com>
The new menuconfig implementation needs it when run on Windows.
Use an environment marker to only install windows-curses on Windows. See
https://www.python.org/dev/peps/pep-0508/#id23.
From some googling, sys_platform might be more widely supported than
platform_system, so use that.
Suggested-by: Sebastian Bøe <sebastian.boe@nordicsemi.no>
Signed-off-by: Ulf Magnusson <ulfalizer@gmail.com>
Update the Application Development Primer to describe the new menuconfig
configuration interface:
- Update the section explaining how the configuration is navigated,
changed, and saved
- Add a section explaining how to jump directly to a symbol in the
configuration interface
- Replace mconf screenshots with menuconfig.py screenshots. Remove some
screenshots that are no longer used.
- Remove the section explaining how to load arbitrary .config files
from within the configuration interface. That feature hasn't been
implemented yet in menuconfig.py.
- Do various minor language cleanup
Signed-off-by: Ulf Magnusson <ulfalizer@gmail.com>
Make 'make/ninja menuconfig' run menuconfig.py instead of mconf from the
C Kconfig tools. Get rid of the 'pymenuconfig' target.
Signed-off-by: Ulf Magnusson <ulfalizer@gmail.com>
Pressing [/] brings up a dialog with an edit box where a regex can be
entered. The list of matching symbols is always shown below it.
Selecting a symbol and pressing [Enter] jumps directly to it in the menu
tree. If the symbol is invisible, show-all mode is turned on
automatically.
This commit also includes a bunch of more-or-less unrelated changes from
poking around with the code:
- Some redundant styles were merged. Probably wouldn't want to have a
different style for each separator line, for example...
- [ESC] in the top menu now works like [Q]
- Returning to a parent menu now makes sure that the selected row is
visible, even if the terminal was shrunk between entering the child
menu and leaving it.
- A _max_scroll() helper was factored out to reduce code duplication.
It takes a list of items and a window in which the list is
displayed, with one row per item, and returns the minimum scroll
value that will make the final item visible.
- The save dialog now pops up a message to confirm that the save was
successful.
- Lots of minor code nits all over (renamings, etc.)
Signed-off-by: Ulf Magnusson <ulfalizer@gmail.com>
Also parse test documentation. When add tests to doxygen, we get
warnings about device.h macros not being defined. Exclude this now and
track this in issue #7367.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
For many tests, avoid splitting into files and put eveything in main.c.
For many of the tests, use main.c as the test source file to keep things
consistent.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Calling POSIX exit() function in Zephyr w/newlib leads to printing
"exit" to stdout followed by infinite loop. That message was
printed without a newline though, leading to confusing artifacts
in the console output.
Signed-off-by: Paul Sokolovsky <paul.sokolovsky@linaro.org>
This commit activates the built-in stack guard on the main_thread
before jumping to it upon system initialization. Stack guard is
activated if BUILTIN_STACK_GUARD is enabled by the user. The
commit also activates built-in thread stack guards at every
context switch, if BUILTIN_STACK_GUARD enabled by the user.
Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
Ignore stack pointer limit checking during a HardFault or NMI
exception, to allow for the Fault handling function to execute
properly.
Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
This commit implements the build-in interrupt stack protection
via the native MSPLIM register in ARMv8-M MCUs that support the
Main Extension. Main stack pointer overflows will cause Stack
Overflow UsageFaults. In addition, the commit introduces a new
config option, BUILTIN_STACK_GUARD, allowing the user to enable
and use the built-in stack protection in ARMv8-M firmware.
Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
Enable settings and increase the system workqueue size to deal with
the stack usage. This also makes it possible to test unpairing support
with the shell's 'clear' command.
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
There's a bit of unnecessary space in the bt_keys struct. Re-design
some fields for a more compact format, which is particularly helpful
now that the struct gets stored as-is to flash through the settings
API.
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
Integrate the bt_keys submodule with bt_settings. Add a new
bt_keys_store() API to write keys to flash, and extend the existing
bt_keys_clear() to remove the keys from flash.
Along with this, add some helpers for genrating settings key values
containing a bluetooth address, as well as for decoding them to get
the binary bt_addr_le_t.
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
Add a new linker section for a list of submodule settings handlers,
and iterate the list from the various settings callbacks.
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
The same functionality is now supported by the settings-based
solution, so remove bt_storage out of the way. There were stubs in
bt_storage to handle per-peer information (e.g. pairing keys) but this
was never actually implemented in full. The next step is to add this
support to the settings-based solution.
Leave the code for generating temporary IRK and identity address in
case BT_SETTINGS is not enabled. Also leave the code for using vendor
HCI to read the identity address, in which case the settings
implementation will not touch it.
Introduce a new bt_unpair() API to replace the removed
bt_storage_clear(), since the latter was actually doing more than just
storage management: it was also handling runtime storage of pairing
information. Later, the bt_unpair() implementation will be extended to
clear settings-based pairing storage.
There is one feature that the bt shell module looses: the ability to
give a specific identity address to the "init" command as a parameter.
We might look later in the future if this is really needed, and add a
separate API for this.
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>