Commit Graph

52676 Commits

Author SHA1 Message Date
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
xuxin19
92987708ec cmake:adapt BOARD_CONFIG absolute paths and relative paths when reconfig
Define `NUTTX_DEFCONFIG` and `NUTTX_BOARD_ABS_DIR` instead of `BOARD_CONFIG`

when reconfiguring a custom configuration,
because ${BOARD_CONFIG} uses a relative path,
it will cause the following error:
CMake Error at CMakeLists.txt:134 (message)
  No config file found at

Signed-off-by: xuxin19 <xuxin19@xiaomi.com>
2024-02-23 18:15:56 -08:00
p-szafonimateusz
3e5d558f4c qemu-intel64/ostest: enable DEBUG_FULLOPT
DEBUG_FULLOPT enables many x86 related optimizations which can
be broken in many ways (eg. not aligned stack).
With this change it's easier to catch changes that breaks x86_64.

Signed-off-by: p-szafonimateusz <p-szafonimateusz@xiaomi.com>
2024-02-23 12:04:54 -03:00
p-szafonimateusz
53fcaede28 qemu-intel64/qemu.ld: align _ebss to 16
Align _ebss to 16, otherwise g_idle_topstack is not correctly aligned.
For some reason the previous alignment worked with make buit but in case
of cmake with optimization enabled, the IDLE stack was misaligned which
caused vector instruction misalignment exception.

Signed-off-by: p-szafonimateusz <p-szafonimateusz@xiaomi.com>
2024-02-23 12:04:54 -03:00
p-szafonimateusz
16e47d6c8b arch/intel64: fix stack alignment
The stack pointer must be aligned to 16 bytes, otherwise the system crash on the first unaligned data access with vector instruction.
The problem is only observable with optimization enabled, when vector instructions are generated.

Signed-off-by: p-szafonimateusz <p-szafonimateusz@xiaomi.com>
Signed-off-by: Bowen Wang <wangbowen6@xiaomi.com>
2024-02-23 12:04:54 -03:00
p-szafonimateusz
c3d41195c7 arch/intel64/stackframe.c: fix memset size
this is a follow up to the change from 2335b69120 which missed
updating stack frame length for this memset

Signed-off-by: p-szafonimateusz <p-szafonimateusz@xiaomi.com>
2024-02-23 12:04:54 -03:00
Alan Carvalho de Assis
a7fbf7c5cf DOC: Fix https://github.com/apache/nuttx/issues/11760
The Make.defs to CustomHello example was missing.

Signed-off-by: Alan C. Assis <acassis@gmail.com>
2024-02-23 15:33:53 +01:00
Zhe Weng
5eb08a4b33 net: Fix minor coding problems
Fix minor problems when reading codes:
- icmpv6_autoconfig: Call net_unlock before return
- pkt_sendmsg: Return error for types other than SOCK_RAW

Signed-off-by: Zhe Weng <wengzhe@xiaomi.com>
2024-02-23 10:34:23 -03:00
Yanfeng Liu
e0de25f82c risc-v/k230: update AMP related document
This patch update documents to reflect the fact that remote node is kicked
off by master node. It also adds debug dump to aid the MISA reading issue
investigation.

Signed-off-by: Yanfeng Liu <yfliu2008@qq.com>
2024-02-23 04:21:09 -08:00
Zhe Weng
1eaeef5251 Documentation: Add documentation for packet sockets
Signed-off-by: Zhe Weng <wengzhe@xiaomi.com>
2024-02-23 08:32:49 +01:00
Zhe Weng
da536bed9c Documentation: Move nat.rst and netdev.rst to net/
Signed-off-by: Zhe Weng <wengzhe@xiaomi.com>
2024-02-23 08:32:49 +01:00
Zhe Weng
9a23ebdbc0 net/pkt: Support binding to devices other than ETH
We're using the `sll_ifindex` inside `struct sockaddr_ll` to bind
device, so we don't need to translate it into mac address, we can just
match the index, which also let us bind to different type of devices
other than Ethernet.

Ref: Linux also uses `ifindex` to find related device and note it down without mac addresses.
https://man7.org/linux/man-pages/man7/packet.7.html
https://github.com/torvalds/linux/blob/v6.7/net/packet/af_packet.c#L3328
https://github.com/torvalds/linux/blob/v6.7/net/packet/af_packet.c#L3264-L3265

Signed-off-by: Zhe Weng <wengzhe@xiaomi.com>
2024-02-22 21:21:48 -08:00
Michał Łyszczek
aa75b7f27c stm32/stm32f30xxx_rcc.c: fix broken flash setup
During removal of F1 related stuff, code that configures FLASH
latency was removed, which rendered some of the F3 line unbootable.

It was done by mistake, since previous removed block was
'#ifdef VALUE_LINE', and block with FLASH code was '#ifndef VALUE_LINE'
and so it should not have been removed.

Signed-off-by: Michał Łyszczek <michal.lyszczek@bofc.pl>
2024-02-23 06:11:26 +01:00
p-szafonimateusz
9b0017659c arch/x86_64: add cmake support
Signed-off-by: p-szafonimateusz <p-szafonimateusz@xiaomi.com>
2024-02-23 07:45:57 +08:00
Alan Carvalho de Assis
45fd5d44bd DOC: Fix NXPlayer name typo 2024-02-22 08:09:44 -08:00
nuttxs
d2b4734756 Deinitialize ESP32-S3 SPI slave GDMA engine 2024-02-22 04:34:29 -08:00
chao an
996b9377a7 arch/tricore: add Infineon AURIX TriCore support
Add support for tricore TC397

1. Porting based on AURIX TC397 KIT_A2G_TC397_5V_TFT evaluation board

   https://www.infineon.com/cms/en/product/evaluation-boards/kit_a2g_tc397_5v_tft/

2. In order to avoid license and coding style issues, The chip-level code
   still uses the implementation of AURIX Development Studio SDK.
   The SDK package will be downloaded as a third-party package during compilation:

   https://github.com/anchao/tc397_sdk

3. Single core only, SMP implementation will be provided in the future.
4. Implemented the basic System Timer, ASCLIN UART driver.
5. Only the Tasking tool chain is supported (ctc/ltc, license maybe required)
6. 'ostest' can be completed on the TC397 development board.

How to run?

1. Setup the tasking toolchain and license

$ export TSK_LICENSE_KEY_SW160800=d22f-7473-ff5d-1b70
$ export TSK_LICENSE_SERVER=192.168.36.12:9090

2. Build nuttx ELF

$ ./tools/configure.sh tc397/nsh
$ make -j
...
artc I800: creating archive libc_fpu.a
LD: nuttx

3. Switch to windows PC, setup AURIX-studio to Debugger Launcher

4. Replace runing ELF to nuttx, and re-download ELF

Signed-off-by: chao an <anchao@lixiang.com>
2024-02-21 21:39:19 -08:00