This commit adds sys_set_power_state() function with support for EM1
Sleep, EM2 Deep Sleep, EM3 Stop power modes on Silabs SoCs.
Tested on efr32_slwstk6061a board.
Note: No support for efm32hg, efm32wg series at this point due to the
missing possibility of placing function code in RAM, required by errata
in SiLabs library code.
Signed-off-by: Piotr Mienkowski <piotr.mienkowski@gmail.com>
'soc' logger module may be used by any SoC related code located in soc/.
An implementation file requiring logger services should include
LOG_MODULE_DECLARE(soc, CONFIG_SOC_LOG_LEVEL);
to use the 'soc' logger instance.
Signed-off-by: Piotr Mienkowski <piotr.mienkowski@gmail.com>
Recent versions of GCC won't build grub-2.02 because they're more
pedantic about warnings. This has been fixed upstream but is not
yet part of any release. The build script is modified to apply the
relevant commits before building.
Signed-off-by: Charles E. Youse <charles.youse@intel.com>
Both SDK 0.10.0-beta2 and the ARM gcc 2018q2 run into a build issue with
newlib and conflict definitions of mode_t type.
First we need to add some ifdef protection if mode_t is already defined
and set _MODE_T_DECLARED if we are the first to define it.
Secondarily, we rename include/posix/sys/types.h to
include/posix/posix_types.h so that we aren't getting a name collusion
with the system sys/types.h and that we can easily and clearily include
it (which we need to do to pull in the info from newlib).
Fixes: #12224
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
For now we are disabling support for POSIX lib on native posix arch. We
need to cleanup and support POSIX lib cleanly for hardware targets.
Once that is working properly we can look to support the feature on
native posix arch.
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
This fix allows Renode to resemble the time flow of the hardware more
precisely. The performance value was established manually, there is no
indication in the docs on what is the average performance.
It allows tests/posix/common/portability.posix to pass, but fails on
tests/kernel/lifo/lifo_usage/kernel.lifo.usage.
The latter also fails on hardware.
Signed-off-by: Piotr Zierhoffer <pzierhoffer@antmicro.com>
The extra check for CONFIG_NET_OFFLOAD is not needed as it
prevents documentation generation for this API.
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
This commit adds a patch in the Kconfig.defconfig file of
nRF9160_pca10090 board, that instructs the linker to restrict
the Secure image to the size of its code partition, if the
image is to be combined with a Non-Secure image. Secure images
without accompanying Non-Secure firmware (i.e. with symbol
TRUSTED_EXECUTION_SECURE not set) can use the entire flash.
Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
We do not need to overwrite the reg property of flash0
in nrf9160_pca10090 default partitioning. The property
reflects the flash resources of the SOC, and is passed
in the .dtsi file of nRF9160 SOC definition.
Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
This commit fixes a bug that was always propagating the
default error reason (_NANO_ERR_HW_EXCEPTION) to the
system fatal error handler for (strictly) Secure and
for Non-Secure FW builds on ARMv8-M.
Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
Include the EXC_RETURN payload flag macro definitions into
compilation when building for Non-Secure firmware, too.
Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
Move test related code and the testsuite away from tests/ and make it a
proper subsystem.
The way tests were integrate in the tree was not obvious and actual
tests were intermixed with the testsuite code.
This will allow us to have trees with the testcode and without the
samples by just remove the folders tests/ and samples, needed for
isolating actual code from test/sample code.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Most of the other nRF52832 boards have the following settings for
scratch and storage partitions:
scratch_partition: partition@70000 {
label = "image-scratch";
reg = <0x00070000 0xa000>;
};
storage_partition: partition@7a000 {
label = "storage";
reg = <0x0007a000 0x00006000>;
};
Let's adjust the scratch size to align with the others and add the
storage partition so that settings and FS samples will work.
Signed-off-by: Michael Scott <mike@foundries.io>
In order to follow the naming from Linux, change the name of
can_msg to zcan_frame, and can_msg_filter to zcan_filter.
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
Make sure that can_copy_*() functions work as expected.
These functions are used by SocketCAN support.
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
Add new "struct can_frame" which is compatible with Linux so that it
is easier to port socket-can applications from Linux.
Rename existing can_filter to can_msg_filter so that the name will
not conflict with Linux compatible can_filter struct.
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
Do not load the GENERATED_DTS_BOARD_CONF if in doc mode, since it will
not defined as it doesn't apply. No need to defined it to a dummy value.
Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
settings_line_len_calc() calculates only setting record
payload size, not record layout in flash size.
this patch remove inadequate test for this function.
Signed-off-by: Andrzej Puzdrowski <andrzej.puzdrowski@nordicsemi.no>
settings_line_len_calc() is used to determine key-value record size.
It unnecessary aligned this size to write-block-size.
Record size in flash layout is actually adjusted independently by
fcb itself and setting settings_line_write().
Patch fixes this behavior.
fixes#12967
Signed-off-by: Andrzej Puzdrowski <andrzej.puzdrowski@nordicsemi.no>
Patch remove unnecessary call chain which fetched flash write-block-size
already available in fcb instance.
Signed-off-by: Andrzej Puzdrowski <andrzej.puzdrowski@nordicsemi.no>
Added test for check whether value lenght is properly
stored for unaligned settings record size.
Signed-off-by: Andrzej Puzdrowski <andrzej.puzdrowski@nordicsemi.no>
For improved precision of high speed PWMs, the new
function will allow you to specify period and pulse
at the nanosecond resolution.
Signed-off-by: Nicholas Lowell <nlowell@lexmark.com>
It simplifies things again, as it does not need to create the net_pkt by
itself anymore.
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
- Added various contents from stale wiki pages
- Added API life cycle document
- Add pictures showing process in general
- Split the document into multiple sections.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
The UDP API functions are for Zephyr internal use only so do
not generate documentation for them.
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
The MPU should have been enabled on all these boards since they have
Cortex-M7 and need mpu for caching support.
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
We need to set SYSROOT_DIR as the last thing we do on target.cmake so
we reset how its set for xtensa. Otherwise when we build with newlib
we will not get the proper path to newlib headers in the toolchain.
This matches the behavior of 0.9.5/target.cmake
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
Use file(GLOB_RECURSE ...) to generate a superset of doxygen input
files. Use this list as a dependency for a new empty file
doc/_build/last_doxy_run_tstamp.
The incremental build time to re-run "make htmldocs-fast" after a small
.rst doc change is brought down from from ~8s to ~4s on my Linux system
and from ~30s to less than 10s on my MacBook.
(Doxygen changes are still slow for a couple reasons recently isolated
and documented in doc/CMakeLists.txt)
Signed-off-by: Marc Herbert <marc.herbert@intel.com>
Clearly shows where time is spent. More specifically helps work on the
next commit while removing noise from it.
Signed-off-by: Marc Herbert <marc.herbert@intel.com>
Slightly enhance the build-time ASSERT rule for memory
partitions sanity on ARMv8-M platforms, to check,
additionally, for proper (32-byte) alignment of the start
address.
Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
This commit fixes a bug for ARM builds with no USERSPACE support
where the MPU stack guard had been erroneously placed, i.e. not
at the beginning of the stack object. This was eating 32-bytes
off of the thread stack. In addition to that, the commit adds a
usefull ASSERT statement for builds with USERSPACE, which checks
that the start of the guard matches the beginning of the entire
stack object.
Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
When closing the socket, zsock_close_ctx() would call
net_context_accept() when the socket was in "LISTEN" state.
This would result in an error log message for "Identical
connection handler already found" because the connection
context was already created because the initial
zsock_listen_ctx() called net_context_accept() to set up
the socket at the beginning. This change adds a test to
check if the callback is NULL which indicates this
close state and avoids the error message.
Signed-off-by: david leach <david.leach@nxp.com>
The sending of the final FIN message was being put on the sent_list
to be handled by the retry logic and being sent directly. But in
the case of a socket that never had a connection, the logic after
the direct send would decrement the reference on the packet which
would cause the retry logic to eventually have a situation where
the pkt is on the sent_list queue but the buffer associated with
the packet is freed back to slab. The code would then get a null
pointer to the tcp header and would fault when setting the crc to
zero on frdm-k64f platform.
Fixes#13489, #13301
Signed-off-by: david leach <david.leach@nxp.com>
The TODO file contained some random nice to have features.
The file does not mention use cases for these and also currently
the new features are managed and discussed in github.
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
Fix array overrun issue by limiting the array
index to the maximum possible string length.
Coverity CID: 190624
Signed-off-by: Ramakrishna Pallala <ramakrishna.pallala@intel.com>