Commit Graph

52642 Commits

Author SHA1 Message Date
ligd 27ef7576ff arm64/defconfig: improve the arm64 defconfig
Signed-off-by: ligd <liguiding1@xiaomi.com>
2024-03-01 21:05:00 +09:00
ligd 85bc84f5c5 arm64: remove the CONFIG_DEBUG_SCHED_INFO=y
Signed-off-by: ligd <liguiding1@xiaomi.com>
2024-03-01 21:05:00 +09:00
chao an 954bffcbd7 sched/tls: inline group info in flat mode to improve performance
inline group info in flat mode to improve the task create/destroy performance

Signed-off-by: chao an <anchao@lixiang.com>
2024-03-01 17:27:26 +08:00
Xiang Xiao 9d5471349f ci: Remove the codecheck from build.yml
the check isn't really enabled and enforce before
due to a mass of false alarm, but recently it break
ci frequently, so it's better to remove it now.

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2024-02-29 18:54:41 -03:00
Tiago Medicci Serrano b03c9cf5f8 esp32s3: Fix symbol collision between mbedTLS and the Wi-Fi driver
This commit closes #11738. Actual fix is tracked in:
https://github.com/espressif/esp-hal-3rdparty/pull/2
2024-02-29 20:47:19 +01:00
Xiang Xiao 61d9394366 net/local: Add local_freectl to avoid the code duplicaton
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2024-02-29 16:28:01 -03:00
Xiang Xiao c7a513b182 net/local: Remove the check of SOCK_STREAM before local_stream_connect
since psock_local_connect is called only when the socket is SOCK_STREAM

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2024-02-29 16:28:01 -03:00
Xiang Xiao 039a3eccf4 net/local: Initialize lc_crefs to 1
and remove local_addref call after local_alloc

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2024-02-29 16:28:01 -03:00
Xiang Xiao 86039057f8 net/local: Remove the unused lc_psock from local_conn_s
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2024-02-29 16:28:01 -03:00
ligd 7ccdd29f3e local: correct shutdown state when use UDP mode
Signed-off-by: ligd <liguiding1@xiaomi.com>
Signed-off-by: chao an <anchao@xiaomi.com>
2024-02-29 16:28:01 -03:00
chao an 6d50274ebe nuttx/list: rename container_of to list_container_of from public header
Use private naming to avoid conflicts with user applications

In file included from libuv/src/unix/internal.h:25,
                 from libuv/src/unix/udp.c:23:
libuv/src/uv-common.h:57: warning: "container_of" redefined
   57 | #define container_of(ptr, type, member) \
      |
In file included from nuttx/include/nuttx/list.h:47,
                 from nuttx/include/nuttx/tls.h:40,
                 from nuttx/include/nuttx/sched.h:48,
                 from nuttx/include/nuttx/arch.h:87,
                 from nuttx/include/nuttx/userspace.h:35,
                 from nuttx/include/nuttx/mm/mm.h:30,
                 from nuttx/include/nuttx/kmalloc.h:34,
                 from nuttx/include/nuttx/lib/lib.h:31,
                 from nuttx/include/stdio.h:35,
                 from apps/system/libuv/libuv/include/uv.h:59,
                 from libuv/src/unix/udp.c:22:
nuttx/include/nuttx/nuttx.h:48: note: this is the location of the previous definition
   48 | #define container_of(ptr, type, member) \
      |

Signed-off-by: chao an <anchao@lixiang.com>
2024-02-29 19:44:54 +08:00
Yanfeng Liu 9f62947d40 build/cmake: fix empty BASE_DEFCONFIG string
Currently CMake system has empty string for BASE_DEFCONFIG option.
This patch fills value for it.

