Commit Graph

42031 Commits

Author SHA1 Message Date
chao.an
aab03ef86d net/tcp: add window scale support
Reference here:
https://tools.ietf.org/html/rfc1323

Signed-off-by: chao.an <anchao@xiaomi.com>
2021-07-07 03:55:41 -05:00
chao.an
a5cdc4e69b net/tcp: change the tcp optdata to dynamic arrays
Signed-off-by: chao.an <anchao@xiaomi.com>
2021-07-07 03:55:41 -05:00
chao.an
87bffc190c net/tcp: remove the invalid break during tcp option loop
Signed-off-by: chao.an <anchao@xiaomi.com>
2021-07-07 03:55:41 -05:00
cgeng
d656417917 Fix compilation error when CONFIG_DEBUG_PWM_INFO on stm32h7 2021-07-07 03:46:31 -05:00
Dong Heng
2d6c1044fb boards/esp32c3-devkit: Fix compiling error
Add UID defconfig to check compiling error.
2021-07-07 02:49:52 -05:00
transistorretorcido
494e53668e added PCF8574 backpack support
added PCF8574 backpack support

added PCF8574 backpack support

added PCF8574 backpack support
2021-07-06 21:50:42 -05:00
chao.an
e506b2a52c usrsock/recv: guarantee all data is received before close
adjust the close sequence to avoid data discard

Signed-off-by: chao.an <anchao@xiaomi.com>
2021-07-07 08:40:55 +09:00
Alexander Lunev
8fd64854f5 stm32,stm32f7,stm32h7: supported ETH MAC promiscuous mode 2021-07-06 19:11:56 -03:00
Xiang Xiao
f0961f43a6 boards/esp32c3-devkit: Add etctmp to .gitignore
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2021-07-06 09:49:43 -05:00
Xiang Xiao
d5c1979aad fs/procfs: layout the output of meminfo correctly
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Change-Id: Ic30e70772e19a43e2ad3b298e3ba1ac77f2f2219
2021-07-06 05:39:02 -07:00
Fotis Panagiotopoulos
9976635390 lpc17_40: fixed compiler warnings. 2021-07-06 06:17:59 -05:00
chenwen
97b8e90d79 boards/esp32c3: Add romfs configuration 2021-07-06 05:25:14 -05:00
buyuer
0f77a30b22 Add include header file <sys/types.h> to rpmsg.h.
When use netpacket/rpmsg.h,the compiler prompt that sa_family_t is not defined.

Signed-off-by: buyuer <dingddding@163.com>
2021-07-06 05:23:46 -05:00
chao.an
b901f22c27 net/socket: add SO_RCVBUF support
Signed-off-by: chao.an <anchao@xiaomi.com>
2021-07-06 01:44:55 -05:00
Sara Souza
a5bf47b93e xtensa/esp32: Fixes issue with UART 2 2021-07-05 23:20:26 -05:00
Sara Souza
d67852da4b xtensa/esp32: Change default pins of UART2 2021-07-05 23:20:26 -05:00
Dong Heng
475becac37 risc-v/esp32c3: Add board_ioctl and board_uniqueid 2021-07-05 23:12:17 -05:00
Nathan Hartman
935c206bd4 Documentation: Fix typos
Documentation/reference/os/wqueue.rst:
    * Fix spelling, grammar, and typos.
    * Improve wording in a few areas.
    * Re-wrap the paragraphs that were modified.
