This value allows to set max payload length of a TLS protocol
message, and passed thru to mbedTLS as MBEDTLS_SSL_MAX_CONTENT_LEN
setting. The only safe value is 16384, which translates to 32KB
of RAM required just for mbedTLS input/output buffers. Any other
value can be configured *only* per a particular application
(e.g. knowing that it won't pass more than spefific amount of
data at once and/or won't connect to a server with a long cert
chain). Previosuly, we had quite an adhoc and inflexible config
with random values for that setting, based on protocol.
Note that while the safe value is 16384, "backward compatible"
default of 1500 is used (good for DTLS on the other hand).
Signed-off-by: Paul Sokolovsky <paul.sokolovsky@linaro.org>
The test verifies the API functionality of _thread_essential_clear(),
_thread_essential_set() and _is_thread_essential()
Signed-off-by: Spoorthi K <spoorthi.k@intel.com>
Adding missing dependency to the "getting started" documentations.
Without the python3-wheel package, running "pip3 -r requirements.txt"
on a Debian system will fail.
Signed-off-by: Iván Sánchez Ortega <ivan@sanchezortega.es>
For ISOOUT transaction, check if the buffer is empty before starting
the DMA and for ISOIN case check if the buffer is available to start
the DMA for IN transaction. This handling was swapped. So, handle it
accordingly.
Signed-off-by: Sundar Subramaniyan <sundar.subramaniyan@gmail.com>
Problem:
cdc_acm sample outputs junk characters to the console when any key
is pressed. It is supposed to echo the same character as the input.
Analysis:
nRF52840 USB driver always reads 64 bytes from the USB peripheral's
local buffer irrespective of the data length. Even when 1 byte
is sent by the host, the usb driver receives as 64 bytes.
Since the maximum packet size value had been used when setting up
the EasyDMA's MAXCNT register for OUT transactions, DMA transffered
the entire 64 bytes of it's local buffer into the data RAM
irrespective of the OUT data length, containing garbage at the end
of useful payload. For some applications like hci_usb the extra
bytes were being ignored. But for cdc_acm, the entire 64 bytes
is getting echoed back displaying garbled characters on the terminal.
Fix:
For OUT endpoints, the amount of data received by USBD to its local
buffer should be read using SIZE.EPOUT[x] registers in the case of
BULK and INTERRUPT endpoints and SIZE.ISOOUT register for ISOOUT
endpoint. This value should be set to the EasyDMA maxcnt register
to DMA into RAM buffer. Fix this issue for Bulk, Interrupt and
ISOOUT endpoints.
Signed-off-by: Sundar Subramaniyan <sundar.subramaniyan@gmail.com>
This is a component of address space layout randomization that we can
implement even though we have a physical address space.
Support for upward-growing stacks omitted for now, it's not done
currently on any of our current or planned architectures.
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
This was previously just a #define in one header file, but we need
this expressed in Kconfig space in case some feature only works
properly with downward-growing stacks.
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
There are 174 RX/TX net pkt reserved, this make build fail
with some boards due to ram overflow (e.g quark_se_c1000).
Fix this by reducing NET_PKT RX/TX reserve to 100, which
seems fair enough for this use case. Moreover, don't think
there is any reason to have more NET_PKT than NET_BUF.
Signed-off-by: Loic Poulain <loic.poulain@linaro.org>
Add new status event indicating an interface has been selected.
Interface and its endpoint(s) are enabled.
Signed-off-by: Loic Poulain <loic.poulain@linaro.org>
For now tx-fifo sizes are not configured (cf usb_dw_set_fifo).
Default fifo size is 136 bytes and sending more than 136 bytes
makes the data split into incorrect chunk size.
This patch prevents this by reducing available fifo size to a
multiple of the endpoint max packet size.
Signed-off-by: Loic Poulain <loic.poulain@linaro.org>
The transfer API provides 'high' level functions to manage sending and
reception of USB data. A USB (class) driver has to register the generic
usb_transfer_ep_callback as endpoint status callback in order to use
the API.
With this API, the class driver does not need to take care of low-level
usb transfer management (packet splitting, ZLP, synchronization...).
The usb_transfer methods will split transfer into multiple transactions
depending endpoint max size and controller capabilities.
Once the transfer is completed, class driver is notified by a callback.
The usb_transfer method can be executed in IRQ/atomic context.
A usb_transfer synchronous helper exists which block-waits until
transfer completion.
In write case, a transfer is complete when all data has been sent.
In read case, a transfer is complete when the exact amount of data
requested has been received or if a short-pkt (including ZLP) is
received.
transfer methods are thread-safe.
A transfer can be cancelled at any time.
Signed-off-by: Loic Poulain <loic.poulain@linaro.org>
If we enable CONFIG_DEBUG_INFO, then we need to fixup the stack
on thread entry so that the EFLAGS value in the EBP slot doesn't
confuse the debugger or any runtime stack unwinding code.
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
Since this function is used on some drivers, and knowing these drivers
can be built for OpenThread, let's make it generic and out of the
802.15.4 L2 stack.
Fixes#5942
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
With recent master, this sample started to overflow ROM area of
arduino_101, which has 144K of it:
Memory region Used Size Region Size %age Used
ROM: 149420 B 144 KB 101.33%
RAM: 26228 B 52 KB 49.26%
IDT_LIST: 564 B 2 KB 27.54%
MMU_LIST: 0 GB 1 KB 0.00%
Signed-off-by: Paul Sokolovsky <paul.sokolovsky@linaro.org>
Currently, it seems that only boards with smaller amount of RAM
get a value for "ram" property, and very few boards have "flash"
defined. However, to test bigger sample applications, it's helpful
to have these properties universally defined.
Signed-off-by: Paul Sokolovsky <paul.sokolovsky@linaro.org>
Added support for Waveshare BLE400 board.
Tested it with the following samples and confirm it work.
- samples/basic/blinky
- samples/basic/button
- samples/basic/fade_led
- samples/basic/threads
Signed-off-by: Roman Tataurov <diytronic@yandex.ru>
SRAM size is very small and so we cant fit the test-suite inside.
Hence disabling the execution on boards with very small RAM region.
Example: quark_d2000 & nucleo f030
Signed-off-by: Adithya Baglody <adithya.nagaraj.baglody@intel.com>
Added new test cases to increase the impact of the test cases.
The following are the brief description of the testcases:
1. Incorrect receiver address.
2. Incorrect transmit address.
3. Mbox_get timeout occurs when not able to retrive a msg.
4. Discard a msg by passing an invalid pool id.
5. Msg id mismatch between the receiver and transmitter.
6. Copy tx buffer to a new block in the pool.
7. Copy a big tx buffer to a block in the pool but no block
can fit it.
8. Dispose a msg as soon as it is read.
9. Free tx pool when we read the msg.
10. A Asynchronous put unblocks a waiting get.
11. A Asynchronous put sends a wrong address to a waiting get.
12. Multiple Asynchronous put populates the msg_q and mbox_get
retrives it.
13. Multiple waiting mbox_get and each put unblocks it one at a time.
Signed-off-by: Adithya Baglody <adithya.nagaraj.baglody@intel.com>
Describe in documentation few methods that can be used by
users to flash the ArgonKey with a binary image.
Signed-off-by: Armando Visconti <armando.visconti@st.com>
Modified the testcase for comparing the successive random
numbers generated by sys_rand32_get(). Also, added new configs
for verifying different sources of random number generation.
Signed-off-by: Praful Swarnakar <praful.swarnakar@intel.com>
If net-shell is enabled then it could try to access neighbor state
names. This would cause compile error as net_ipv6_nbr_state2str()
function is then missing.
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
Current implementation of cdc_acm writes 4 bytes for quark_se at a time
and current code misses remaining data chunks. Make sense to check
written bytes for other platforms as well.
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
We don't currently build on qemu_xtensa because completion is missing.
Seems like we have some dependency issue.
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
Fixes#6577.
Wait for all ongoing transmits to complete before de-asserting CS.
When doing a tx then rx, wait for the previous tx to complete before
flushing the rx buffer.
Tested on the Arduino Zero against a Olimex MOD-NRF24L module.
Signed-off-by: Michael Hope <mlhx@google.com>
stm32l0xx_ll_spi.h causes compile warnings about aliasing.
Solution for F0 works here as well.
Tested on STM32L073RZ with 16-bit transfers.
Signed-off-by: Ilya Tagunov <tagunil@gmail.com>
We need to check the debug level to be INFO or higher, otherwise
the some of the variables in net app init.c will give unused
warning. Also the sys_log.h needs to be included _after_ we have
set the logging level, this is done by net_core.h so we should
not include the syslog header file here.
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>