This patch adds USB descriptor and data section macros.
Use USBD_DESCR_..._DEFINE macros to place the parts of USB device
descriptor in predetermined order in the USB descriptor
section. The parts of a device descriptor are also
sorted according to the macro argument. All parts of a
particular device descriptor must use the same argument.
Use USBD_CFG_DATA_DEFINE macro to place the data struct
of a class driver or function in the USB data section.
Signed-off-by: Johann Fischer <j.fischer@phytec.de>
This patch adds a RAM section for the USB descriptors and
USB interfaces data.
The parts of USB descriptor can be declared independently in
different USB class drivers or functions. These must then be
placed in a predefined order one after the other without gaps
in a RAM section. There may also be several device descriptors
in the section such as for USB DFU.
Since at runtime the number of interfaces and endpoints in the
composite device descriptor is unknown, they must be corrected.
The class drivers or functions use the usb_cfg_data struct to
store the callbacks, interface and endpoints data. This struct
must also be corrected and needs to be placed in the data section.
The descriptor section and data section must be processed by
the USB Device Stack before the enumeration.
Signed-off-by: Johann Fischer <j.fischer@phytec.de>
Restructured the test, added description and enhanced
semaphore count logic to check for semaphores created
only in the test.
Fixes: #7106
Signed-off-by: Spoorthi K <spoorthi.k@intel.com>
The ARRAY_SIZE() utility macro will actually test the parameter types,
and ensure that it is only called with arrays, and not arrays decayed
to pointers.
Changes were performed with a simple Coccinelle script.
Signed-off-by: Leandro Pereira <leandro.pereira@intel.com>
Changes to kconfig documentation generation added some new files
(choice*.rst) that need to be added to the .gitignore list. Actually,
all the doc/reference/kconfig/*.rst files should be ignored.
Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
Invalid configurations should be detected during configuration instead
of during compilation whenever possible.
This patch replaces a BUILD_ASSERT on CONFIG_SYSTEM_WORKQUEUE_PRIORITY
with what is intended to be an equivalent Kconfig restriction.
Signed-off-by: Sebastian Bøe <sebastian.boe@nordicsemi.no>
lib/libc/minimal/source/CMakeLists.txt and
lib/libc/minimal/source/stdout/CMakeLists.txt was introduced in
12f8f7616 but it is not used by the build system. CMakeLists.txt in
the parent dir lib/libc/minimal/CMakeLists.txt adds C files to the
target with the lines like:
${CMAKE_CURRENT_SOURCE_DIR}/source/stdlib/atoi.c
${CMAKE_CURRENT_SOURCE_DIR}/source/stdlib/strtol.c
To make other empty CMakeLists.txt explicit, this commit adds a
comment line to them.
Signed-off-by: Yasushi SHOJI <y-shoji@ispace-inc.com>
CONFIG_SPI_FLASH_W25QXXDV_MAX_DATA_LEN is a left-over from old SPI API
usage. Now, there is no limit (besides the flash size) in SPI data
transaction.
Fixes#8327
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
This commit fixes a pretty nasty bug that could cause properties on
symbols and choices defined in multiple locations to end up in the wrong
order, potentially affecting evaluation.
Alexander Wachter ran into this for an out-of-tree build.
Multi.def. symbols are rare in the Linux kernel, which is what the
Kconfiglib test suite uses for compatibility testing, so this managed to
slip through. Comprehensive selftests have been added for property
ordering on nested multi.def. symbols/choices.
This bug was introduced by commit e307ba340c ("kconfiglib: Record
which MenuNode has each property").
Commit message from Kconfiglib (c8801514d63aa)
==============================================
Fix incorrectly ordered properties for some nested multi.def. symbols
_propagate_deps() visits menu nodes roughly breadth-first, meaning
properties on symbols and choices defined in multiple locations could
end up in the wrong order when copied from the menu node for some
unlucky if/menu nestings.
Fix it by moving the menu-node-to-symbol/choice property copying in
_finalize_tree() so that it's guaranteed to happen in definition order.
This bug was introduced by commit 63a4418 ("Record which MenuNode has
each property").
Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
On Cortex-M7 CPU (at least on STM32F723), the dummy move FPU instruction
is executed before the FPU lazy state preservation is disabled. Add an
instruction synchronization barrier before it to avoid that.
At the same time, remove the data synchronization barrier after the
dummy move as it does not have any effect on RAM or registers.
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
Remove include guards in internal files; it is an agreed
convention to not have include guards in internal header
files in Bluetooth subsystem.
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
This adds basic support for declaring gpio nodes in dts for nrf52.
The dts.fixup provides mapping for the generated defines to the config
defines currently used by the nrf gpio driver.
Existing boards that use nrf52 are updated.
Signed-off-by: Marc Reilly <marc@cpdesign.com.au>
The Kconfig option HID_INTERRUPT_EP_MPS does not have a prompt entry,
so it is not configurable in practice. Fix that.
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
New versions of Sphinx/Breathe are throwing a new warning that
we'll need to filter before upgrading to breathe 4.9.1 and sphinx 1.7.5
This change won't impact our current builds but will prevent new known
warning messages when we upgrade the doc build tools.
Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
The extra region is wrapped in an "ifdef" as two MPU regions are used
only if the total memory size is not a power of two.
Signed-off-by: Tomasz Gorochowik <tgorochowik@antmicro.com>
There is no need for two RAM regions when the total amount of memory is
a power of two. With this change it will be possible to map the whole
memory and save one MPU region for such cases.
Signed-off-by: Tomasz Gorochowik <tgorochowik@antmicro.com>
This is a feature Ben added so you could use Zephyr's arch layer to
bootstrap things like bootloaders without sucking in the whole kernel.
And it's worked until now.
But we never had a test for it, and I just broke it with the scheduler
rework. Add a trivial test just to make sure this continues to link
and run. Longer term it would be nice to have some kind of size
metric here to guarantee that the feature stays lean and doesn't pull
in needless code.
Signed-off-by: Andy Ross <andrew.j.ross@intel.com>
The prepare_multithreading()/switch_to_main_thread() steps were being
done unconditionally, when with multhreading disabled we want to jump
straight into the main thread on the existing stack.
Needless to say, that doesn't work well. Fixes#8361.
Signed-off-by: Andy Ross <andrew.j.ross@intel.com>
Introduce a quirks field to the HCI driver struct, which can be used
to create exceptions in host behavior for non-standard or unusual
controller behavior. An initial quirk is added to prevent the host
from sending the HCI_Reset command (in which case the controller is
responsible for performing the reset).
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
This is the simplest & cleanest way to make these APIs available for
drivers. We already have a public hci.h header file, so using it seems
most natural.
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
This makes it easier to distinguish them from "true" undefined symbols.
Internally, all int/hex literals are treated as undefined symbols, which
always get their name as their value. The C tools work the same way.
The plan is to turn references to undefined Kconfig symbols into an
error later.
Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
These cases weren't caught by the heuristic used by the warning added in
commit 6eabea3a7e ("Kconfiglib: Warn for unquoted string defaults"),
because "GPIO_0" has no lowercase characters in it.
Unquoted Kconfig values are are indistinguishable from reference to
(undefined) symbols in general. Quoting all string defaults will help
find "true" references to undefined Kconfig symbols, and makes it
clearer that the value is constant.
Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
These symbols were removed by commit ed26b95 ("drivers/gpio:
Removing dts generated options in QMSI Kconfig"). The settings should
come from DTS now.
Commit 9611002f7a ("boards/x86: Use right GPIO names for CC2520")
fixed some of the references, but there are still others left. Guess
that the same fix is appropriate in those spots (hardcoded
"GPIO_0"/"GPIO_1" names).
Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
These symbols were removed by commit 4e8f29f319 ("gpio: Refactor the
mcux gpio driver to use dts"). The settings should come from DTS now.
Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
This symbol was removed by commit 17c6456678 ("drivers/uart: Use dts
to set uart priorities for QMSI driver"). The setting should come from
DTS now.
Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
'default false' should have been 'default n', though they happen to have
the same effect here, due to undefined Kconfig symbols ('false')
evaluating to 'n' in a boolean sense.
Kconfig bool symbols implicitly default to 'n', so remove the default
rather than fixing it.
Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
'default N' should have been 'default n', though they happen to have the
same effect here, due to undefined Kconfig symbols ('N') evaluating to
'n' in a boolean sense.
Kconfig bool symbols implicitly default to 'n', so remove the default
rather than fixing it.
Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
The NSIM symbol was removed in commit 9bc69a46fa ("boards: Update arc
em_starterkit support from 2.2 to 2.3").
Guess that UART_NSIM should be used here now, similar to what was done
in commit 45221a9706 ("serial: nsim: Fix impossible-to-enable
CONFIG_UART_NSIM").
Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
Added a hidden Kconfig option in arch/arm/soc/nordic_nrf
which is selected by selecting DC/DC circuitry being present
in the board.
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
Add support for specifying the clock prescaler value for the HF timer
used for generating the PWM signals. This allows for lower timer
frequency and thus slower PWM signals (e.g. for use as servo
controller).
Signed-off-by: Henrik Brix Andersen <henrik@brixandersen.dk>
The nRF5x HF timer base frequency is 16 MHz, not 16777216 Hz.
The improved accurracy of the PWM signal was verified with an
oscilloscope on a BBC micro:bit.
Signed-off-by: Henrik Brix Andersen <henrik@brixandersen.dk>
Fixed the BT_USERCHAN config warning
by setting it only if BT_HCI is selected,
instead of setting it always and relying on it
being set to "no" by not meeting that dependency.
Signed-off-by: Alberto Escolar Piedras <alpi@oticon.com>
Fixed the FAKE_ENTROPY_NATIVE_POSIX config warning
by setting it only if the entropy generator is used,
instead of setting it always and relying on it
being set to "no" by not meeting that dependency.
Signed-off-by: Alberto Escolar Piedras <alpi@oticon.com>
Due to a bug in KBuild, bluetooth samples needed to #include the gatt
sources to re-use code between samples. This bug was not ported to
CMake so we can stop applying this workaround.
gatt source files are now directly added to the 'app' library instead
of having adapter source files in the app's src directory that
\#include's the gatt files.
Signed-off-by: Sebastian Bøe <sebastian.boe@nordicsemi.no>
Invalid configurations should be detected during configuration instead
of during compilation whenever possible.
This patch replaces a BUILD_ASSERT on CONFIG_NET_BUF_USER_DATA_SIZE
with what is intended to be an equivalent Kconfig restriction.
Signed-off-by: Sebastian Bøe <sebastian.boe@nordicsemi.no>
Currently, we add TCP options only to SYN+ACK reply to peer's SYN
(i.e. passive open). For consistency, add them also when we send
SYN ourselves (active open). In both cases, we add just MSS option
currently.
Signed-off-by: Paul Sokolovsky <paul.sokolovsky@linaro.org>
Ethernet header is always filled in the first fragment of a packet,
so passing it as a separate function paramter is supefluous.
Signed-off-by: Paul Sokolovsky <paul.sokolovsky@linaro.org>
There's an apparent typo in testing net_buf headroom. Also, after
adding VLAN header support, its size should be used too.
Signed-off-by: Paul Sokolovsky <paul.sokolovsky@linaro.org>
Some prj.conf files seem to deliberately override settings from the
board configuration (e.g. samples/bluetooth/hci_usb/prj.conf, with
GPIO=y). Disable the warning about a symbol being assigned more than
once to avoid warnings for those cases.
A list similar to WARNING_WHITELIST could be added later if more
warnings need to be disabled.
Also refactor the warning checking code a bit to get rid of some not's.
Suggested by Sebastian Bøe.
Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
Fixes: #8210
Following changes has been made to ensure correct behavior on different
system:
- Python script to detect changes to directories, including empty ones.
When files are modified the list is updated
If sub-directories are added / removed a trigger file is touched to
notify cmake to re-run
- Windows: To detect changes to header files in include for
parse_syscalls.py all files must be individual monitored.
Hence all headers are globbed added to dependencies.
CMake configure depends on the folders so the added /
removed files are picked up.
- Other: Folders are monitored through the python list file so that
added / remove / modified
Added / removed sub-directories are detected through trigger
file in order to re-run cmake.
Signed-off-by: Torsten Rasmussen <torsten.rasmussen@nordicsemi.no>
Fixes: #8210
This commit removes the need for always rebuild when generating the
syscalls.json.
It find the files and subfolders of the include directory and makes
syscalls depends on those.
To find added files / subfolders on all platforms CMake configure
is also depending on the folders found.
This ensures that added files / folders will also be detected at later
stages.
Signed-off-by: Torsten Rasmussen <torsten.rasmussen@nordicsemi.no>
Since they are not used anymore because can be replaced
by CMSIS definition or generated from device tree,
remove IRQ definition file soc_irq.h
Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
stm32cube SDK provides defines for IRQ line numbers.
It was not possible to use them, since enum where not supported
by IRQ_CONNECT macro.
Use them in order to get rid of zephyr manually coded IRQ lines.
They will later be replaced by device tree definitions when
made available
Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
stm32cube SDK provides defines for IRQ line numbers.
It was not possible to use them, since enum where not supported
by IRQ_CONNECT macro.
Use them in order to get rid of zephyr manually coded IRQ lines.
They will later be replaced by device tree definitions when
made available
Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>