Commit Graph

56135 Commits

Author SHA1 Message Date
wangming9 6ee747a1e6 arm/goldfish: add memory map for DDR region
Signed-off-by: wangming9 <wangming9@xiaomi.com>
Signed-off-by: lipengfei28 <lipengfei28@xiaomi.com>
2024-10-15 21:01:47 +08:00
Filipe Cavalcanti 809cdd6595 ci: add Python linter to check 2024-10-15 15:01:07 +02:00
yangsong8 0beceeb745 usb: Fix issue with the calculation descriptor length error
Signed-off-by: yangsong8 <yangsong8@xiaomi.com>
2024-10-15 21:00:29 +08:00
wangxiaoxin 366ede9530 add lin status changes the format of the reported frame and add the macros that lin needs
Signed-off-by: wangxiaoxin <wangxiaoxin@xiaomi.com>
2024-10-15 19:45:38 +08:00
wanggang26 d22ad37cd7 elf:fix a ci error
Configuration/Tool: teensy-2.0/nsh
In file included from
/github/workspace/sources/nuttx/include/nuttx/coredump.h:35:0,
                 from
/github/workspace/sources/nuttx/sched/misc/coredump.h:28,
                 from ./init/nx_bringup.c:54:
/github/workspace/sources/nuttx/include/nuttx/elf.h:31:22: fatal error:
arch/elf.h: No such file or directory

Signed-off-by: wanggang26 <wanggang26@xiaomi.com>
2024-10-15 19:41:26 +08:00
yinshengkai 8f3060ed52 boards: Enable LTO option for same70-xplained/mcuboot-loader
Avoid compilation errors due to insufficient flash in CI

Configuration/Tool: same70-xplained/mcuboot-loader,CONFIG_ARM_TOOLCHAIN_GNU_EABI
2024-10-14 16:17:34
arm-none-eabi-ld: /github/workspace/sources/nuttx/nuttx section `.ramfunc' will not fit in region `flash'
arm-none-eabi-ld: region `flash' overflowed by 52 bytes
arm-none-eabi-ld: warning: /github/workspace/sources/nuttx/nuttx has a LOAD segment with RWX permissions
make[1]: *** [Makefile:212: nuttx] Error 1
make: *** [tools/Unix.mk:551: nuttx] Error 2
make: Target 'all' not remade because of errors.

Signed-off-by: yinshengkai <yinshengkai@xiaomi.com>
2024-10-15 18:13:38 +08:00
likun17 9de0465a8a lib_libvsprintf.c:add option in Kconfig to control "%p*" special format specifier.
Signed-off-by: likun17 <likun17@xiaomi.com>
2024-10-15 15:33:13 +08:00
likun17 83914d5b29 lib_libvsprintf.c: Add support for %pB parameter.
Signed-off-by: likun17 <likun17@xiaomi.com>
2024-10-15 15:33:13 +08:00
hujun5 49b9aa0f33 arm/riscv: remove redundant judgment
Signed-off-by: hujun5 <hujun5@xiaomi.com>
2024-10-15 15:32:40 +08:00
hujun5 aa0346610b arm64: we need to initialize the percpu register storing the current task more earlier.
A call stack looks like the following:
sched_idletask
syslog_write
nx_vsyslog
syslog
getreg64
gic_validate_redist_version
arm64_gic_init
arm64_gic_secondary_init
arm64_boot_secondary_c_routine

Signed-off-by: hujun5 <hujun5@xiaomi.com>
2024-10-15 15:25:55 +08:00
hujun5 948ac9b4cc arm64: add up_this_task and up_change_task macro impl
Signed-off-by: hujun5 <hujun5@xiaomi.com>
2024-10-15 15:25:55 +08:00
hujun5 a567148888 sched: add up_this_task and up_change_task macro stub
reason:
We can utilize percpu storage to hold information about the
current running task. If we intend to implement this feature, we would
need to define two macros that help us manage this percpu information
effectively.

up_this_task: This macro is designed to read the contents of the percpu
              register to retrieve information about the current
              running task.This allows us to quickly access
              task-specific data without having to disable interrupts,
              access global variables and obtain the current cpu index.

up_update_task: This macro is responsible for updating the contents of
                the percpu register.It is typically called during
                initialization or when a context switch occurs to ensure
                that the percpu register reflects the information of the
                newly running task.

Configuring NuttX and compile:
$ ./tools/configure.sh -l qemu-armv8a:nsh_smp
$ make
Running with qemu
$ qemu-system-aarch64 -cpu cortex-a53 -smp 4 -nographic \
   -machine virt,virtualization=on,gic-version=3 \
   -net none -chardev stdio,id=con,mux=on -serial chardev:con \
   -mon chardev=con,mode=readline -kernel ./nuttx

Signed-off-by: hujun5 <hujun5@xiaomi.com>
2024-10-15 15:25:55 +08:00
xuxin19 0285c0b901 cmake(bugfix):disable proxy and service source in open-amp
since we disable find_package(libmetal) so we need to set
open_amp target include dirs link to metal target

Signed-off-by: xuxin19 <xuxin19@xiaomi.com>
2024-10-15 15:25:20 +08:00
cuiziwei 4253001656 sim/m64:Fix ld error with .rodata can not be used when making a PIE object.
/usr/bin/ld: nuttx.rel: relocation R_X86_64_32S against `.rodata' can not be used when making a PIE object; recompile with -fPIE
/usr/bin/ld: failed to set dynamic section sizes: bad value

