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>
The condition 'iv_index != bt_mesh.iv_index + 1' is already caught by
the earlier conditions in this branch.
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
If the network is in IV Update In Progress state when we get
provisioned we should set a timer so we eventually transition back to
Normal mode (otherwise we may end up in IVU In Progress indefinitely).
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
When we get provisioned we can't know how long the network has been in
the current IV Update state. Introduce a special value for
bt_mesh.last_update to indicate that we don't know the duration.
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
Update the LwM2M client sample documentation with usage examples
of the newly introduced overlay-*.conf fragments. Remove the
references to prj_dtls.conf.
Signed-off-by: Michael Scott <michael@opensourcefoundries.com>
The file overlay-bt.conf contains only the needed CONFIG items to
support Bluetooth networking.
For example, DTLS-enabled BLENano2 HW can be supported with the
following build:
cmake -GNinja -DBOARD=nrf52_blenano2 \
-DCONF_FILE="prj.conf overlay-bt.conf overlay-dtls.conf" ..
Signed-off-by: Michael Scott <michael@opensourcefoundries.com>
Instead of maintaining a nearly identical copy of prj.conf to support
DTLS, let's replace it with an overlay-dtls.conf file containing only
the CONFIG settings needed to support DTLS. This can be used via the
-DCONF_FILE command line argument when configuring the sample:
Non-DTLS-enabled build:
cmake -GNinja -DBOARD=qemu_x86 ..
DTLS-enabled build:
cmake -GNinja -DBOARD=qemu_x86 \
-DCONF_FILE="prj.conf overlay-dtls.conf" ..
Signed-off-by: Michael Scott <michael@opensourcefoundries.com>
This commit fixes crash caused by double free from message sequence
fragmentation. When double free happens the call stack is:
0 reassembly_cancel
1 handle_fragment_hdr
2 net_ipv6_process_pkt
3 process_data
4 processing_data
5 net_rx
6 process_rx_packet
7 work_q_main
8 _thread_entry
So at first packet is unrefed in reassembly_cancel and then also in
processing_data.
Signed-off-by: Ruslan Mstoi <ruslan.mstoi@intel.com>
After successful send, the packet is automatically cleared, so
trying to call print_send_info() on it leads to errors:
[net/pkt] [ERR] net_pkt_tcp_data: NULL fragment data!
[net/tcp] [ERR] net_tcp_get_hdr: NULL TCP header!
(if error logging enabled).
This change is similar to how print_send_info() is called in
existing send_reset() function of this source file.
Signed-off-by: Paul Sokolovsky <paul.sokolovsky@linaro.org>
When MMU is enabled and the SOC we are running doesn't have
execute in-place(XIP) the final image will be a monolith which
sits in RAM. In such situations we need to maintain the alignment
for application memory. If not maintained the MMU boot tables
will not be configured properly.
Signed-off-by: Adithya Baglody <adithya.nagaraj.baglody@intel.com>
The testcases presented here will test the following functionality
1. Inheritance of permission from parent thread to child.
2. Memory domain implementation.
3. Access permission for k objects.
The combinations of these test cases will cover some of the basic
usecases of the userspace mode.
These test cases are meant to be executed by any board with has
CONFIG_USERSPACE enabled.
Signed-off-by: Adithya Baglody <adithya.nagaraj.baglody@intel.com>
Adding a new kernel object type or driver subsystem requires changes
in various different places. This patch makes it easier to create
those devices by generating as much as possible in compile time.
No behavior change.
Signed-off-by: Leandro Pereira <leandro.pereira@intel.com>
Driver APIs might not implement all operations, making it possible for
a user thread to get the kernel to execute a function at 0x00000000.
Perform runtime checks in all the driver handlers, checking if they're
capable of performing the requested operation.
Fixes#6907.
Signed-off-by: Leandro Pereira <leandro.pereira@intel.com>
There was a ton of junk in this header. Pare it down to just the
stuff actually used by code outside of sched.c, move the needed
internal stuff into sched.c itself, and drop everything else.
Note that (other than the tiny inlines that remain here in the header)
the scheduler interface exposed to the rest of the system is now
composed of just 12 functions.
Signed-off-by: Andy Ross <andrew.j.ross@intel.com>
In f. settings_init_fcb the storage area was implemented badly:
- storage was always erased
- the only source of settings fcb instance was pointed twice.
This patch fix both issues.
Signed-off-by: Andrzej Puzdrowski <andrzej.puzdrowski@nordicsemi.no>
API settings_subsys_init call was changed so that it returns
error (so returns int instead of void).
Prototype of storage helper function export_func for
settings_handler::h_export was changed so that it returns error
(so returns int instead of void).
Fixed few other error handling issues by ignoring return
values.
Tests were aligned to above patches.
Signed-off-by: Andrzej Puzdrowski <andrzej.puzdrowski@nordicsemi.no>
This addresses issue #7146.
The current helptext does not state that the directory
will be deleted.
Signed-off-by: Håkon Øye Amundsen <haakon.amundsen@nordicsemi.no>
Fixes issue #7184.
Use $BOARD_ROOT to find correct list of supported boards.
This is needed since the user can set this variable to any directory.
Pass $BOARD_ROOT to usage.cmake where it is called.
Signed-off-by: Håkon Øye Amundsen <haakon.amundsen@nordicsemi.no>
Parse all yaml file and create a list of declared testcases. This does
list the individual tests inside test projects, not only the projects
containing the tests, for example:
$ sanitycheck --list-tests -T tests/net/socket/
- net.socket.udp.send_recv_2_sock
- net.socket.udp.v4_sendto_recvfrom
- net.socket.udp.v6_sendto_recvfrom
- net.socket.udp.v4_bind_sendto
- net.socket.udp.v6_bind_sendto
- net.socket.getaddrinfo_ok
- net.socket.getaddrinfo_no_host
- net.socket.tcp.v4_send_recv
- net.socket.tcp.v6_send_recv
- net.socket.tcp.v4_sendto_recvfrom
- net.socket.tcp.v6_sendto_recvfrom
- net.socket.tcp.v4_sendto_recvfrom_null_dest
- net.socket.tcp.v6_sendto_recvfrom_null_dest
13 total.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>