Signed-off-by: Yanfeng Liu <yfliu2008@qq.com>
2024-02-28 10:58:52 +01:00
chenwen@espressif.com 1665114fd1 xtensa/esp32: Fix issue of system blocking when SPIRAM is used as stack
Signed-off-by: chenwen@espressif.com <chenwen@espressif.com>
2024-02-28 13:31:30 +08:00
chenwen@espressif.com c14888e759 xtensa/esp32s3: Add the return value of SPI driver
Signed-off-by: chenwen@espressif.com <chenwen@espressif.com>
2024-02-28 13:30:18 +08:00
chao an 9b1c451f2f assert/panic: disable panic message to save the code size
Requirement of nuttx as a minimum scheduler os.

Test build on Cortex-R52, fvp-armv8r-aarch32/nsh

Disable CONFIG_DEBUG_ASSERTIONS and without this change:
$ size nuttx
   text	   data	    bss	    dec	    hex	filename
  19484	    104	   1092	  20680	   50c8	nuttx

Disable CONFIG_DEBUG_ASSERTIONS and with this change:
$ size nuttx
   text	   data	    bss	    dec	    hex	filename
  17604	     80	    848	  18532	   4864	nuttx

Signed-off-by: chao an <anchao@lixiang.com>
2024-02-27 10:33:43 -03:00
p-szafonimateusz 4123615621 x86_64: move PCI bus initialization from qemu-intel64 to common x86_64 and initialize PCI in up_initialize()
many PCI devices must be initialized early during boot process (e.g. PCI serial port)

Signed-off-by: p-szafonimateusz <p-szafonimateusz@xiaomi.com>
2024-02-27 10:30:54 -03:00
p-szafonimateusz cdfce8a055 arch/x86_64: add spinlock support
Add spinlock support for x86_64, needed for SMP

Signed-off-by: p-szafonimateusz <p-szafonimateusz@xiaomi.com>
2024-02-27 10:27:34 -03:00
Huang Qi 561378ba6b rv-virt: Add libcxx to configs
Basic configs for libcxx and cxxtest on rv32/rv64.

Signed-off-by: Huang Qi <huangqi3@xiaomi.com>
2024-02-27 21:25:20 +08:00
Huang Qi fdaacb9408 rv-virt: Add .init_section to linker script
Provide _sinit/_einit to make it possible to enable
libcxx on rv-virt platform.

Signed-off-by: Huang Qi <huangqi3@xiaomi.com>
2024-02-27 21:25:20 +08:00
chao an b413a1f4f7 arm/armv8-r: fix build break if disable CONFIG_UART_PL011
Common code should support the if PL011 is not enabled