Signed-off-by: cuiziwei <cuiziwei@xiaomi.com>
2024-10-15 14:45:42 +08:00
Bowen Wang 71ee767fe2 vsprintf:fix bug when print int64 0x8000000000000000
stdio/lib_libvsprintf.c:1018:17: runtime error: negation of -9223372036854775808 cannot be
represented in type 'long long int'; cast to an unsigned type to negate this value to itself
    #0 0x3326a86 in vsprintf_internal stdio/lib_libvsprintf.c:1018
    #1 0x332926b in lib_vsprintf stdio/lib_libvsprintf.c:1363
    #2 0x3777978 in vfprintf stdio/lib_vfprintf.c:52
    #3 0x671b3a0 in printf stdio/lib_printf.c:44
    #4 0x37abc0c in hello_main /data/project/code/vela-pt/apps/examples/hello/hello_main.c:38
    #5 0x33201d3 in nxtask_startup sched/task_startup.c:70
    #6 0x3208ecb in nxtask_start task/task_start.c:134
    #7 0x3357a49 in pre_start sim/sim_initialstate.c:52

Signed-off-by: Bowen Wang <wangbowen6@xiaomi.com>
2024-10-15 08:14:59 +02:00
cuiziwei bbf60ec685 gnu++20:fix ld error.
LD: nuttx
arm-none-eabi-ld: warning: net_sendfile.o: missing .note.GNU-stack section implies executable stack
arm-none-eabi-ld: NOTE: This behaviour is deprecated and will be removed in a future version of the linker
arm-none-eabi-ld: warning: nuttx/nuttx has a LOAD segment with RWX permissions
arm-none-eabi-ld: apps/staging/libfeature.a(feature_framework.cpp.frameworks.base.feature_1.o): in function `std::__1::__throw_length_error[abi:un170006](char const*)':

Signed-off-by: cuiziwei <cuiziwei@xiaomi.com>
2024-10-15 12:57:52 +08:00
cuiziwei 68e25dcee6 nuttx/x86_64:Add _sinit and _einit initialization.
Signed-off-by: cuiziwei <cuiziwei@xiaomi.com>
2024-10-15 12:57:31 +08:00
xuxin19 696e1a3f70 cmake(fix warning):toolchain do not have parent scope
toolchain file variable is global scope
dont need set parent scope

clear warning:
CMake Warning (dev) at /github/workspace/sources/nuttx/arch/arm/src/cmake/gcc.cmake:69 (set):
  Cannot set "GCCVER": current scope has no parent.
Call Stack (most recent call first):
  /github/workspace/sources/nuttx/arch/arm/src/cmake/Toolchain.cmake:56 (include)
  /github/workspace/sources/nuttx/build/CMakeFiles/3.26.0/CMakeSystem.cmake:6 (include)
  /github/workspace/sources/nuttx/build/CMakeFiles/CMakeScratch/TryCompile-ZJVOZO/CMakeLists.txt:5 (project)
This warning is for project developers.  Use -Wno-dev to suppress it.

Signed-off-by: xuxin19 <xuxin19@xiaomi.com>
2024-10-15 12:38:14 +08:00
pangzhen1 7e27eb6460 add dependencies for nuttx_post
nuttx_post depends systemmap and usermap(in protected build mode)

Signed-off-by: xuxin19 <xuxin19@xiaomi.com>
2024-10-15 12:37:58 +08:00
Gao Jiawei 89d6abf3df setjmp: fix setjmp returns 0 when calling longjmp with 0 as the second argument
Signed-off-by: Gao Jiawei <gaojiawei@xiaomi.com>
2024-10-15 12:36:19 +08:00
cuiziwei 036a0674db nuttx/libc:Add _dl_find_object and dl_iterate_phdr function.
Add _dl_find_object() function, because when cxx_exception configuration is enabled, a link error occurs and that function cannot be found.

ld: /usr/lib/gcc/x86_64-linux-gnu/13/libgcc_eh.a(unwind-dw2-fde-dip.o): in function `_Unwind_Find_FDE':
(.text+0x250c): undefined reference to `_dl_find_object'

Signed-off-by: cuiziwei <cuiziwei@xiaomi.com>
2024-10-15 12:35:54 +08:00
cuiziwei 8d7ee794f4 nuttx/elf.h: Fix build error with unknown type name 'bool'.
nuttx/include/nuttx/elf.h:118:1: error: unknown type name 'bool'
  118 | bool up_checkarch(FAR const Elf_Ehdr *hdr);
      | ^~~~
nuttx/include/nuttx/elf.h:30:1: note: 'bool' is defined in header '<stdbool.h>'; did you forget to '#include <stdbool.h>'?
   29 | #include <arch/elf.h>
  +++ |+#include <stdbool.h>
   30 |

Signed-off-by: cuiziwei <cuiziwei@xiaomi.com>
2024-10-15 12:35:10 +08:00
wanggang26 ca189ccaf2 boards/same70-xplained: refine config for insufficient flash capacity
Signed-off-by: wanggang26 <wanggang26@xiaomi.com>
2024-10-15 12:34:55 +08:00
cuiziwei 3fdc68ef09 stm32f4discovery/testlibcxx: Enable tls to fix build error.
CXX:  libcxx/src/filesystem/directory_iterator.cpp libcxx/src/thread.cpp:123:2: error: #error "Thread.cpp needs to enable config of CONFIG_TLS_TASK_NELEM," " and CONFIG_TLS_TASK_NELEM > 0, please enable it"
  123 | #error "Thread.cpp needs to enable config of CONFIG_TLS_TASK_NELEM," \
      |  ^~~~~

Signed-off-by: cuiziwei <cuiziwei@xiaomi.com>
2024-10-15 11:41:10 +08:00
wanggang26 aef584a804 shm:fix build error
nuttx/arch/arm/src/armv7-a/arm_addrenv_shm.c:77:(.text.up_shmat+0x2e):
undefined reference to `shminfo'

