We add an ARM internal API which allows the kernel to
infer the execution mode we are going to return after
the current exception.
Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
We introduce a Kconfig option to signify whether
an Architecture has the capability of detecting
whether execution is, currently, in a nested
exception.
Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
We re-implement the z_arch_is_in_isr function
so it aligns with the implementation for other
ARCHEs, i.e. returning false whenever any IRQ
or system exception is active.
Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
This commit refactors and cleans up __fault, so the function
- reduces to supplying MSP, PSP, and EXC_RETURN to the C
function for fault handling
- simplifies itself, removing conditional
implementation, i.e. based on ARM Secure firmware,
The reason for that is simple: it is much better to write the
fault handling in C instead of assembly, so we really do only
what is strictly required, in assembly.
Therefore, the commit refactors the z_arm_fault() function
as well, organizing better the different functional blocks,
that is:
- unlocking interrupts
- retriving ESF
- asserting for HW errors
- printing additional error logs
The refactoring unifies the way the ESF is retrieved for the
different Cortex-M variants and security execution states.
Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
Add some documentation for ARM-specific function
z_do_kernel_oops, stating clearly that it is only
invoked inside SVC context. We also comment on
the validity of the supplied ESF.
Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
We add a useful inline comment in the SVC handler (written in
assembly), which identifies one of the function return points
a bit more clearly.
Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
Remove the documentation that incorrectly says that DT uses
Kconfig. DT no longer has access to Kconfig symbols.
Signed-off-by: Sebastian Bøe <sebastian.boe@nordicsemi.no>
Remove the common.dts file which has been used for a year.
common.dts at one point allowed us to conditionally add an MCUBoot
overlay based on Kconfig.
but since DT lost access to Kconfig options it has been unused.
The overridable variable DTS_COMMON_OVERLAYS, which by default points
to common.dts, is also unused in-tree, and any out-of-tree usage can
be ported over to use DTC_OVERLAY_FILE instead, so we remove the
variable as well.
This simplifies the configuration system.
Signed-off-by: Sebastian Bøe <sebastian.boe@nordicsemi.no>
Replace:
dt_chosen_reg_addr
dt_chosen_reg_size
dt_node_reg_addr
dt_node_reg_size
with:
dt_chosen_reg_addr_int
dt_chosen_reg_size_int
dt_chosen_reg_addr_hex
dt_chosen_reg_size_hex
dt_node_reg_addr_int
dt_node_reg_size_int
dt_node_reg_addr_hex
dt_node_reg_size_hex
So that we get the proper formatted string for the type of symbol.
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
The build scripts for the tests/crypto/rand32 test has been invoking
'zephyr_include_directories' in an invalid way. They have presumably
been trying to modify the 'app' library, but have in effect being
modifying the global environment, in an invalid way nonetheless.
This patch fixes the build script to modify the 'app' library only.
Signed-off-by: Sebastian Bøe <sebastian.boe@nordicsemi.no>
"brk" is a break-point instruction which among other things
halts ARC core. As compared to pure halt (which is "flag 1" for ARC)
it is much more convenient as it might be executed from either
secure mode or normal mode (with SecureShield enabled), while "flag"
instruction will raise privilege violation exception if SecureShield
is enabled and we're in "normal" mode.
Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com>
According to the comment in #20008 I found out that some test cases
for different tests have same names.
To get rid of it, I decided to change test cases names.
Signed-off-by: Maksim Masalski <maksim.masalski@intel.com>
According to the comment in #20008 I found out that some test cases
for different tests have same names.
To get rid of it, I decided to change test cases names.
Signed-off-by: Maksim Masalski <maksim.masalski@intel.com>
According to the comment in #20008 I found out that some test cases
for different tests have same names.
To get rid of it, I decided to change test cases names.
Signed-off-by: Maksim Masalski <maksim.masalski@intel.com>
According to the comment in #20008 I found out that some test cases
for different tests have same names.
To get rid of it, I decided to change test cases names.
Signed-off-by: Maksim Masalski <maksim.masalski@intel.com>
After run Sanitycheck script I found out that some test cases
have the same test case name in the test result .xml file.
To get rid of it, I decided to change test cases names
for the kernel tests.
Signed-off-by: Maksim Masalski <maksim.masalski@intel.com>
According to the comment in #20008 I found out that some test cases
for different tests have same names.
To get rid of it, I decided to change test cases names.
Signed-off-by: Maksim Masalski <maksim.masalski@intel.com>
This commit adds sample code for bus state checking.
Printing the counter state is moved to own thread because the
ISR was blocking too long (messages were lost)
Signed-off-by: Alexander Wachter <alexander.wachter@student.tugraz.at>
This commit extends the CAN API with the following functions:
- can_get_state
- can_recover
- can_register_state_change_isr
This functions can be used to get the error-counters and the state
of the CAN controller. The recover function can be used to recover
from bus-off state when automatic recovery is disabled.
Signed-off-by: Alexander Wachter <alexander.wachter@student.tugraz.at>
Should be within the 'if BOARD_NATIVE_POSIX`, or USB_NATIVE_POSIX will
get enabled whenever USB is (unless a user value overrides it).
Probably didn't cause any problems, since
boards/posix/native_posix/Kconfig.defconfig is only included for this
board.
Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
Some test cases have the same test case name.
To get rid of it, I decided to change test cases names
contained same names.
Please check my logic, how I give them names.
Usually trying to give name same as a directory folder.
There are still more test cases which necessary to change,
but I will make changes by small steps.
Signed-off-by: Maksim Masalski <maksim.masalski@intel.com>
Test case arch.interrupt have same test case name
for different architectures. To get rid of it,
I decided to change test cases names.
Signed-off-by: Maksim Masalski <maksim.masalski@intel.com>
The k_thread_state_str is a new function added into
kernel/thread.c recently which was used to return
the human friendly thread state, so it hasn't been
called by other existing code.
In order to improve the function code coverage, we
just replace the "th->base.thread_state & _THREAD_PENDING"
code by using k_thread_state_str function in
tests/kernel/sched/preempt/src/main.c, because
k_thread_state_str function is realized by judging
the thread_state member to return the thread state.
Signed-off-by: peng1 chen <peng1.chen@intel.com>
Some of this information is stale and needs to be fixed.
Try to make a few other things clearer while we're here.
Signed-off-by: Marti Bolivar <marti.bolivar@nordicsemi.no>
Flash page layout API was omitted by documentation as it
is optional.
Added tag which turn it on to doxygen setup which allows
to include missing API documentation.
Signed-off-by: Andrzej Puzdrowski <andrzej.puzdrowski@nordicsemi.no>
Configure the pin connected to edge LED as PWM output.
On the new board version 1507.3 this pin also controls a buzzer.
Signed-off-by: Johann Fischer <j.fischer@phytec.de>
Charles Youse (@gnuless) has left the organization. I will be
taking over most of his areas of ownership, with Daniel minding
the DW I2C driver.
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
save_reports should be one of the last tasks executed because it
closes the log file. Withouth it, other functions that use debug
functions like info and error will try to write into a close file.
This fixes the following problem:
sanitycheck -x=USE_CCACHE=0 -p native_posix -T samples/hello_world/ -b
-N --log-file sanity.log
JOBS: 8
Building initial testcase list...
1 test configurations selected, 0 configurations discarded due to filters.
Adding tasks to the queue...
total complete: 1/ 1 100% skipped: 0, failed: 0
1 of 1 tests passed (100.00%), 0 failed, 0 skipped with 0 warnings in
2.91 seconds
Traceback (most recent call last):
File "./zephyr/scripts/sanitycheck", line 3866, in <module>
main()
File "./zephyr/scripts/sanitycheck", line 3854, in main
suite.summary(options.disable_unrecognized_section_test)
File "./zephyr/scripts/sanitycheck", line 2306, in summary
self.duration))
File "./zephyr/scripts/sanitycheck", line 432, in info
log_file.write(what + "\n")
ValueError: I/O operation on closed file.
Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
Now that everything is DT based for I2C drivers we can rename the
CONFIG_I2C_[0..5]_NAME define to DT_I2C_[0..5]_NAME.
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
Now that all I2C drivers utilize DTS we can select HAS_DTS_I2C in a
common place and don't need to do it per driver.
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
Move to using DT define instead of a Kconfig param, also remove unused
I2C Kconfig params for this test.
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
When DT sources change CMake must be run again. CMake is currently
detecting changes to DT source files that we manually specify, but not
sources that are included through use of the preprocessor.
This patch makes the preprocessor output the includes used and adds
them to the 'CMAKE_CONFIGURE_DEPENDS' property.
This fixes#16791.
Signed-off-by: Sebastian Bøe <sebastian.boe@nordicsemi.no>
Added a function that can parse the dependency information given when
invoking gcc with the argument '-M'. This could be used to manually
add dependencies detected when preprocessing a file.
Signed-off-by: Sebastian Bøe <sebastian.boe@nordicsemi.no>
This commit adds an macro to allow UUID 128
to be written in more user-friendly form.
UUID in 128 bit form requires an array creation.
To complicate the whole thing - it requires the array to start from LSB,
so using the readable form, we have to write it down backwards.
Old way to declare example UUID 6E400001-B5A3-F393-E0A9-E50E24DCCA9E:
0x9E, 0xCA, 0xDC, 0x24, 0x0E, 0xE5, 0xA9, 0xE0,
0x93, 0xF3, 0xA3, 0xB5, 0x01, 0x00, 0x40, 0x6E
A form provided by this commit:
BT_UUID_128_ENCODE(0x6E400001, 0xB5A3, 0xF393, 0xE0A9, 0xE50E24DCCA9E)
Signed-off-by: Radoslaw Koppel <radoslaw.koppel@nordicsemi.no>
Update board dts files to add User LED and Button support. Also update
the board yaml file to say the boards support gpio.
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>