This commit simplifies OS <-> Application interface controlling power
management. In the previous approach application-based PM required
overriding sys_suspend() and sys_resume() functions. As these functions
actually implemented power state change, in such case application
basically had to provide own implementation of all PM-related stuff,
which was not portable and hard to maintain.
This commit changes this scheme: The sys_suspend() and sys_resume()
are now system functions while the application could either use
built-in power management policies or provide its own. All details
of power mode switching are now handled by the OS.
Also, this commit cleans up the Kconfig options related to system-level
power management grouping them under common CONFIG_SYS_PM_ prefix.
Signed-off-by: Piotr Zięcik <piotr.ziecik@nordicsemi.no>
The same pattern is used five times In the x86 build scripts and the
same code has been copied and modified the same amount of times. This
has resulted in a system that is difficult to make changes to.
To enforce consistency and improve maintainability we refactor the
code into a function.
Signed-off-by: Sebastian Bøe <sebastian.boe@nordicsemi.no>
In general, to have correct dependencies, one must not only depend on
files, but also a wrapper target for the file. This is done for some
of the files in arch/x86/CMakeLists.txt, but not all.
To be consistent with how dependency management is done we add wrapper
targets and add dependencies to them.
Signed-off-by: Sebastian Bøe <sebastian.boe@nordicsemi.no>
The arch/x86/CMakeLists.txt build scripts names five sections that are
generated from .bin files. Two of them are named the same as the .bin
file, and the other three are named inconsistently.
To be consistent, we will rename the three that are named inconistenly
to align with the two that are named as the .bin file.
Being consistent simplifies the system and fosters code-reuse.
This patch renames irq_vectors_alloc_data.
Signed-off-by: Sebastian Bøe <sebastian.boe@nordicsemi.no>
The arch/x86/CMakeLists.txt build scripts names five sections that are
generated from .bin files. Two of them are named the same as the .bin
file, and the other three are named inconsistently.
To be consistent, we will rename the three that are named inconistenly
to align with the two that are named as the .bin file.
Being consistent simplifies the system and fosters code-reuse.
This patch renames gdt.
Signed-off-by: Sebastian Bøe <sebastian.boe@nordicsemi.no>
The arch/x86/CMakeLists.txt build scripts names five sections that are
generated from .bin files. Two of them are named the same as the .bin
file, and the other three are named inconsistently.
To be consistent, we will rename the three that are named inconistenly
to align with the two that are named as the .bin file.
Being consistent simplifies the system and fosters code-reuse.
This patch renames user_mmu_tables.
Signed-off-by: Sebastian Bøe <sebastian.boe@nordicsemi.no>
The arch/x86/CMakeLists.txt build scripts names five sections that are
generated from .bin files. Two of them are named the same as the .bin
file, and the other three are named inconsistently.
To be consistent, we will rename the three that are named inconistenly
to align with the two that are named as the .bin file.
Being consistent simplifies the system and fosters code-reuse.
This patch renames mmu_tables.
Signed-off-by: Sebastian Bøe <sebastian.boe@nordicsemi.no>
Introduce toolchain_cc_cpp_*-family of macros.
Move the following into the toolchain_cc_cpp_* macros:
* Common base set of flags
* C++ standard version
* RTTI
* Exceptions
These macros must be implemented by every compiler port.
These macros set the respective flags, but leaves logic and control to
the root CMakeLists.txt file.
No functional change expected.
Clang's C++ flags are compatible with gcc, and are thus
inherited.
This is motivated by the wish to abstract Zephyr's usage of toolchains,
permitting easier porting to other (commercial) toolchains.
Signed-off-by: Mark Ruvald Pedersen <mped@oticon.com>
The compiler flags -ffunction-sections and -fdata-sections are already
universally set from arch/common/CMakeLists.txt, so we shall not set
them again for C++ only.
Signed-off-by: Mark Ruvald Pedersen <mped@oticon.com>
The commit header as added by "git commit -s" is "Signed-off-by:",
and not any other casing. While it perhaps case-insensitive, use
canonical casing to not confuse (attentive) users.
Signed-off-by: Paul Sokolovsky <paul.sokolovsky@linaro.org>
This is needed, because an interrupt can happen after the main/static
MPU region is disabled and before it is re-enabled.
This region gets implicitly disabled inside the _region_init call, when
its configuration registers change:
SYSMPU->WORD[index][0] = region_base;
SYSMPU->WORD[index][1] = region_end;
SYSMPU->WORD[index][2] = region_attr;
SYSMPU->WORD[index][3] = SYSMPU_WORD_VLD_MASK;
The TRM says this about the WORD0, WORD1 and WORD2 registers:
Writes to this register clear the region descriptor’s valid bit
(RGDn_WORD3[VLD]).
And thus if an interrupt happens after writing to WORD0 and before
writing VLD to WORD3 again, the code executes with enabled and yet
misconfigured MPU.
Fixes#13482
Signed-off-by: Tomasz Gorochowik <tgorochowik@antmicro.com>
Use latest docker image with renode and an update to the SDK pre-release
0.10.0-rc3 (not used by default).
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
This simplifies a bit the driver itself as it does not need to create
the net_pkt it wants to send anymore.
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
Since commit b48a8c3247 ("usb: device: Add composite status callback")
the cb_usb_status callback is not called anymore in composite mode. The
cb_usb_status_composite callback is called instead.
This patch updates the ECM driver to use either one or the other
depending on CONFIG_USB_COMPOSITE_DEVICE.
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
Since commit b48a8c3247 ("usb: device: Add composite status callback")
the cb_usb_status callback is not called anymore in composite mode. The
cb_usb_status_composite callback is called instead.
This patch updates the EEM driver to use either one or the other
depending on CONFIG_USB_COMPOSITE_DEVICE.
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
Since commit b48a8c3247 ("usb: device: Add composite status callback")
the cb_usb_status callback is not called anymore in composite mode. The
cb_usb_status_composite callback is called instead.
This patch updates the RNDIS driver to use either one or the other
depending on CONFIG_USB_COMPOSITE_DEVICE.
Note that in practice the RNDIS driver is forced to composite mode for
better compatility with Windows, so this fix is required to get the
RNDIS driver working.
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
Use a variable to set the doxygen output directory so we can refer to it
later when fixing mtimes instead of hardcoding it.
Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
Documentation for a sample application to demonstrate audio
capture and playback on an Intel S1000 CRB connected to a
host over I2S.
Signed-off-by: Sathish Kuttan <sathish.k.kuttan@intel.com>
Sample application to demonstrate 2-way audio capture/playback from a
host connected over I2S to S1000
Signed-off-by: Sathish Kuttan <sathish.k.kuttan@intel.com>
vl53l0x driver is using an external library to build, located under:
ext/hal/st/lib/sensor/vl53l0x.
This library is expecting stdint.h lib to be available and to
secure this for driver library inclusion work, a stdint.h file
header check was done. This check was based on assumptions on possible
header names for stdint.h.
Due to recent renaming of the zephyr header files, this check was
returning a false positive, generating warning at compilation.
Rather than updated with new header names, remove this check, since
driver porting is completed and stdint.h inclusion is actually
done.
Fixes#10134
Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
A common driver is shared between stm32 chips, which was not the case
for stm32f3 series. As a consequence stm32f3 was not maintained
equally and was missing features such as flash layout or dts based
configuration.
Besides, drivers had some flows such as wrong bus clock and
missing HSI clock activation which lead to issues on boards not
using HSI as main clock.
As a consequence this commit moves stm32f3 series flash driver to
common stm32 flash drivers.
Fixes#4197
Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
On currently supported stm32f3 chips,
erase-block-size = 2048
write-block-size = 2
Set these property in stm32f3 series root dtsi file.
Fixes#9686
Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
Comment for storage partition could be misleading.
Clarify this is a partition used for file system.
Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
Turn
if a:
if b:
...
into
if a and b:
...
Simplify some error messages with .format() as well, and get rid of some
redundant str()s. '{0} {1} {1}'.format('foo', 'bar') gives
'foo bar bar'.
Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
- Reduce the indentation and remove the awkward line breaks. This is
possible now that there's no recursion.
- Be consistent with quotes
- Move some initialization closer to where it's used
Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
The recursion was used to implement 'properties:' within 'properties:'
in binding files, which seems to be a dead leftover (and undocumented).
Removing it gets rid of code and makes things more transparent.
Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
The 'partition\d+:' definition might be a leftover from an older way of
handling partitions. There are no 'partition[0-9]' properties anywhere
in the DTS files.
The reason I want to get rid of this is that it's the only place where
you get a 'properties:' nested inside inside a 'properties:'. That's an
undocumented feature, and removing it will make generate_node_defines()
much simpler (non-recursive).
Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
Use more descriptive naming, get rid of unused 'v' variable, and an
unnecessary None check (None won't appear in get_binding_compats()).
Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
...to generate_node_defines().
More explicit. "extract node include info" can be read in many ways:
- Extract a node's "include info"
- Extract node and include info
- etc.
Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
That way it consistently generates all #define's.
Add some related clarifying comments to main() too.
Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
- Regexes (e.g. 'pinctrl-.*') are supported in property names in
bindings, but it was undocumented
- Remove the mention of 'generation: structure'. The only implemented
output format is #define's.
- Clean up the language a bit and move related stuff so that it appears
together
Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
mem_pdu_rx is not runtime resized meaning PDU_RX_SIZE_MIN is no longer
relevant.
Dynamic resizing was a left-over from the old bt controller.
Its size field was only ever set to PDU_RX_SIZE_MIN.
PDU_RX_SIZE_MIN only accounted for advertise PDUs.
So we remove size field from mem_pdu_rx.
However, the rest of the BT controller expects to be able to pull
RX_CNT-number of valid nodes from the pool at init/reset (rx_alloc)
time. This will fail unless we inflate the capacity by one.
To avoid inflation-by-one, mem_* would have to be rewritten to avoid
always-one-extra pattern.
Signed-off-by: Mark Ruvald Pedersen <mped@oticon.com>
Refactor PDU_RX_POOL_SIZE into its constituents and name each term.
No functional change expected.
Signed-off-by: Mark Ruvald Pedersen <mped@oticon.com>
This function conflicts with a function of the same name in mcuboot.
This happens when building USB DFU support into mcuboot.
DFU over USB uses image manager and mcuboot internals to manage images
downloaded to the device.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Fix a bug in Encryption Procedure feature conditional
compile which prevent any data transfer when the feature was
disabled.
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
Fix setting of the I2C bus master device name for the GPIO_PCAL9535A
device and PWM_PCA9685. We need to extract them from the dts otherwise
they will just get set to "".
Fixes#13458
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
Update the pyocd version to pick up a fix for the command 'pyocd erase',
which was broken in 0.15.0 and fixed in 0.16.0. Although we don't have
any in-tree uses of this command in zephyr, there will soon be in-tree
uses in mcuboot when the deprecated 'pyocd-flashtool' and 'pyocd-tool'
commands are replaced with the new unified pyocd commands.
Signed-off-by: Maureen Helm <maureen.helm@nxp.com>