Signed-off-by: wanggang26 <wanggang26@xiaomi.com>
2024-10-15 11:40:34 +08:00
wanggang26 7e5fb8450f coredump: add architecture-specific registers dump, including NVIC and MPU
Signed-off-by: wanggang26 <wanggang26@xiaomi.com>
2024-10-15 11:40:05 +08:00
guoshichao 39690a994f mps2-an521: remove the unnecessary -pipe build options
Signed-off-by: guoshichao <guoshichao@xiaomi.com>
2024-10-15 09:46:06 +08:00
Ludovic Vanasse 678d0484b4 Doc: Migrate Versioning and Task Names
Migrate
https://cwiki.apache.org/confluence/display/NUTTX/Versioning+and+Task+Names
to the official wiki

Signed-off-by: Ludovic Vanasse <ludovicvanasse@gmail.com>
2024-10-15 09:45:43 +08:00
dongjiuzhu1 5a38c8bfe3 fs/readlink: fix minor issue
Signed-off-by: dongjiuzhu1 <dongjiuzhu1@xiaomi.com>
2024-10-14 18:08:14 -03:00
dongjiuzhu1 74c9b6f544 drivers/rpmsgdev: support get more battery info by rpmsgdev
Signed-off-by: dongjiuzhu1 <dongjiuzhu1@xiaomi.com>
2024-10-14 18:08:14 -03:00
cuiziwei 6f62ef0b6f nuttx/sim:Remove asan check in up_irq_save().
Signed-off-by: cuiziwei <cuiziwei@xiaomi.com>
2024-10-15 03:36:55 +08:00
anjiahao 4156eca0c1 modlib:so need export symbol, exec elf not need
Signed-off-by: anjiahao <anjiahao@xiaomi.com>
2024-10-15 03:20:05 +08:00
anjiahao 19b8fdbad6 modlib:allow 64bit elf load
Signed-off-by: anjiahao <anjiahao@xiaomi.com>
2024-10-15 03:20:05 +08:00
Ludovic Vanasse 5e002d99e5 Doc: Migrate Kernel Threads with Custom Stacks
Migrate
https://cwiki.apache.org/confluence/display/NUTTX/Kernel+Threads+with+Custom+Stacks
to official wiki

