Add support for usbotg_fs, by adding the DT fixup, pinmux macros,
and the DT entries in stm32f2.dtsi.
Signed-off-by: Istvan Bisz <istvan.bisz@t-online.hu>
Instead of having just one static "UART console" device, allow to
instantiate buffered, interrupt-driven POSIX-like "tty" wrapper for
any underlying device. Then, use this functionality to provide
compatible "console API".
Signed-off-by: Paul Sokolovsky <paul.sokolovsky@linaro.org>
In order to be able to place the generated HTML content directly in a
folder of the user's choice, make the Sphinx HTML output folder
configurable.
Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
PTS test cases MESH/NODE/TNPT/BV-07-C, MESH/NODE/TNPT/BV-12-C, requires
to receive 8 segment of data which summary requires 108 bytes of SDU.
This patch make test cases PASSing.
Signed-off-by: Grzegorz Kolodziejczyk <grzegorz.kolodziejczyk@codecoup.pl>
Thise uses the new net_pkt_append_memset() function to generate the
required zero filling instead of calling net_pkt_append_u8() in loops.
Fixes#9287
Signed-off-by: Daniel Egger <daniel@eggers-club.de>
Some locations like DHCPv4 client create a prefilled packet by appending
new fragments in a loop with one byte each via net_pkt_append_u8() which
is wasteful and noisy. This patch adds the new functions
net_pkt_append_memset() which creates fragments as needed in the desired
size and initialises it to the specified value.
This change also adds a unittest for the new function.
Prerequisite for #9287
Signed-off-by: Daniel Egger <daniel@eggers-club.de>
Echo server crashes upon reception of fragmented packets. This
occurs when fragmentation is enabled with the default prj.conf
of echo server. The cause is that by default with logs disabled
net_sprint_ipv6_addr returns NULL.
Signed-off-by: Ruslan Mstoi <ruslan.mstoi@intel.com>
Commit ac92a01f5a changed the net_ipv6_hdr
definition. The ieee802154 fragment test wasn't updated to match this
change.
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
There exist two symbols that became equivalent when PR #9383 was
merged; _SYSCALL_LIMIT and K_SYSCALL_LIMIT. This patch deprecates the
redundant _SYSCALL_LIMIT symbol.
_SYSCALL_LIMIT was initally introduced because before PR #9383 was
merged K_SYSCALL_LIMIT was an enum, which couldn't be included into
assembly files. PR #9383 converted it into a define, which can be
included into assembly files, making _SYSCALL_LIMIT redundant.
Likewise for _SYSCALL_BAD.
Signed-off-by: Sebastian Bøe <sebastian.boe@nordicsemi.no>
Commit 8525944c54
tests: power: refactor power_states test
Re-introduced CONFIG_ARC_INIT=n that isn't required and causes build
errors for sanitycheck.
Fixes#9444
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
Rather than having some implied name for the logging name, explicitly
pass it in the macros LOG_MODULE_REGISTER & LOG_MODULE_DECLARE.
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
This commit is a fix for Issue #8226
- Error flags are assigned to the correct mailbox now.
- set_filter_mutex is moved from can_stm32_attach to the wrappers
can_stm32_attach_isr and can_stm32_attach_msgq. This protects
response_type variable.
- Waiting for empty mailbox semaphore return value
is checked for none zero values to check all error states.
- The mailbox tx_int_sem is reset before the sending is triggered.
Signed-off-by: Alexander Wachter <alexander.wachter@student.tugraz.at>
The error is detected if USART1 TX configured to PA9 and RX to PA10.
The serial cable removal stops the USB communication.
In case of VBUS sensing deactivation, erroneously
both USB_OTG_GCCFG_VBUSBSEN and
USB_OTG_GCCFG_NOVBUSSENS are set in GCCFG.
Correct handling is:
- VBUS sensing deactivation: set USB_OTG_GCCFG_NOVBUSSENS in GCCFG.
- VBUS sensing activation: set USB_OTG_GCCFG_VBUSBSEN in GCCFG.
ST Bug Tracker ID: 34714
Signed-off-by: Istvan Bisz <istvan.bisz@t-online.hu>
The eth_stm32_hal has been tested to work correctly on Nucleo-F207ZG,
Nucleo-F429ZI, Nucleo-F746ZG and Nucleo-F767ZI.
Signed-off-by: Daniel Egger <daniel@eggers-club.de>
This patch adds support for Ethernet in the STM32F2 family of
microcontrollers and enables it for the the Nucleo-F207ZG.
Signed-off-by: Daniel Egger <daniel@eggers-club.de>
Move the MEPC increment logic in __irq_wrapper such that the saved MEPC
is only incremented on a syscall (ecall instruction).
Signed-off-by: Nathaniel Graff <nathaniel.graff@sifive.com>
Consistently use
config FOO
bool/int/hex/string "Prompt text"
instead of
config FOO
bool/int/hex/string
prompt "Prompt text"
(...and a bunch of other variations that e.g. swapped the order of the
type and the 'prompt', or put other properties between them).
The shorthand is fully equivalent to using 'prompt'. It saves lines and
avoids tricking people into thinking there is some semantic difference.
Most of the grunt work was done by a modified version of
https://unix.stackexchange.com/questions/26284/how-can-i-use-sed-to-replace-a-multi-line-string/26290#26290, but some
of the rarer variations had to be converted manually.
Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
This commit removes the depreciated "default n" entries from
boolean K-config options in arch/arm.
Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
These work like def_bool, setting the type and adding a default at the
same time. This extension fixes some Kconfig inconsistency.
Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
A design flaw of 'gsource' is that there's no way to require at least
one file to match the glob pattern. This could lead to silent errors.
Switch to a new design, where a plain 'source' is globbing and requires
at least one file to match. A separate 'osource' (optional source)
statement is available for cases where it's okay for a pattern (or plain
filename) to not match any files.
'orsource' combines 'osource' and 'rsource' (relative source).
This commit search-replaces 'gsource' with 'source', but backwards
compatibility with 'gsource' is still maintained by making it an alias
for 'osource' (and by making 'grsource' an alias for 'orsource').
The three Kconfig files arch/{nios2,posix,xtensa}/Kconfig source
arch/{nios2,posix,xtensa}/soc/*/Kconfig, which doesn't match any files.
Use 'osource' for those. The soc/*/Kconfig files seem to be for
additional SoC-specific symbols, only none exist yet on those ARCHes.
Also use 'osource' for the source of $ENV_VAR_BOARD_DIR/Kconfig in
boards/Kconfig, which doesn't exist for all boards.
Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
Document that the boilerplate code included in all applications must
now also include
cmake_minimum_required(VERSION 3.8.2)
Signed-off-by: Sebastian Bøe <sebastian.boe@nordicsemi.no>
Prepend the text 'cmake_minimum_required(VERSION 3.8.2)' into the
application and test build scripts.
Modern versions of CMake will spam users with a deprecation warning
when the toplevel CMakeLists.txt does not specify a CMake
version. This is documented in bug #8355.
To resolve this we include a cmake_minimum_required() line into the
toplevel build scripts. Additionally, cmake_minimum_required is
invoked from within boilerplate.cmake. The highest version will be
enforced.
This patch allows us to afterwards change CMake policy CMP000 from OLD
to NEW which in turn finally rids us of the verbose warning.
The extra boilerplate is considered more acceptable than the verbosity
of the CMP0000 policy.
Signed-off-by: Sebastian Bøe <sebastian.boe@nordicsemi.no>
There was one extra byte sent in last chunk which caused
this error to be printed by curl
* Illegal or missing hexadecimal sequence in chunked-encoding
* stopped the pause stream!
* Closing connection 0
curl: (56) Illegal or missing hexadecimal sequence in chunked-encoding
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
Added transition time support. Now if NODE received optional
parameters then they would get entertained by it.
Added two new models that is Generic Default Transition Time
Server & Client resp. to complete overall architecture to
support newly introduced architecture.
With this it was possible to implement
gen_move_set/gen_move_set_unack message handlers.
Removed redundancy from App & revised overall implementation.
Fixed Bugs. Upgraded coding style. Added & replaced comments to
improve code readability. Improved printk messages.
Signed-off-by: Vikrant More <vikrant8051@gmail.com>
Added time stamp based message filtering as per Bluetooth Mesh
Developer study guide for each Server. Now even if message
source address & TID is same even after 6 seconds then
that will get proceed otherwise will get ignored.
Coding style improvements.
If particular Server model receive Prohibited values as per
Mesh Model Specification then that message will not get entertained.
Now proper status code will get send if user upgrade
light_lightness_range_state & light_ctl_temperature_range_state.
Signed-off-by: Vikrant More <vikrant8051@gmail.com>
Upgraded state binding algorithm & created separated
file for it. Moved light_default_status_init() from
device_composition.c to main.c. Shorten variables names
defined in struct light_lightness_state.
Signed-off-by: Vikrant More <vikrant8051@gmail.com>
The 'Network type' choice always defaulted to NET_RPL_L2_ANY, because
choices prefer the first default with a satisfied condition (this was
true even when Zephyr still had the prefer-later-defaults patch).
Swap the defaults so that NET_RPL_L2_IEEE802154 becomes the default if
NET_L2_IEEE802154 is enabled, as intended.
Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
This subsys is in the process of collecting requirements/usecases,
the API is subject to change. (Should have been marked experimental
from the beginning.)
Signed-off-by: Paul Sokolovsky <paul.sokolovsky@linaro.org>
This commit replaces exact time compassion by a range check, allowing
the tests to pass on platforms which needs rounding in __ticks_to_ms()
and _ms_to_ticks().
Signed-off-by: Piotr Zięcik <piotr.ziecik@nordicsemi.no>
The value of sys_clock_ticks_per_sec is obtained using
simple integer division with rounding toward zero. As result
using this variable in _ms_to_ticks() introduces some error.
This commit eliminates sys_clock_ticks_per_sec from equation
used in _ms_to_ticks() removing introduced error.
Also, this commit fixes#8895.
Signed-off-by: Piotr Zięcik <piotr.ziecik@nordicsemi.no>
The time slicing settings was kept in milliseconds while all related
operations was based on ticks. Continuous back and forth conversion
between ticks and milliseconds introduced an accumulating error due
to rounding in _ms_to_ticks() and __ticks_to_ms(). As result
configured time slice duration was not achieved.
This commit removes excessive ticks <-> ms conversion by using ticks
as time unit for all operations related to time slicing.
Also, it fixes#8896 as well as #8897.
Signed-off-by: Piotr Zięcik <piotr.ziecik@nordicsemi.no>
The _update_time_slice_before_swap() function directly compared
_time_slice_duration (expressed in ms) with value returned by
_get_remaining_program_time() which used ticks as a time unit.
Moreover, the _time_slice_duration was also used as an argument
for _set_time(), which expects time expressed in ticks.
This commit ensures that the same unit (ticks) is used in
comparsion and timer adjustments.
Signed-off-by: Piotr Zięcik <piotr.ziecik@nordicsemi.no>
Make several enums, that are used inside structs, to be packed so
that they use only needed amount of memory.
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
This feature was failing on a default ARM core MPU. The linker
script that was getting created was not able to align the required
partitions at prebuilt time.
The old implementation relied on the prebuilt to finish then
extract the size information which was then used to align the regions.
This fails because the size of the alignment and the fill in the
linker needs to be available at prebuilt time else it cant manage
the final elf file generation. We cant have 2 different sizes of
prebuilt and final elf file.
This implementation will get the alignment requirements met at
prebuilt time.
Signed-off-by: Adithya Baglody <adithya.nagaraj.baglody@intel.com>
Instead of waiting forever for a network buffer, have a timeout
when allocating net_buf. This way we cannot left hanging for a
long time waiting for a buffer and possibly deadlock the system.
This commit adds checks to L2 and network support libraries.
Fixes#7571
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
Instead of waiting forever for a network buffer, have a timeout
when allocating net_buf. This way we cannot left hanging for a
long time waiting for a buffer and possibly deadlock the system.
This commit only adds checks to core IP stack in subsys/net/ip
Fixes#7571
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
There have a funtion mqtt_rx_unsuback defined but not used.
So add it into mqtt_parser and fix the missing case.
Fixes#8431
Signed-off-by: Xuan Ze <119524428@qq.com>
Fixing the min max range validation where condtions on
upper and lower bound are logically 'ANDed'. Fixing it
by logical ORing the result.
CID: 18325, 18326
Fixes Issue #9289
Fixes Issue #9290
Signed-off-by: Subramanian Meenakshi Sundaram <subbu147@gmail.com>
Use the new KCONFIG_STRICT Kconfiglib functionality, which makes the
library itself warn for references to undefined Kconfig symbols.
Also get rid of the chdir() hack. Kconfiglib now only looks up Kconfig
files relative to $srctree when it's set, so the hack is no longer
needed.
Remove list_undef_kconfig_refs.py. It's no longer needed.
Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
Use the new Kconfiglib expression printing customization functionality
to get rid of the hacky expr_str() overriding.
Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
Update Kconfiglib and menuconfig to upstream revision 6aea8d06b637e.
Kconfiglib changes:
- Kconfig files are now looked up just relative to $srctree (if set).
Previously, each source'd Kconfig file was also looked up in the
current directory, and Kconfig files there could override Kconfig
files in $srctree. This is what the C tools do.
I'm pretty sure that behavior was a bug in the C tools all along, and
only meant for .config files. It caused problems (and an ugly
workaround) for the undefined Kconfig symbol CI check in an external
project.
The new behavior also saves a bunch of open()'s, though it's probably
not noticeable.
- Setting the KCONFIG_STRICT environment variable to 'y' now makes
Kconfiglib itself warn for references to undefined symbols. This
isn't safe in general, as some projects use multiple Kconfig trees
with shared Kconfig files (e.g. the Linux kernel).
This will be used to simplify the undefined Kconfig symbol CI check.
- It's now possible to customize how symbols and choices are printed
within expressions.
This will be used to make the RST link generation in genrest.py less
hacky.
- Instead of having 'gsource', a plain 'source' is now globbing, and
requires at least one match. There's also 'osource', for when it's
okay for a glob pattern to match no files.
'gsource' had the design flaw that there was no way to require at
least one file to match. I plan on replacing all 'gsource' statements
with plain 'source's later, but 'gsource' is still supported for
backwards compatibility.
- def_int, def_hex, and def_string are now available as a Kconfig
extensions, analogous to def_bool (set type and add default).
- Misc. internal cleanup.
menuconfig changes:
- Boolean value hints are no longer shown to the right of defaults in
the symbol information for int/hex symbols. Stuff like
'- 74 (value: "n")' wasn't helpful, and looked confusing.
- Symbol information has been made more compact in general, e.g. by
skipping value hints where they aren't helpful
('FOO(=y)' instead of 'FOO(=y) (=y)'), and by shortening stuff like
'(value: "y")' to just '(=y)'.
- Misc. internal cleanup.
Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>