Signed-off-by: chao an <anchao@lixiang.com>
2024-02-27 21:22:40 +08:00
raiden00pl 547342ca50 sensors/bmi160: fix compilation errors
fix compilation errors about undefined reference to `bmi160_configspi'
2024-02-27 13:01:32 +01:00
SPRESENSE 07ec18f088 boards: spresense: Add reset control on BLE1507 Add-on board
Add reset pin selection on BLE1507 Add-on board.
2024-02-27 13:00:51 +01:00
SPRESENSE 51b3dbb78d sensors: Remove duplicated defnitions from bmi160.h
Remove duplicated defnitions from bmi160.h.
2024-02-27 13:00:23 +01:00
chao an 17198594a8 nuttx/tls: remove the tls warning since pthread could be disabled
include/nuttx/tls.h:52:4: warning: #warning CONFIG_TLS_NELEM is not defined [-Wcpp]
   52 | #  warning CONFIG_TLS_NELEM is not defined
      |    ^~~~~~~
In file included from include/nuttx/sched.h:48,
                 from include/nuttx/arch.h:87,
                 from include/nuttx/userspace.h:35,
                 from include/nuttx/mm/mm.h:30,
                 from include/nuttx/kmalloc.h:34,
                 from sim_bringup.c:33:
include/nuttx/tls.h:52:4: warning: #warning CONFIG_TLS_NELEM is not defined [-Wcpp]
   52 | #  warning CONFIG_TLS_NELEM is not defined
      |    ^~~~~~~

Signed-off-by: chao an <anchao@lixiang.com>
2024-02-27 13:21:54 +08:00
SPRESENSE 9d4da42aa8 driver/alt1250: Modify return value
Use macro for retrurn value.
2024-02-27 13:16:52 +08:00
SPRESENSE 6915fab2f7 driver/alt1250: Notice instance information
Notice instance information of LwM2M server operation to application.
2024-02-27 13:16:52 +08:00
Michał Łyszczek 5ddb1fcbf7 boards/stm32f411-minimum: remove non existing include in Kconfig
This is leak from another feature that was not yet meant to be
pushed.

Signed-off-by: Michał Łyszczek <michal.lyszczek@bofc.pl>
2024-02-27 09:30:09 +08:00
Michał Łyszczek d904a02392 boards/stm32f411-minimum: add support for hx711 driver
Signed-off-by: Michał Łyszczek <michal.lyszczek@bofc.pl>
2024-02-26 19:16:51 -03:00
Michał Łyszczek 84a2cab886 drivers/analog/hx711.c: Add driver for hx711 adc
Signed-off-by: Michał Łyszczek <michal.lyszczek@bofc.pl>
2024-02-26 19:16:51 -03:00
p-szafonimateusz b634798bd6 qemu-intel64: add .note.gnu.* to linker script
this prevents section overlap linker errors which sometimes occurs:

  ld: section .rodata LMA [0000000000990000,00000000009c1f27] overlaps section .note.gnu.property LMA [000000000098ffe0,000000000099000f]
  make[1]: *** [Makefile:114: nuttx.elf] Error 1

Signed-off-by: p-szafonimateusz <p-szafonimateusz@xiaomi.com>
2024-02-26 18:18:48 -03:00
p-szafonimateusz b3c4f3afc3 x86_64/common/Toolchain.defs: change optimization to -Os for CONFIG_DEBUG_FULLOPT
change optimization to -Os for CONFIG_DEBUG_FULLOPT to be compatible with other architectures
and add an option to select CONFIG_DEBUG_CUSTOMOPT

Signed-off-by: p-szafonimateusz <p-szafonimateusz@xiaomi.com>
2024-02-26 18:18:20 -03:00
p-szafonimateusz 3a3341ba0e arch/intel64: enable FPU and implement up_fpucmp to pass ostest
enable FPU and implement up_fpucmp to pass ostest

With aggressive optimization enabled (-O2/-O3), ostest FPU test will fail.
This is because the compiler will generate additional vector
instructions between subsequent up_fpucmp() calls (loop vectorization
somewhere in usleep() call), which will consequently overwrite
the expected FPU context (XMM registers).

Signed-off-by: p-szafonimateusz <p-szafonimateusz@xiaomi.com>
2024-02-26 18:17:37 -03:00
p-szafonimateusz e967be059a newlib: fix compilation for sincosl
aggresive optimisation can replace occurrences of sinl() and cosl() with
sincosl(), but sincosl() is missing in newlib which causes error. So let's
use custom implementation here.

Signed-off-by: p-szafonimateusz <p-szafonimateusz@xiaomi.com>
2024-02-26 23:56:47 +08:00
p-szafonimateusz 5288e063ec newlib: fix support for x86
Signed-off-by: p-szafonimateusz <p-szafonimateusz@xiaomi.com>
2024-02-26 23:56:47 +08:00
p-szafonimateusz b14c3e1e2e arch/intel64: add software reset support
This adds a software reset for intel64, enables the use of
the reboot command from NSH
2024-02-26 23:55:14 +08:00
chenwen@espressif.com 638df3329b xtensa/esp32s3: Fix issue of system blocking when SPIRAM is used as stack
1. Fix issue of system blocking due to disable dcache.
   2. Support Ext-SRAM-Cache mmu mapping in SMP mode.

Signed-off-by: chenwen@espressif.com <chenwen@espressif.com>
2024-02-26 12:38:30 -03:00
Yanfeng Liu 5b1486f9ce fs/procfs: add build config to /proc/version
Currently at runtime it is hard to know the exact build config of
the current NuttX instance. Thus it is inconvenient when there are
multiple configs for the same board. This patch attempts to solve
the issue by adding build config to /proc/version.

Signed-off-by: Yanfeng Liu <yfliu2008@qq.com>
2024-02-26 21:46:28 +08:00
p-szafonimateusz 743bbfcd7e arch/intel64/Kconfig: add chip choice option
this will be useful for auto selecting CPU features
2024-02-26 20:06:35 +08:00
p-szafonimateusz 39c7ae683f arch/x86_64/Kconfig: remove unused QEMU options
boards definition should be in /boards
2024-02-26 20:06:35 +08:00
Jorge Guzman b0e382be5f stm32h7/linum-stm32h753bi: Add USB console support
This commit adds support to use NSH over USB without
connecting an external USB/Serial adapter.

Signed-off-by" Jorge Guzman jorge.gzm@gmail.com
2024-02-25 16:27:57 -03:00
Yanfeng Liu 61b897f412 risc-v/k230: update LOOPSPERMSEC enable DEBUG_FEATURES
This contains minor updates for LOOPSPERMSEC and DEBUG_FEATURES in
existing configs.

Signed-off-by: Yanfeng Liu <yfliu2008@qq.com>
2024-02-24 19:03:00 -08:00
Rodrigo Sim 1647a596fe board/stm32f401rc-rs485: Add support to LM75 sensor 2024-02-24 19:01:42 -08:00
Neo Xu 0b448b35f4 fix(cmake): fix external library mode
Signed-off-by: Neo Xu <neo.xu1990@gmail.com>
2024-02-24 09:21:29 -08:00
p-szafonimateusz 5c85b8618c arch/intel64: prase multiboot2 header before revoking the lower memory
__revoke_low_memory() is called in intel64_lowsetup()

fixes b4b96a6435 (PR #11758) in which the multiboot2 header was accessed
after revoking the low memory which caused page fault.

Signed-off-by: p-szafonimateusz <p-szafonimateusz@xiaomi.com>
2024-02-24 09:21:04 -08:00
p-szafonimateusz 8c4612be50 arch/intel64: add g_ prefix to global data
to follow NuttX coding standard

Signed-off-by: p-szafonimateusz <p-szafonimateusz@xiaomi.com>
2024-02-23 18:16:10 -08:00
p-szafonimateusz 8a43bf1b50 arch/intel64: clear BSS in __nxstart
BSS nulling can now be optimized by the compiler, so it is necessary
to enable SSE instructions early in __nxstart

Signed-off-by: p-szafonimateusz <p-szafonimateusz@xiaomi.com>
2024-02-23 18:16:10 -08:00
p-szafonimateusz b4b96a6435 arch/intel64: convert __nxstart to C function and move appropriate functions there
to follow the approach in other architectures

Signed-off-by: p-szafonimateusz <p-szafonimateusz@xiaomi.com>
2024-02-23 18:16:10 -08:00
p-szafonimateusz f76017ca8a arch/intel64: format asm files, remove unused debug macros
use tab at the beginning of lines, remove C++ comments, fix some tabs to spaces

Signed-off-by: p-szafonimateusz <p-szafonimateusz@xiaomi.com>
2024-02-23 18:16:10 -08:00
xuxin19 1b7ddab317 cmake:adapt the header file symbolic link to the common directory
fix `board.h` is not set correctly when using cmake to compile a board with common directory

Signed-off-by: xuxin19 <xuxin19@xiaomi.com>
2024-02-23 18:15:56 -08:00
xuxin19 7c1de0a347 cmake:correct the dequote execution of generating config.h
handling quotation marks consistent with `cfgdefine.c`

Signed-off-by: xuxin19 <xuxin19@xiaomi.com>
2024-02-23 18:15:56 -08:00