Signed-off-by: Ludovic Vanasse <ludovicvanasse@gmail.com>
2024-10-15 03:15:55 +08:00
wanggang26 9ee4566b4d mmcsd:add reset card to idle state (CMD0) support
Signed-off-by: wanggang26 <wanggang26@xiaomi.com>
2024-10-15 03:15:24 +08:00
Tomasz 'CeDeROM' CEDRO 863dcbbb45 DOC: Add information on STM32F0 and STM32L4 flashing/debugging.
Signed-off-by: Tomasz 'CeDeROM' CEDRO <tomek@cedro.info>
2024-10-15 03:13:11 +08:00
wanggang26 9b094e8f0d mmcsd:add postsleep fields for mmc_ioc_cmd
Signed-off-by: wanggang26 <wanggang26@xiaomi.com>
2024-10-15 02:06:00 +08:00
yinshengkai ef62c70e5f sched: modify CONFIG_DUMP_ON_EXIT to CONFIG_SCHED_DUMP_ON_EXIT
Signed-off-by: yinshengkai <yinshengkai@xiaomi.com>
2024-10-15 01:50:55 +08:00
hujun5 d77cb8af70 sched: fix nxsched_process_delivered did not call hook
Signed-off-by: hujun5 <hujun5@xiaomi.com>
2024-10-15 01:50:06 +08:00
Ludovic Vanasse 6ff7c84a7f Doc: Migrate Put special stuff in NuttX header files
Migrate the page "Why can't I put my special stuff in NuttX header
files?" page (https://cwiki.apache.org/confluence/pages/viewpage.action?pageId=139629466) to the official wiki.

Signed-off-by: Ludovic Vanasse <ludovicvanasse@gmail.com>
2024-10-15 01:22:59 +08:00
Ludovic Vanasse 2d6df43ca2 Doc: Migrate including files in board.h
Migrate including files in board.h (https://cwiki.apache.org/confluence/display/NUTTX/Including+Files+in+board.h) to official wiki

Signed-off-by: Ludovic Vanasse <ludovicvanasse@gmail.com>
2024-10-15 01:22:59 +08:00
Ludovic Vanasse 30b1660cc2 Doc: Migrate Disabling the Stack Dump During Debugging
Migrate https://cwiki.apache.org/confluence/display/NUTTX/Disabling+the+Stack+Dump+During+Debugging
to the official wiki

Signed-off-by: Ludovic Vanasse <ludovicvanasse@gmail.com>
2024-10-15 01:22:59 +08:00
wangmingrong1 0b889585a5 boards/qemu: Open kasan on qemu
1. Open Kasan and open Kasantest
2. Add software tag kasan configuration for arm64

Signed-off-by: wangmingrong1 <wangmingrong1@xiaomi.com>
2024-10-15 01:19:43 +08:00
chenrun1 b613863bad fs:replase all asprintf / strdup in fs with fs_heap_xxx
Signed-off-by: chenrun1 <chenrun1@xiaomi.com>
2024-10-15 01:16:48 +08:00
ligd 7d218f93fa libc: add nx_strdup() & nx_strndup() support
Signed-off-by: ligd <liguiding1@xiaomi.com>
2024-10-15 01:16:48 +08:00
hujun5 10659a8bc2 irq: irq_attach_wqueue replace irq_attach_thread
reason:
using a shared same priority queue can reduce memory consumption.

Signed-off-by: hujun5 <hujun5@xiaomi.com>
2024-10-15 01:12:14 +08:00
liqinhui 4c85805be0 net/tcp: Reset the conn when receiving a ACK in the SYN_SENT state.
According to RFC793, Section 3.4, Page 33. In the SYN_SENT state, if receive a ACK without the SYN, we should reset the connection and retransmit the SYN.

Signed-off-by: liqinhui <liqinhui@xiaomi.com>
2024-10-15 01:11:22 +08:00
wanggang26 243148241a mmcsd:add STATUS_SEND (CMD13) support
Signed-off-by: wanggang26 <wanggang26@xiaomi.com>
2024-10-15 01:09:16 +08:00
xuxingliang 143b265d11 tools: make isort and black formatters to work together
Config multi line output to mode 3, so isort and black can agree with
each other:
```
3 - Vertical Hanging Indent

from third_party import (
    lib1,
    lib2,
    lib3,
    lib4,
)
```

Signed-off-by: xuxingliang <xuxingliang@xiaomi.com>
2024-10-15 01:08:53 +08:00
xuxingliang 01cce0c544 tools: exit with error if py needs to format
Make CI fail if format not pass.

Signed-off-by: xuxingliang <xuxingliang@xiaomi.com>
2024-10-15 01:08:53 +08:00