Adding sensorhub support. Only one slave device can be selected
among LIS2MDL (magnetometer) and LPS22HB (pressure and temperature).
Signed-off-by: Armando Visconti <armando.visconti@st.com>
Change the flash_shell sample from using FLASH_WRITE_BLOCK_SIZE
definition to using the flash_get_write_block_size() api for the
selected flash_device.
This fixes the flash_shell sample when using multiple flash devices
with different write block sizes.
Signed-off-by: Henrik Brix Andersen <henrik@brixandersen.dk>
BUILD_ASSERT() macro makes use of __COUNTER__ which may not be
supported in some compilers (like xcc). So, multiple uses of
BUILD_ASSERT() in same scope is not possible for such compilers.
Instead, the expression to BUILD_ASSERT can be "&&"ed to achieve
the same purpose.
Signed-off-by: Rajavardhan Gundi <rajavardhan.gundi@intel.com>
This reverts commit d9ac1d4b4a.
This option can be compiler specific and is not required anymore.
Signed-off-by: Rajavardhan Gundi <rajavardhan.gundi@intel.com>
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Singly-linked lists work in a specific way, but this will allow
slist semantics to be defined for any data structure that can store
a "next" pointer in any way at all, possibly something not even
a pointer value, but a table index.
The immediate need for this patch is to allow the easy definition
of an slist variant which stores flags in the low-order bits of the
node pointer.
The compiler does not need them, but the function prototypes have
been left in slist.h to make the header easier to understand by
the end user and not confuse Doxygen.
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
Enabling C++ support for the application has been inappropriately
located at the root of the Kconfig menu. The root should be kept as
clean possible to allow easy navigation.
This commit moves CONFIG_CPLUSPLUS into
~/"Build and Linker Features"/"Compiler Options".
This is a purely cosmetic change and does not change the
'visibility' (depends) of the Kconfig option.
Arguably, it would fit better into
~/"Build and Linker Features"/"Language Options"
but this entry does not exist.
Signed-off-by: Sebastian Bøe <sebastian.boe@nordicsemi.no>
"depends on" cannot use expressions as arguments, this statement
didn't actually do anything for kconfiglib.py and caused an
error with menuconfig.
There's currently no way to depend on a system heap being
present, however forthcoming patches move this feature away
from using the system heap anyway.
For now, if the user enables dynamic objects without defining
a system heap, they will get a build error.
Fixes#7266.
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
Instead of using a module that tries to do too many things that break
in different places, keep it simple and just call git describe.
This fixes#7044 and fixes#7207.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
As k_thread_cancel() is deprecated, we need to test if delayed thread
which is in wait queue can be cancelled from k_thread_abort().
Signed-off-by: Spoorthi K <spoorthi.k@intel.com>
Fix potential overflow of interger expression for by fixing
variable type to s64_t.
CID: 185275
Signed-off-by: Ramakrishna Pallala <ramakrishna.pallala@intel.com>
The code was accessing network pkt before the value of the pkt
was checked.
Coverity-CID: 185394
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
Some of the SoCs specify "Enable MPU" in Kconfig for enabling MPU
support. This will create ambiguity while selecting options via
menuconfig. Hence, append SoC family name to the selection strings
to looks more elaborative.
Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
The title for selecting the configuration options for SoC's should be
"SoC Configuration" not "Board Configuration".
Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
Following changes are necessary to use LP3943 LED driver present
in 96Boards Neonkey board
1. Enable I2C_3 interface
2. Reduce the speed of I2C_3 bus on 96Boards Neonkey. Due to some
design quirks, on board LP3943 LED driver connected to I2C_3
operates only at Standard speed of 100KHz.
Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
Add sample application for TI LP3943 LED driver. This application
displays a continuous pattern that turns on 16 LEDs at 1s one by
one until it reaches the end and turns off LEDs in reverse order.
Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
Add support for LED APIs for controlling the LED devices. This
API can be used by the LED devices present on the chip and connected
externally via buses like I2C, SPI etc...
Following APIs are currently supported:
1. led_blink
2. led_set_brightness
3. led_on
4. led_off
Driver support using these APIs will be added in subsequent patches.
Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
Improve the help text of ARM k-config option
CPU_CORTEX_M_HAS_PROGRAMMABLE_FAULT_PRIOS.
Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
These are a direct copy from the nrf51_pca10028 board, since it's also
an nRF51 and has the same size flash.
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
In particular, try to demystify Kconfig.defconfig files, and provide
guidelines on whether configuration settings should go in
BOARD_defconfig or Kconfig.defconfig.
The board porting section seems to be the most relevant one here, so put
the documentation there, with some "see also" links from elsewhere.
Things could be reorganized later if needed.
Give a general overview of visible and invisible Kconfig symbols as
well, as that ties in with the configuration scheme.
This is reverse-engineering on my part. The configuration scheme doesn't
seem to be documented anywhere prior.
Fixes: #7159
Signed-off-by: Ulf Magnusson <ulfalizer@gmail.com>
Added test for initialization with FCB backend.
This test should goes over reset so it test blank and
subsequent initialization and data restoring capability
after the reset.
Signed-off-by: Andrzej Puzdrowski <andrzej.puzdrowski@nordicsemi.no>
Payload dump function not adopted to multi fragments CoAP packet. Still
assumes whole payload exists in single packet. Also does not handle all
return cases of coap_packet_get_payload() function, which is causing
coverity failures.
Coverity-CID: 185277
Coverity-CID: 185278
Signed-off-by: Ravi kumar Veeramally <ravikumar.veeramally@linux.intel.com>
Make posix align with non-posix platforms by having CMAKE_C_COMPILER
and friends use absolute paths.
Signed-off-by: Sebastian Bøe <sebastian.boe@nordicsemi.no>
This commit ports nearly all usage of check_c_compiler_flag,
check_cxx_compiler_flag, and check_compiler_flag to use
zephyr_check_compiler_flag instead.
This has a significant CMake configure-time performance impact.
Signed-off-by: Sebastian Bøe <sebastian.boe@nordicsemi.no>
zephyr_check_compiler_flag is introduced to resolve
https://github.com/zephyrproject-rtos/zephyr/issues/5633
The time spent when invoking CMake is halved with a warm cache.
See the API documentation for details.
Signed-off-by: Sebastian Bøe <sebastian.boe@nordicsemi.no>
This commit introduces TOOLCHAIN_SIGNATURE. A CMake variable that is
defined like this:
Toolchains with the same signature will always support the same set of
flags.
Currently it is implemented by MD5summing the CC binary.
This is useful for instance if the build system needs to determine if
it has seen the toolchain before, e.g. in a caching use-case.
Signed-off-by: Sebastian Bøe <sebastian.boe@nordicsemi.no>
This commits allows check_compiler_flag to accept the empty string as
an option. There are several use-cases for accepting no flag, one of
which is testing the toolchain itself.
Signed-off-by: Sebastian Bøe <sebastian.boe@nordicsemi.no>
To improve the build system's "clean build" runtime we need to cache
files in a directory outside of the build directory.
Caching files outside of the build directory is is already being done
to a certain degree today. For instance, if a user has installed
ccache it will cache files in $HOME/.ccache/.
This commit locates a directory that is suitable for caching files in
a cross-platform way. For instance on Linux this is believed to be
$HOME, on Windows this is believed to be %LOCALAPPDATA%.
If for whatever reason no environment variables are are found to be
suitable we fall back to using $ZEPHYR_BASE/.cache/. For users that
often use 'git -clean' the caching mechanism will not work as well,
but it will at least be better than no caching at all.
Signed-off-by: Sebastian Bøe <sebastian.boe@nordicsemi.no>
Added a CMake extention for determining if a directory is write-able
by the build system. To determine this, we attempt to 'touch' a file
in the directory and check the return code of this command.
Signed-off-by: Sebastian Bøe <sebastian.boe@nordicsemi.no>
It seems like SEGGER is supported across all the NXP SoC families so
lets enable it across all of them.
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
The allowed values for APB2 prescaler are: 1, 2, 4, 8, 16.
Set APB2 prescaler value to 1 in boards defconfig.
Signed-off-by: Yannis Damigos <giannis.damigos@gmail.com>
This packs a few improvements:
- Add a smarter regex that will catch multiple combinations of
ztest_[user_]unit_test[_setup_teardown](NAME[, setup, teardown])
as well as single liners like:
ztest_test_suite(mutex_complex, ztest_user_unit_test(TESTNAME));
- Limit how much we look forward in suite_regex -- we don't have to
look past the first argument, otherwise we consume too much and the
loopup at suite_regex_match.start() will start too late.
- Remove include_regex, unused
- Fix the path where we warn about matches in achtung_regexes--it
needed a few decodes and to use error() vs the unexistant warning()
- Cleanup the path to produce the subcase names, doing the decode and
the purging of any test_ prefix in scan_path().
Signed-off-by: Inaky Perez-Gonzalez <inaky.perez-gonzalez@intel.com>
If CONFIG_FLASH_PAGE_LAYOUT is not enabled, building the settings code
fails at the linking stage with the following error when FCB is the
backend.
libzephyr.a(settings_init.c.obj): In function `settings_init_fcb':
subsys/settings/src/settings_init.c:62: undefined reference to `flash_area_get_sectors'
collect2: error: ld returned 1 exit status
Also, the File System backend will currently only work with NFFS due
to fs_rename() missing from other File Systems (FAT in particular).
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
Fix regression with RNDIS due to different USB configuration method.
RNDIS drivers in Windows never call Set Interface and netusb is always
disabled. Change to enable netusb upon USB Set Configuration.
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
The NFFS partition at the end of flash is also useful for any other
file system or even the Flash Circular Buffer (FCB). Rename the
partition from 'nffs_partition' to 'storage_partition' and make it
depend on a new hidden Kconfig entry which the relevant users will
select (such as NFFS and FCB).
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
The http.h used HTTP server defines when compiling HTTP client.
This causes compilation error.
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>