In case of !XIP, set defaults for CONFIG_FLASH_SIZE and
CONFIG_FLASH_BASE_ADDRESS in Kconfig.
Fixes: #13113
Signed-off-by: Gil Pitney <gil.pitney@linaro.org>
With this commit, it is now possible that if (for e.g.) lightness
transition is interrupted by temperature transition (which could
be instantaneous or non-instanstaneous) then as soon as temperature
transition get over, then algorithm would achieve target value
of lightness.
Signed-off-by: Vikrant More <vikrant8051@gmail.com>
Add a sample demonstrating usage of the APA102 driver, heavily based
on led_ws2812. Tested on nucleo_l432kc with an Adafruit DotStar strip.
Signed-off-by: Marc Pignat <marc@absintheaudio.com>
There is a apa102 driver, and an upcomming patch will provide a sample
for using it, but let's keep the bitbang version which is intersting.
Signed-off-by: Marc Pignat <marc@absintheaudio.com>
The GPIO controller only supports edge triggering according to
the descriptions of the associated registers. So errors out
when level trigger is requested. Also adds the option to do
double edges triggering as the controller supports this.
Fixes#12763
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
When optimizations are disabled more RAM is used and we get a stack
overflow on CONFIG_LOG_PROCESS_THREAD_STACK_SIZE. To rectify this,
increase the stack size when CONFIG_NO_OPTIMIZATIONS.
This does not scale well, and will have to be replaced by a a more
general solution eventually, but in the mean time it follows the
existing best practice established by the GCOV infrastructure in
commit e908ea9aa5
Signed-off-by: Sebastian Bøe <sebastian.boe@nordicsemi.no>
When optimizations are disabled more RAM is used and we get a stack
overflow on BT_HCI_TX_STACK_SIZE. To rectify this, increase the stack
size when CONFIG_NO_OPTIMIZATIONS.
This does not scale well, and will have to be replaced by a a more
general solution eventually, but in the mean time it follows the
existing best practice established by the GCOV infrastructure in
commit e908ea9aa5
Signed-off-by: Sebastian Bøe <sebastian.boe@nordicsemi.no>
Replace Cortex-M3 with Cortex-M architecture family
in the header documentation of kernel_arch_data.h and
kernel_arch_func.h, which are generic header files for
the entire familty of ARM Cortex-M CPUs. The commit
adds some more minor style fixes in functions'
documentation.
Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
This commit improves the documentation of internal ARM core
function _arch_irq_lock(..), adding a more detailed description
of its impact on the different Cortex-M processors.
Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
When selecting BT we need to select BT_CTRL for most bluetooth
samples to work correctly.
Let's fix that in the board files.
Fixes the following error when CONFIG_BT is selected:
zephyr/drivers/bluetooth/hci/h4.c:463:30:
error: ‘CONFIG_BT_UART_ON_DEV_NAME’ undeclared (first use in
this function)
h4_dev = device_get_binding(CONFIG_BT_UART_ON_DEV_NAME);
^~~~~~~~~~~~~~~~~~~~~~~~~~
Signed-off-by: Michael Scott <mike@foundries.io>
Configure the SiFive Freedom SoC to bind to the I2C Peripheral.
Note: The FE310-G000 used on the HiFive 1 does not posess the I2C
peripheral. However, the FE310 platform can have an I2C device memory
mapped in the location described in riscv32-fe310.dtsi.
Signed-off-by: Nathaniel Graff <nathaniel.graff@sifive.com>
Driver for the I2C peripheral in the SiFive Blocks RTL
Repository (https://github.com/sifive/sifive-blocks).
Signed-off-by: Nathaniel Graff <nathaniel.graff@sifive.com>
Fix issue #9028: last bit of SPI/I2S transaction may be corrupted.
Impacted STM32 SOC series: F0/F1/F2/F3/F4/L0.
Notes:
- F2/F4/L0: set gpio to very_high speed ('11')
- F0/F3: set gpio to high speed ('11').
- F1: set gpio to 50MHz.
Signed-off-by: Armando Visconti <armando.visconti@st.com>
Set Kconfig symbol SETTINGS_FCB_FLASH_AREA based on the
DT_FLASH_AREA_<FOO>_ID define instead of being hard coded.
We replace 3 with DT_FLASH_AREA_IMAGE_SCRATCH_ID and
we replace 4 with DT_FLASH_AREA_STORAGE_ID.
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
After addition of flash_map auto-generation it is needed to
use generated flas_area name instead of hard-code.
Signed-off-by: Andrzej Puzdrowski <andrzej.puzdrowski@nordicsemi.no>
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
This Patch add functionality for automatic generation of the flash map
using DTS description. Automatic generation allows to replace
C-hardcoded flash_map.
We generate a set of defines based on the index of a partiion:
#define DT_FLASH_AREA_<IDX>_OFFSET 0
#define DT_FLASH_AREA_<IDX>_SIZE 131072
#define DT_FLASH_AREA_<IDX>_DEV "FLASH_CTRL"
#define DT_FLASH_AREA_<IDX>_LABEL MCUBOOT
Additionally we also define:
#define DT_FLASH_AREA_NUM 4
and:
#define DT_FLASH_AREA_<PARTNAME>_ID 0
Signed-off-by: Findlay Feng <i@fengch.me>
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
The test had hard coded address family with value 4. This test
was failing as we have now AF_CAN family with value 4. Use 99
as an invalid address family value instead.
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
It is possible to set the filter in user application and that
information is passed to the CANBUS device driver.
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
As the value 0 is a valid network interface index, we cannot use
unsigned value for interface index as that would not allow to
distinguish an invalid value. So make interface index a signed
8-bit value which is ok as we do not expect to have more than 127
network interfaces in the system.
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
The function did not take the address family into account
when printing protocol name. The protocol value depends on
address family.
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
This is basically a dummy layer that just passes data through.
It is needed so that we can create CANBUS type network interface
to the system.
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
This allows user to create a CAN socket and to read/write data
from it. From the user point of view, the BSD socket CAN support
works same way as in Linux.
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
This commit adds PF_CAN and AF_CAN protocol family identifiers
that are used by BSD socket CAN support code.
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
Signed-off-by: Vipin Anand <vipin.anand@intel.com>
This command is useful for signing binaries for loading by a
bootloader. At present, only MCUboot's "imgtool" is supported, but it
would be straightforward to add support for additional tools.
Using this command instead of "plain" imgtool avoids looking up any
numbers for the flash write block size, text section offset, or slot
size to get a signed binary. All users need to specify is the location
of the signing key.
This greatly improves usability for those unfamiliar with MCUboot, or
even experienced users who have to deal with multiple flash partition
layouts, boards, etc.
The command works by inspecting state in the Zephyr build system, some
of which is also provided by the runner package.
Signed-off-by: Marti Bolivar <marti@foundries.io>
This is a prep work patch for adding another command. Refactor
build.py to use a new Forceable superclass and find_build_dir() helper
routine. Fix a help string while we are here.
Signed-off-by: Marti Bolivar <marti@foundries.io>
EditorConfig (https://editorconfig.org) is a widely supported
configuration tool that helps to ensure better consistency amongst
developers by auto-configuring an editor to match the original/intended
style i.e. tab-width etc.
This configuration covers many of the common file formats used in
zephyr.
The configuration was derived by looking at existing files and
ascertaining what configuration they currently use.
This is the top-most EditorConfig file meaning this is the root of all
other EditorConfigs, however sub-directories can set their own up if
they wish to override this.
This has proven especially useful when viewing uncrustified C source
code where the tab-width should be 8 to get proper alignment but many
editors use a tab-width of 4.
Lots of editors support this natively and those that do not probably
have a plugin or extension.
Tested by opening and saving various files to ensure no changes
occurred.
Signed-off-by: Carlos Stuart <carlosstuart1970@gmail.com>
SPFLAGS allows to pass additional flags supported by
spatch during transformation.
Both short notation `-f=` and `--sp-flag=` can be used
to pass the flag to the coccicheck.
Signed-off-by: Himanshu Jha <himanshujha199640@gmail.com>
Last parameter of exec_cmd function has been corrected from
structure type to pointer to structure type.
Signed-off-by: Jakub Rzeszutko <jakub.rzeszutko@nordicsemi.no>
Sample application which opens a packet socket and receives
every packet on the wire and send some dummy packet over
socket. Simple demo of how to use packet sockets.
Signed-off-by: Ravi kumar Veeramally <ravikumar.veeramally@linux.intel.com>
This commit adds packet socket support to socket api.
This version supports basic packet socket features.
Protocol family is AF_PACKET, type of socket is
SOCK_RAW and proto type is ETH_P_ALL. The user will
receive every packet (with L2 header) on the wire.
For TX, the subsystem expects that the user has set
all the protocol headers (L2 and L3) properly.
Networking subsystem doesn't verify or alter the headers while
sending or receiving the packets. This version supports packet
socket over Etherent only. Also combination of other family
and protocols doesn't work (i.e. Application can not open
packet-socket and non packet-socket together).
Signed-off-by: Ravi kumar Veeramally <ravikumar.veeramally@linux.intel.com>
If packet family is AF_PACKET and CONFIG_NET_SOCKETS_PACKET
is enabled, just handover the packet to driver for sending.
L2 layer will not touch AF_PACKETs at the moment.
Signed-off-by: Ravi kumar Veeramally <ravikumar.veeramally@linux.intel.com>
If CONFIG_NET_SOCKETS_PACKET is enabled, then feed the packet
to net_packet_socket_input() for processing. It will search
for the net_contexts and if proper handler is found, pass
the packet to connection handler.
Signed-off-by: Ravi kumar Veeramally <ravikumar.veeramally@linux.intel.com>
This commit adds basic packet socket support to net_context and
allows application to receive or send network packets in raw
format.
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
Signed-off-by: Ravi kumar Veeramally <ravikumar.veeramally@linux.intel.com>
As we are adding more protocol families and protocol types
to connection handlers, some values might be same across
different types. Current connection handler only stores
proto type to match the handler, which is not enough if
we add more types. Also combination of family and types
may vary too. So adding family to connection handler to
figure out best match.
Also changing proto variable in net_conn from u8_t to u16_t.
net_context has 16 bit proto.
Signed-off-by: Ravi kumar Veeramally <ravikumar.veeramally@linux.intel.com>
Various defines and helpers for supporting packet sockets.
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
Signed-off-by: Ravi kumar Veeramally <ravikumar.veeramally@linux.intel.com>
When creating net_pkt, the default value of net_pkt data_len was
set to zero. In case of RAW sockets, when family is AF_PACKET,
the data_len will be zero as there is no higher level protocol
information. So in this case, the default value of data_len
must be set to interface MTU
Signed-off-by: Ravi kumar Veeramally <ravikumar.veeramally@linux.intel.com>
Add ETH_P_xxx protocol types if they are missing. After this
we can use the protocol types when working with BSD sockets.
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
The return value of net_if_get_link_addr points to a struct net_linkaddr
instead of to the raw MAC address. Without this fix the source address
will always end in 06:03 and will most likely be the same for different
boards running the same software.
Signed-off-by: Daniel Glöckner <dg@emlix.com>
Translate HCI error codes to POSIX error codes in order to be able to
distinguish reason of connectable advertising start failure.
Signed-off-by: Filip Kubicz <filip.kubicz@nordicsemi.no>
Return meaninful HCI error when it's not possible to start advertising
because of maximum number of connections already in use.
Signed-off-by: Filip Kubicz <filip.kubicz@nordicsemi.no>
Less spammy and as easy to understand ("label" seems a bit confusing
though, but it's consistent with other code).
Also simplify some surrounding code, and clean up the implementation of
str_to_label() a bit.
Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
Pass the dictionary of definitions directly. Shorter and clearer.
Also get rid of some other temporary variables, a redundant str() call,
and some mysterious commented-out code in _extract_flash().
Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>