dongjiuzhu1
c724ed51fb
drivers/i3c: update i3c driver documentation
...
Signed-off-by: dongjiuzhu1 <dongjiuzhu1@xiaomi.com>
2024-09-24 23:36:50 +08:00
dongjiuzhu1
4960f290c8
drivers/i3c: avoid return error when i3c_master_register without i3c/i2c device
...
1. if i3c_mater_register without i3c/i2c device, rstdaa/clearevents/do_daa could be failed
2. board code/driver code need to actively i3c_master_do_daa when device power on.
Signed-off-by: dongjiuzhu1 <dongjiuzhu1@xiaomi.com>
2024-09-24 23:36:50 +08:00
dongjiuzhu1
694750e8af
drivers/i3c: remove extra i3c_dev_register, do_daa has created them
...
Signed-off-by: dongjiuzhu1 <dongjiuzhu1@xiaomi.com>
2024-09-24 23:36:50 +08:00
yangshuyong
cffcccafc2
driver/i3c: Fixed i3c pointer format to check null
...
Signed-off-by: yangshuyong <yangshuyong@xiaomi.com>
2024-09-24 23:36:50 +08:00
yangshuyong
7a48469e70
I3C: fixed the return value error in send ccc cmd api
...
Signed-off-by: yangshuyong <yangshuyong@xiaomi.com>
2024-09-24 23:36:50 +08:00
yangshuyong
9d566d4a9d
I3C: fixed the send ccc cmd check condition error
...
Only affect the send ccc cmd in 3th driver
Signed-off-by: yangshuyong <yangshuyong@xiaomi.com>
2024-09-24 23:36:50 +08:00
yangshuyong
9790c3d316
Added the common interface sending ccc cmd in I3C driver
...
Signed-off-by: yangshuyong <yangshuyong@xiaomi.com>
2024-09-24 23:36:50 +08:00
dongjiuzhu1
5b48dea4f5
drivers/i3c: support i3c driver model
...
Reference to: https://github.com/torvalds/linux/tree/master/drivers/i3c
Signed-off-by: dongjiuzhu1 <dongjiuzhu1@xiaomi.com>
2024-09-24 23:36:50 +08:00
chao an
a01d9e9ce0
arch/tricore: fix build error on tricore
...
ctc E333: ["arch/tricore/src/common/tricore_svcall.c" 123/23] incompatible types at assignment
ctc E333: ["arch/tricore/src/common/tricore_doirq.c" 98/39] incompatible types at argument #2
Signed-off-by: chao an <anchao@lixiang.com>
2024-09-24 23:11:01 +08:00
chao an
f44a9c44a7
libc/pathbuffer: fix build warning on tasking
...
[263/1096] Building C object libs/libc/CMakeFiles/c.dir/misc/lib_pathbuffer.c.obj
ctc W574: ["libs/libc/misc/lib_pathbuffer.c" 144/3] 'return' with an expression in function returning void
Signed-off-by: chao an <anchao@lixiang.com>
2024-09-24 23:10:31 +08:00
SPRESENSE
6a825f1ee7
net/usrsock: Clear usockid when USRSOCK_EVENT_ABORT is received
...
When usrsock receives a USRSOCK_EVENT_ABORT, it determines that
the usrsock daemon's socket is closed. Then usrsock clears the usockid.
2024-09-24 23:09:20 +08:00
hujun5
e13d255345
sched: add nxsched_remove_self
...
reason:
1In the scenario of active waiting, context switching is inevitable, and we can eliminate redundant judgments.
code size
before
hujun5@hujun5-OptiPlex-7070:~/downloads1/vela_sim/nuttx$ size nuttx
text data bss dec hex filename
262848 49985 63893 376726 5bf96 nuttx
after
hujun5@hujun5-OptiPlex-7070:~/downloads1/vela_sim/nuttx$ size nuttx
text data bss dec hex filename
263324 49985 63893 377202 5c172 nuttx
reduce code size by -476
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-09-24 22:07:00 +08:00
Xiang Xiao
dc6eeba453
Revert "arm64: refine the fatal handler"
...
This reverts commit 291d5a2acc .
2024-09-24 10:21:42 -03:00
Xiang Xiao
9e8df3b3fa
Revert "arm64: save FPU regs every time"
...
This reverts commit 3c4f3c1008 .
2024-09-24 10:21:42 -03:00
Xiang Xiao
f6f072ee1c
Revert "arm64: add arm64_current_el to obtain current EL"
...
This reverts commit e38f2b2a6d .
2024-09-24 10:21:42 -03:00
Xiang Xiao
0a2a6dfa57
Revert "arm64: simply the vectors"
...
This reverts commit 370679c65b .
2024-09-24 10:21:42 -03:00
Xiang Xiao
24fba43591
Revert "Kernel build: enter exception save sp_sl0,exit exception restroe sp_el0"
...
This reverts commit 52a4fb6fab .
2024-09-24 10:21:42 -03:00
xuxin19
5095955591
cmake(bugfix):make sure the extra lib only added once
...
avoid duplicate definitions of target when
`nuttx_add_extra_library` is called between different models at the same time
Signed-off-by: xuxin19 <xuxin19@xiaomi.com>
2024-09-24 21:06:26 +08:00
SPRESENSE
1e103bd41f
drivers/modem/alt1250: Fix issue where the program would get stuck
...
Fix issue where the program would get stuck
if an unsupported ALTCOM packet was sent.
2024-09-24 20:00:21 +08:00
chao an
a5251161c6
syslog/channel: rename syslog_channel() to syslog_channel_register()
...
Change syslog API naming more reasonable:
1. rename syslog_channel() to syslog_channel_register()
2. rename syslog_channel_remove() to syslog_channel_unregister()
Signed-off-by: chao an <anchao@lixiang.com>
2024-09-24 19:28:49 +08:00
chao an
8288fe4e30
Revert "toolchain/ghs: Fix CONFIG_SCHED_CRITMONITOR_MAXTIME_XXX "zero used for undefined preprocessing identifier" warnings"
...
move private define to public
This reverts commit 236678d730 .
Signed-off-by: chao an <anchao@lixiang.com>
2024-09-24 09:00:27 +08:00
wangjianyu3
a5b85fcd96
misc/rpmsgdev: Fix invalid pointer error when there are more than one remotes
...
Test: (see tests/testcases/rpmsgdev for details)
# 1. Register dummy device
testdev -d 0 -r "/dev/ttyGNSS0"
# 2. Call rpmsgdev_export() to export the device to remote
testdev -d 2 -c "droid" -l "/dev/ttyGNSS0"
Log:
[ap] arm_busfault: PANIC!!! Bus Fault:
[ap] arm_busfault: IRQ: 5 regs: 0x3c434e44
[ap] arm_busfault: BASEPRI: 00000000 PRIMASK: 00000000 IPSR: 00000005 CONTROL: 00000004
[ap] arm_busfault: CFSR: 00008200 HFSR: 00000000 DFSR: 00000000 BFAR: 00000000 AFSR: 00040000
[ap] arm_busfault: Bus Fault Reason:
[ap] arm_busfault: Precise data bus error
[ap] dump_assert_info: Current Version: NuttX ****** ***** *** 12.3.0 ********** Sep 23 2024 18:35:50 arm
[ap] dump_assert_info: Assertion failed panic: at file: armv8-m/arm_busfault.c:113 task: testdev process: testdev 0x2c86ca75
Backtrace:
backtrace_unwind
/workspace/nuttx/arch/arm/src/common/arm_backtrace_unwind.c:632
sched_backtrace
/workspace/nuttx/sched/sched/sched_backtrace.c:105
sched_dumpstack
/workspace/nuttx/libs/libc/sched/sched_dumpstack.c:69
dump_running_task
/workspace/nuttx/sched/misc/assert.c:629
arm_busfault
/workspace/nuttx/arch/arm/src/armv8-m/arm_busfault.c:113
irq_dispatch
/workspace/nuttx/sched/irq/irq_dispatch.c:142
arm_doirq
/workspace/nuttx/arch/arm/src/armv8-m/arm_doirq.c:95
strcmp
/workspace/nuttx/libs/libc/machine/arm/armv8-m/gnu/arch_strcmp.S:107
rpmsgdev_server_created
/workspace/nuttx/drivers/misc/rpmsgdev_server.c:520 (discriminator 1)
rpmsg_register_callback
/workspace/nuttx/drivers/rpmsg/rpmsg.c:245
rpmsgdev_export
/workspace/nuttx/drivers/misc/rpmsgdev_server.c:552
_register_driver
/workspace/tests/testcases/rpmsgdev/testdev.c:216
nxtask_startup
/workspace/nuttx/libs/libc/sched/task_startup.c:70
nxtask_start
/workspace/nuttx/sched/task/task_start.c:114
Signed-off-by: wangjianyu3 <wangjianyu3@xiaomi.com>
2024-09-23 23:59:12 +02:00
chao an
9afcd34282
Revert "pthread_mutex:add deadlock assert"
...
EDEADLK alreay checked in:
https://github.com/apache/nuttx/blob/master/sched/pthread/pthread_mutextimedlock.c#L112-L127
https://github.com/apache/nuttx/blob/master/sched/pthread/pthread_mutex.c#L195-L201
This reverts commit 112cc083d3 .
Signed-off-by: chao an <anchao@lixiang.com>
2024-09-23 23:54:38 +08:00
lipengfei28
52a4fb6fab
Kernel build: enter exception save sp_sl0,exit exception restroe sp_el0
...
Signed-off-by: lipengfei28 <lipengfei28@xiaomi.com>
2024-09-23 23:43:24 +08:00
ligd
370679c65b
arm64: simply the vectors
...
Signed-off-by: ligd <liguiding1@xiaomi.com>
2024-09-23 23:43:24 +08:00
qinwei1
e38f2b2a6d
arm64: add arm64_current_el to obtain current EL
...
Summary
Add a macro to obtain current execute level
Signed-off-by: qinwei1 <qinwei1@xiaomi.com>
2024-09-23 23:43:24 +08:00
ligd
3c4f3c1008
arm64: save FPU regs every time
...
Signed-off-by: ligd <liguiding1@xiaomi.com>
2024-09-23 23:43:24 +08:00
qinwei1
291d5a2acc
arm64: refine the fatal handler
...
Summary
The original implement for exception handler is very simple and
haven't framework for breakpoint/watchpoint routine or brk instruction.
I refine the fatal handler and add framework for debug handler to
register or unregister. this is a prepare for watchpoint/breakpoint
implement
Signed-off-by: qinwei1 <qinwei1@xiaomi.com>
2024-09-23 23:43:24 +08:00
liwenxiang1
a5bc9a9da2
arch/x86_64:Add FP backtrace function
...
Signed-off-by: liwenxiang1 <liwenxiang1@xiaomi.com>
2024-09-23 23:15:01 +08:00
Tim Hardisty
5a4d31f315
SAMA5 sam_mcan.c unitialized variable
2024-09-23 10:13:29 -03:00
Tiago Medicci Serrano
b025c6285d
Documentation: Document stack and backtrace dump for Espressif SoCs
...
Stack and backtrace dump for Espressif's SoCs (ESP32, ESP32-S2,
ESP32-S3, ESP32-C3, ESP32-C6 and ESP32-H2) is now documented in a
new section for each chip entry page.
2024-09-23 20:40:58 +08:00
Tiago Medicci Serrano
27858f913b
tools: Add generic tool to decode the backtrace dump
...
The script can decode the backtrace dump, considering the syntax
of the backtrace format (properly handle the dump when SMP is
enabled, for instance) based on chip name or the toolchains's
addr2line tool.
2024-09-23 20:40:58 +08:00
Tiago Medicci Serrano
cdeb720bf8
xtensa/esp32[|s2|s3]: Fix task backtrace dump
...
- Fix `MAKE_PC_FROM_RA` macro to consider the instruction region
base address;
- Add sanity check for calculated PC and SP registers;
- Check if the stack pointer is within the interrupt stack to
enable backtrace dump if an exception occurs during the ISR;
2024-09-23 20:40:58 +08:00
Tiago Medicci Serrano
d6ee1742a9
xtensa/Kconfig: Fix dependency for backtrace dump on Xtensas
...
`CONFIG_XTENSA_INTBACKTRACE` is necessary to enable backtrace dump
for the tasks because exceptions are treated like interrupts (even
when an exception occurs during a normal task execution). It's now
automatically selected when `CONFIG_SCHED_BACKTRACE` is enabled.
This commit also removes outdated Kconfig options.
2024-09-23 20:40:58 +08:00
zhangshoukui
d68fab125e
FS_RAMMAP depends on FS_REFCOUNT and remove useless macro
...
Signed-off-by: zhangshoukui <zhangshoukui@xiaomi.com>
2024-09-23 18:22:35 +08:00
zhangshoukui
7e97691452
Should call fs_putfilep put fs reference when call files_fget complete
...
Signed-off-by: zhangshoukui <zhangshoukui@xiaomi.com>
2024-09-23 18:22:35 +08:00
dongjiuzhu1
90d990712d
libs/libc/stdio: Optimize header file dependencies in *prinf.c file.
...
Signed-off-by: likun17 <likun17@xiaomi.com>
Signed-off-by: dongjiuzhu1 <dongjiuzhu1@xiaomi.com>
2024-09-23 18:22:12 +08:00
likun17
b8835be6c5
libs/libc/stdio: Optimize header file dependencies in *scanf.c file.
...
Signed-off-by: likun17 <likun17@xiaomi.com>
2024-09-23 18:22:12 +08:00
dongjiuzhu1
47eec633a0
libs/libc/stdio: using sprintf to instead itoa
...
itoa isn't posix function, the standard stdlib file exclude it.
Signed-off-by: dongjiuzhu1 <dongjiuzhu1@xiaomi.com>
2024-09-23 18:22:12 +08:00
dongjiuzhu1
88da2b4adb
include/nuttx/compiler.h: fix redefine about offsetof
...
nuttx/compiler.h:176:11: warning: 'offsetof' macro redefined [-Wmacro-redefined]
^
clang/14.0.6/include/stddef.h:104:9: note: previous definition is here
Signed-off-by: dongjiuzhu1 <dongjiuzhu1@xiaomi.com>
2024-09-23 18:22:12 +08:00
dongjiuzhu1
c9ad454807
libs/stdio: fix compile warning when disable CONFIG_LIBC_NUMBERED_ARGS
...
libs/libc/stdio/lib_libvsprintf.c:160:48: warning: unused parameter 'arglist' [-Wunused-parameter]
FAR struct arg_s *arglist, int numargs,
^
libs/libc/stdio/lib_libvsprintf.c:160:61: warning: unused parameter 'numargs' [-Wunused-parameter]
FAR struct arg_s *arglist, int numargs,
Signed-off-by: dongjiuzhu1 <dongjiuzhu1@xiaomi.com>
2024-09-23 18:22:12 +08:00
dongjiuzhu1
319501e9ef
libs/libc: remove LIB_BUFLEN_UNKNOWN to reduce depends on libc.h
...
1. remove libc.h
2. include <nuttx/stream.h>, remove stdio.h, becuase stream.h include stdio.h
Signed-off-by: dongjiuzhu1 <dongjiuzhu1@xiaomi.com>
2024-09-23 18:22:12 +08:00
yangshuyong
a537ecdd0f
Support nuttx pci endpoint driver framework
...
Signed-off-by: yangshuyong <yangshuyong@xiaomi.com>
Signed-off-by: lipengfei28 <lipengfei28@xiaomi.com>
2024-09-23 10:03:54 +02:00
lipengfei28
56308bf202
bitmap: add bitmap_find_free_region
...
The pci ep framewoek use bitmap manage the pci outbond memory
Signed-off-by: lipengfei28 <lipengfei28@xiaomi.com>
2024-09-23 10:03:54 +02:00
lipengfei28
ca39dc2e74
math: Optimize the implementation of log2ceil and log2floor
...
and move common math funtions to math32.h:
div_round_up
div_round_closest
is_power_of_2
roundup_pow_of_two
rounddown_pow_of_two
Signed-off-by: lipengfei28 <lipengfei28@xiaomi.com>
2024-09-23 10:03:54 +02:00
lipengfei28
4fd78583f7
libc: add find_next_zero_bit
...
The pci ep framework use bitmap manage free bar
Signed-off-by: lipengfei28 <lipengfei28@xiaomi.com>
2024-09-23 10:03:54 +02:00
lipengfei28
b18262d78f
bits:rename __set_bit to set_bit __clear_bit to clear_bit
...
This used for add pci ep drver framework
Signed-off-by: lipengfei28 <lipengfei28@xiaomi.com>
2024-09-23 10:03:54 +02:00
dongjiuzhu1
a2845faee3
fs/chmod/fchmod/lchmod: only set permissions by mode_t and ignore other bits
...
test case:
int main(void)
{
struct stat buf;
int ret;
stat("test1.t", &buf);
printf("test1.t st.mode:%x\n", buf.st_mode);
stat("test.t", &buf);
printf("test.t st.mode:%x\n", buf.st_mode);
ret = chmod("test1.t", buf.st_mode);
if (ret == 0)
{
stat("test1.t", &buf);
printf("test1.t st.mode:%x\n", buf.st_mode);
}
return 0;
}
>>
test1.t st.mode:81b4
test.t st.mode:81fd
test1.t st.mode:81fd
Signed-off-by: dongjiuzhu1 <dongjiuzhu1@xiaomi.com>
2024-09-23 14:57:37 +08:00
dependabot[bot]
a116a6210e
build(deps): bump codelytv/pr-size-labeler from 1.10.0 to 1.10.1
...
Bumps [codelytv/pr-size-labeler](https://github.com/codelytv/pr-size-labeler ) from 1.10.0 to 1.10.1.
- [Release notes](https://github.com/codelytv/pr-size-labeler/releases )
- [Commits](https://github.com/codelytv/pr-size-labeler/compare/v1.10.0...v1.10.1 )
---
updated-dependencies:
- dependency-name: codelytv/pr-size-labeler
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
2024-09-23 14:37:02 +08:00
chao an
db5320fd9f
drivers/syslog: compile syslog_device.c if console/char/file channel enabled
...
Add conditional compilation to syslog_device.c
Signed-off-by: chao an <anchao@lixiang.com>
2024-09-23 14:36:40 +08:00