2021-07-05 23:08:21 -05:00
Xiang Xiao
841a4922aa binfmt: Replace all nx_ API with file_ API
since binfmt is a kernel component

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2021-07-06 11:18:13 +09:00
Xiang Xiao
8612af4ae5 fs: Implement file_mmap and file_munmap API
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2021-07-06 11:18:13 +09:00
Xiang Xiao
2b0b298ab6 fs/mmap: Remove rammap_initialize declaration
Forget in patch:
commit ec30d6ef6b
Author: Xiang Xiao <xiaoxiang@xiaomi.com>
Date:   Thu Jun 24 01:42:11 2021 +0800

    fs: Initialize fs_allmaps_s::exclsem in declaration directly

    and then remove rammap_initialize and caller

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2021-07-06 11:18:13 +09:00
Fotis Panagiotopoulos
2f0b4eb363 lpc17xx: Added WDT driver. 2021-07-05 11:25:51 -05:00
chao.an
eabe535de7 net/inet: add support of FIONREAD
Signed-off-by: chao.an <anchao@xiaomi.com>
2021-07-05 06:20:52 -05:00
chao.an
ebf89ff63b mm/iob: add iob_get_queue_size() helper
Signed-off-by: chao.an <anchao@xiaomi.com>
2021-07-05 06:20:52 -05:00
Xiang Xiao
75bfa4584c mm: Add kmm_malloc_size and mm_malloc_size
make malloc_size implementation align with malloc

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Change-Id: I8d7781925f06e58a880437a16569dccbfd2ea035
2021-07-05 14:23:24 +09:00
Xiang Xiao
ddaa3e42b9 mm: Move the real implementation of mm_sbrk to sbrk
and remove mm_sbrk and kmm_sbrk since it's wrong to expose
sbrk to other heaps except the default userspace heap.

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2021-07-05 08:02:08 +09:00
Xiang Xiao
7b20a0d789 mm: Call memalign in malloc if ARCH_ADDRENV and BUILD_KERNEL are defined
to reuse the sbrk logic inside memalign

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2021-07-05 07:39:23 +09:00
Xiang Xiao
b3f568c216 boards/sim: Add asan config to test the custom heap
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2021-07-04 18:53:44 -03:00
Xiang Xiao
4589c369be arch/sim: Implement mm_mallinfo for the custom heap
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2021-07-04 18:53:44 -03:00
Xiang Xiao
8ebf9c92cf arch/sim: Implement malloc_size for the custom heap
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2021-07-04 18:53:44 -03:00
Xiang Xiao
f240b2e631 arch/sim: Remove host_malloc and host_calloc
use host_realloc instead

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2021-07-04 18:53:44 -03:00
Xiang Xiao
97216c220b mm: Support malloc_size function
and rename malloc_usable_size to malloc_size

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2021-07-04 18:53:44 -03:00
Xiang Xiao
f4a374b6d9 boards/sim: Add instrumentation config to notelog driver
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2021-07-04 18:52:32 -03:00
Xiang Xiao
8fe701c8ae note/notelog: Implement more sched_note callback
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2021-07-04 18:52:32 -03:00
Xiang Xiao
0941bad877 note: Move up_schednote.c to drivers/note folder
since it is general enough to work on other target

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2021-07-04 18:52:32 -03:00
Xiang Xiao
7b54b7502c fs/tmpfs: Account the filename in the allocation block
and caclulate the available block more accurately

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Change-Id: Ia6382239f422970771ccefbd6e461241a5f995a5
2021-07-04 18:51:12 -03:00
Xiang Xiao
6a09ed09f1 fs/tmpfs: Remove the temporary strdup in all place
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Change-Id: I224cc9d4ec5fd08937f9f2ddfff022866090be29
2021-07-04 18:51:12 -03:00
Xiang Xiao
c406e03cfe fs/tmpfs: Fix the memory corruption when reallocate tmpfs_directory_s
since it's hard to adjust all childern to point back the new parent
location. Let's allocate the dynamical part(e.g. tdo_entry) separately
and remove the back pointer.

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Change-Id: I53afb8336360b7845bd8ecb5aa908acea20e7797
2021-07-04 18:51:12 -03:00
Nathan Hartman
ce20211357 Fix various typos in comments and documentation
Fix typos in these files:
    * Documentation/components/drivers/character/foc.rst
    * Documentation/guides/cpp_cmake.rst
    * Kconfig
    * arch/arm/src/imxrt/imxrt_lpspi.c
    * arch/arm/src/kinetis/kinetis_spi.c
    * arch/arm/src/kl/kl_spi.c
    * arch/arm/src/lpc31xx/lpc31_spi.c
    * arch/arm/src/nrf52/nrf52_radio.h
    * arch/arm/src/s32k1xx/s32k1xx_lpspi.c
    * arch/arm/src/stm32/Kconfig
    * arch/arm/src/stm32/stm32_adc.c
    * arch/arm/src/stm32/stm32_foc.c
    * arch/arm/src/stm32/stm32_foc.h
    * arch/arm/src/stm32/stm32_pwm.c
    * arch/arm/src/stm32/stm32_spi.c
    * arch/arm/src/stm32f0l0g0/stm32_spi.c
    * arch/arm/src/stm32f7/Kconfig
    * arch/arm/src/stm32f7/stm32_spi.c
    * arch/arm/src/stm32h7/Kconfig
    * arch/arm/src/stm32h7/stm32_allocateheap.c
    * arch/arm/src/stm32h7/stm32_fmc.c
    * arch/arm/src/stm32h7/stm32_fmc.h
    * arch/arm/src/stm32h7/stm32_pwm.c
    * arch/arm/src/stm32h7/stm32_qspi.c
    * arch/arm/src/stm32h7/stm32_spi.c
    * arch/arm/src/stm32l4/stm32l4_pwm.c
    * arch/arm/src/stm32l4/stm32l4_spi.c
    * arch/arm/src/stm32l5/Kconfig
    * arch/arm/src/stm32l5/stm32l5_spi.c
    * arch/renesas/src/rx65n/rx65n_dtc.c
    * arch/renesas/src/rx65n/rx65n_usbdev.c
    * arch/risc-v/src/rv32m1/rv32m1_serial.c
    * boards/arm/stm32/b-g431b-esc1/src/stm32_foc.c
    * boards/arm/stm32/nucleo-f103rb/src/stm32_foc_ihm07m1.c
    * boards/arm/stm32/nucleo-f302r8/src/stm32_foc_ihm07m1.c
    * boards/arm/stm32h7/nucleo-h743zi2/README.txt
    * boards/risc-v/rv32m1/rv32m1-vega/README.txt
    * boards/sim/sim/sim/scripts/Make.defs
    * drivers/1wire/1wire.c
    * drivers/1wire/1wire_internal.h
    * drivers/lcd/Kconfig
    * drivers/syslog/ramlog.c
    * fs/fat/Kconfig
    * libs/libc/debug/Kconfig
    * libs/libc/machine/Kconfig
    * libs/libc/stdio/lib_libvsprintf.c
    * libs/libc/stdlib/lib_div.c
    * libs/libc/stdlib/lib_ldiv.c
    * libs/libc/stdlib/lib_lldiv.c
    * libs/libdsp/lib_observer.c
