In order to enable build of stm32f7 flash driver in sanitytests,
add nucleo_f746zg to flash_shell platform whitelist.
Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
If nvs sample is run once until max reboot value, the next time it is is
ran on the same board, it will not behave as expected as code will
read reboot counter set to max value and will stop there.
In order to avoid the operation to wipe the flash manually between
2 runs of the test, add a clean termination to the test by resetting
the reboot counter before exiting.
Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
Document building the samples with west (for now only in the Getting
Started guide).
Also switch to `reel_board` by default since `arduino_101` is no longer
well supported.
Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
Reference the multiple repository management section in the Getting
Started Guide, so that users have a direct link to the text describing
how multiple repositories are managed.
Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
On my build host (where apparently the Python has a different version
of yaml than CI) this test is producing schema faiulres from the YAML:
E: samples/drivers/counter/alarm/sample.yaml: can't load (skipping):
<SchemaError: error code 2: Schema validation failed:
- Value 'None' is not of type 'str'.
Path: '/tests/test/harness_config/regex/1'.: Path: '/'>
The bug seems to be that the regex must be a list of strings, and the
empty list element is being parsed as a python None. Just remove,
presumably the intent was an empty string, which is a noop in a regex
anyway.
Signed-off-by: Andy Ross <andrew.j.ross@intel.com>
The GMAC driver tries to ensure that it can always send a complete
Ethernet frame. However in the TX path this is the problem of the IP
stack: if the buffers can't be allocated, they won't be sent. Therefore
just drop the check.
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
Now that the RX packets are limited to the RX workqueue only, we can
reduce ETH_SAM_GMAC_BUF_RX_COUNT to 12 and still be able to receive a
full Ethernet frame. This reduces the minimum NET_BUF_RX_COUNT required
by this driver to 24.
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
This reverts commit afbee4c96a. The IP
stack has been fixed and does not use the RX packets or buffers to
transmit data.
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
The test assumes that the last to IRQ number will be free, this isn't a
valid assumption and now that we detect multiple ISRs registering for
the some IRQ line, we see failures because of this assumption on some
platforms. Exclude those platforms from this test for the time being.
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
Documentation for kconfigfunctions, mentions they look up elements
in "the DTS generated "conf" style database". This indication
could be cryptic for new zephyr users. Adding the exact name and
path of the file for disambiguation.
Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
The error message is obscure when CONFIG_PRIVILEGED_STACK_TEXT_AREA is
configured incorrectly. It looks like this:
zephyr/linker.cmd:73 cannot move location counter backwards (from
0000000000069bfc to 0000000000069bd8)
This patch re-writes the linker script mechanism in a (believed and
tested) semantically equivalent way such that it is possible to use an
assertion.
The assertion's error message now looks like this:
Memory region Used Size Region Size %age Used
FLASH: 503012 B 1 MB 47.97%
SRAM: 53760 B 256 KB 20.51%
IDT_LIST: 120 B 2 KB 5.86
real-ld: The configuration system has incorrectly set
'CONFIG_PRIVILEGED_STACK_TEXT_AREA' to
128, which is not big enough. You must
through Kconfig either disable 'CONFIG_USERSPACE', or set
'CONFIG_PRIVILEGED_STACK_TEXT_AREA' to a value larger than
128 .
collect2: error: ld returned 1 exit status
Signed-off-by: Sebastian Bøe <sebastian.boe@nordicsemi.no>
For networking code, it does not make sense to have zero net_buf
or net_pkt instances. Make sure this is enforced by code.
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
pkt->buffer is represented by 1+ net_buf. If some are unused, this will
deallocates them.
This situation can happen on TCP where net_pkt allocator evaluates the
header size to its maximum size. Which space might not be (fully) used
in the end. On fixed data size buffer, this might end up by having last
buffer(s) not bein used. So better removing those.
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
UDP was the only one doing the right thing. Let's generalize it
relevantly.
Fixes#13211
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
This will take into account the family and the protocol, as well as
existing buffer occupation, to return the available buffer space that
can be used for payload.
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
If a socket is in EOF, it's readable (so client can read() it, get 0
in return, figure it's in EOF, and close it). Without this change, we
had peer-closed sockets leaked (ignore) by poll() and select().
Signed-off-by: Paul Sokolovsky <paul.sokolovsky@linaro.org>
DNS callback needs "struct shell *shell" data structure to pass as
a parameter to shell print. How it was achieved previously is that
it was packaged together with cosmetic "bool first" param into
"struct net_shell_user_data" on the stack, and passed to the
callback. The problem was that the original command handler then
returned, so the "struct net_shell_user_data" on the stack was
overwritten, and the callback crashed on accessing it.
An obvious solution was to make that structure static, but that would
leave to issues still, as turns out we allow system shell to be run
as more than one concurrent instances.
Next solution was to keep this structure on the stack, but block the
command handler until callback is finished. However, that hit a
deadlock due to not well thought out use of a mutex in the shell
printing routines.
The solution presented here is due to @nordic-krch, who noticed that
"bool first" param is indeed cosmetic and not really required. Then
we have only "struct shell *shell" to pass to the callback, and can
do that in callback's pointer param directly, ditching
"struct net_shell_user_data" which needs to be stored on the stack.
Signed-off-by: Paul Sokolovsky <paul.sokolovsky@linaro.org>
Following configuration options are not supported by STM32
gpio driver:
-GPIO_INT_LEVEL
-GPIO_POL_INV
Return an error when one of these is requested.
Fixes#12766
Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
This commit adds specific stm32 CAN driver testing.
The test covers filter handling.
Signed-off-by: Alexander Wachter <alexander.wachter@student.tugraz.at>
This commit makes the stm32 CAN driver more readable and fix
a bug where the usage and rx_response array are not shifted correctly.
Signed-off-by: Alexander Wachter <alexander.wachter@student.tugraz.at>
_arch_configure_dynamic_mpu_regions() may re-program the MPU
Stack Guard, to guard the privilege stack for overflows,
(if building with option CONFIG_MPU_STACK_GUARD). There is a
risk of actually overflowing the stack while doing the
re-programming. We minimize the risk by placing the
re-programming function immediately after we have switched to
the privileged stack so that the whole privilege stack area is
available for this critical operation.
Note that the risk for overflow is higher if using the normal
thread stack, since we do not control how much stack is actually
left, when user invokes _arm_userspace_enter().
Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
This commit moves the clearing of PSPLIM before determining the
privilege stack start and size. In this way the clearing can be
done without unnecessary pushing and popping r3 core register.
Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
This commit provides two fixes for the ARMv8-M built-in stack
protection in userspace.S. First, it clears the PSPLIM register
before setting the PSP to the privileged stack. In the wake of
this, the privilege stack area can now be positioned enywhere,
i.e. does not have to be above the user stack area. Second, it
removes unncessary push/pop when clearing the PSPLIM register,
upon returning from the system call, since the r3 register is
not used anymore in this routine.
Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
Fixing the documentation for ARM core __svc function, which was
outdated and present only for the ARMv7-M version.
Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
Minor style (syntax) fix in the help text of symbol
config EXECUTION_BENCHMARKING.
Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
Stacking r3 at this point is not required as the register value
is not used afterwards, therefore, it does not need to be
retained.
Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
Due to code re-organization inside __pendSV(), the stacking
and unstacking of scratch registers around the invocation of
read_timer_end_of_swap() is no longer required.
Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
Fix compile error due to missing conditional compile of
connection related code when selecting only observer state
support.
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
Nios2 platform was disabled due to compilation error. Meanwhile,
issue has been solved and tests can be re-enabled.
Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
The Kconfig symbol is CONFIG_LOG_DEFAULT_LEVEL not
CONFIG_LOG_DEFAULT_LOG_LEVEL. Fix references in comments to the actual
Kconfig symbol name.
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
CONFIG_DISC_LOG_LEVEL Should be CONFIG_DISK_LOG_LEVEL. In cleaning
this up use LOG_MODULE_REGISTER(x,y) form to reduce 2 lines to 1.
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
LOG_LEVEL should be set to CONFIG_PWM_LOG_LEVEL not
CONFIG_LOG_PWM_LEVEL. In cleaning this up use
LOG_MODULE_REGISTER(x,y) form to reduce 2 lines to 1.
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
LOG_LEVEL should be set to CONFIG_MODEM_LOG_LEVEL not
CONFIG_LOG_MODEM_LEVEL. In cleaning this up use
LOG_MODULE_REGISTER(x,y) form to reduce 3 lines to 1.
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
This commit changes the names of SYS_POWER_DEEP_SLEEP* Kconfig
options in order to match SYS_POWER_LOW_POWER_STATE* naming
scheme.
Signed-off-by: Piotr Zięcik <piotr.ziecik@nordicsemi.no>
The SYS_POWER_LOW_POWER_STATE_SUPPORTED and SYS_POWER_LOW_POWER_STATE
suggests one low power state but these options control multiple
low power state. This commit uses plural in the names to indicate
that.
Signed-off-by: Piotr Zięcik <piotr.ziecik@nordicsemi.no>
When generating instructions for both west and CMake, use paragraphs and
literal blocks for better layout.
Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
Overhaul the application extension in order to modularize its structure
and add support for building, flashing and debugging with west.
Both west and CMake are now supported, even at the same time, in which
case instructions for both will be generated.
Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
Correct the handling of the HOST_OS list so that we do not insert an
extra line break because of the 'all' entry and we correctly insert the
required comment.
Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>