2021-07-04 11:23:26 -05:00
Anthony Merlino
a885b24cc1 Attempt to fix race condition reported in issue #3647 2021-07-04 08:54:15 -05:00
GAEHWILER Reto
38eadbb575 FAT32 kconfig entry to enforce computation of free clusters at mount
Follow up commit for [1] in response to the request to make the mount
behaviour configurable whether the number of free clusters is read
from the fsinfo section or computed (as the white paper suggests).

Default is the original behaviour of NUTTX, just read fsinfo.

[1] https://github.com/apache/incubator-nuttx/pull/3760
2021-07-04 08:26:11 -05:00
Huang Qi
50c08bf45b libc: Move pthread_key_destructor to task_info_s
Signed-off-by: Huang Qi <huangqi3@xiaomi.com>
2021-07-04 07:36:44 -05:00
ligd
ece224a7e3 sched/waitpid: handle waitpid waitting tcb->group is NULL
Fail case:
exit -> nxtask_terminate -> nxtask_exithook -> nxsched_release_tcb
                            group_leave     || nxsched_releasepid & group_leave
                                            /\
                                           /  \
                                       switch out & waitpid()

Thread A group_leave in nxtask_exithook, switch out,
Thread B do waitpid(thread A) then meet traget thread A group is NULL, error.

Change-Id: Ia181d7a13aa645ec1c3141a45839fbf79db35b17
Signed-off-by: ligd <liguiding1@xiaomi.com>
2021-07-04 06:23:59 -05:00
ligd
b83b974e92 rpmsg_socket: fix rpmsg_socket_device_destroy() multi-access
Reason:
When user call rpmsg_socket_close() at the same time
rpmsg_socket_ns_unbind() is called by remote CPU,
then will meet multi-access to rpmsg_socket_device_destroy()

Fix:
reuse recvlock to handle this

Change-Id: I8f33658f19c56a4000382ff9355ff052c45afea0
Signed-off-by: ligd <liguiding1@xiaomi.com>
2021-07-04 06:23:07 -05:00
SPRESENSE
3a22af5d9b boards: cxd56xx: Change c++ option to -std=c++11
Change CXXFLAGS from -std=c++98 to -std=c++11.
2021-07-04 00:36:20 -05:00
SPRESENSE
b3389cf751 arch: cxd56x: Add support for power management debug output
Add support for power management debug output.
2021-07-04 00:36:07 -05:00
SPRESENSE
7af6b394de arch: cxd56x: Add Kconfig for power management debug output
Add configurations for power management debug output to Kconfig.
2021-07-04 00:36:07 -05:00
SPRESENSE
4738f69569 arch: cxd56x: pmic: Fix a compile error
Replace undefined logerr to _err function.
2021-07-04 00:36:07 -05:00
SPRESENSE
5c26d68f31 arch: cxd56x: Add a configuration for PMIC interrupts
Add a configuration for PMIC interrupts to Kconfig.
2021-07-04 00:36:07 -05:00
SPRESENSE
618661df93 arch: cxd56xx: Fix compile error when CONFIG_LIBM is disabled
It is no longer necessary to define CONFIG_ARCH_MATH_H when we would
like to link libm.a other than nuttx math library. So, this commit
removes the error condition.
2021-07-04 00:36:07 -05:00