Commit Graph

50119 Commits

Author SHA1 Message Date
raiden00pl
cf871b48d8 cmake: convert more stm32 boards 2023-07-14 21:33:53 +08:00
raiden00pl
24c44b35d5 cmake: support arm specific libm 2023-07-14 21:33:53 +08:00
liaoao
1ed09f804e vfork: modify struct vfork_s
fp is just an alias of r11, it  not really used for
framepointer in t32 mode.

Signed-off-by: liaoao <liaoao@xiaomi.com>
2023-07-14 20:48:51 +08:00
simbit18
d991ef77e8 Fix nuttx coding style
Remove TABs
Fix indentation
2023-07-14 20:48:24 +08:00
simbit18
a8939f6d4b arch/sparc/src/bm3823/bm3823.h: Fix the name of the constant BM3823_Is_interrupt_pending
Remove TABs and spaces from the name of the constant BM3823_Is_interrupt_pending
2023-07-14 20:48:09 +08:00
liaoao
e8c6eb0aba rpmsg: use workqueue for rpmsgdev poll notify
use workqueue for rpmsgdev poll notify to prevent
calling rpmsgdev_poll_cb in interrupt context which
will try to hold mutex in rpmsg_send

Signed-off-by: liaoao <liaoao@xiaomi.com>
2023-07-14 19:18:36 +08:00
wangyingdong
a7926405ca net/udp: Fix the bug of overwriting when the udp recv buffer is full
Signed-off-by: wangyingdong <wangyingdong@xiaomi.com>
2023-07-14 07:53:37 +02:00
chao an
0b69731a97 netdev/upperhalf: fix visual studio Compiler Error C2059
D:\archer\code\nuttx\drivers\net\netdev_upperhalf.c(557,5): error C2059: syntax error : '{'

Compiler error C2059:
The token caused a syntax error.

Reference:
https://learn.microsoft.com/en-us/cpp/error-messages/compiler-errors-1/compiler-error-c2059?view=msvc-170
Signed-off-by: chao an <anchao@xiaomi.com>
2023-07-14 07:52:34 +02:00
liaoao
2ebc8aff16 rpmsgblk: get return value from header
cookie->result as the return value of rpmsg operations,
it should get from remote response.

Signed-off-by: liaoao <liaoao@xiaomi.com>
2023-07-14 13:34:53 +08:00
yintao
7544b68aa9 net/local: Support the abstract path to connect
Signed-off-by: yintao <yintao@xiaomi.com>
2023-07-14 09:57:24 +08:00
yinshengkai
6a0ffa5c52 syslog: replace lib_sprintf to lib_sprintf_internal
Signed-off-by: yinshengkai <yinshengkai@xiaomi.com>
2023-07-14 00:22:11 +03:00
yinshengkai
fe9251b546 libc: export lib_sprintf_internal function
This function does not take numbered arguments in printf

Signed-off-by: yinshengkai <yinshengkai@xiaomi.com>
2023-07-14 00:22:11 +03:00
yinshengkai
0052ff2bd8 syslog: replace %pV with lib_sprintf
%pV will increase the stack size

Signed-off-by: yinshengkai <yinshengkai@xiaomi.com>
2023-07-14 00:22:11 +03:00
yinshengkai
135959eb83 libc/printf: fix "%pS" length error
Signed-off-by: yinshengkai <yinshengkai@xiaomi.com>
2023-07-14 00:22:11 +03:00
raiden00pl
019b7a39d4 cmake: cmse support for armv8-m 2023-07-13 23:49:02 +03:00
raiden00pl
db65b6b0e6 cmake: allow nuttx_add_application to inherit includes from dependent target 2023-07-13 23:49:02 +03:00
raiden00pl
73e5b9405f cmake: avoid warning about DOWNLOAD_EXTRACT_TIMESTAMP in CMake 3.24 2023-07-13 23:49:02 +03:00
chao an
73a06a4975 cmake/win32: set default LINK_STACKSIZE to avoid stack overflow
Signed-off-by: chao an <anchao@xiaomi.com>
2023-07-14 02:05:58 +08:00
chao an
8277229f53 nxstyle: covert utf-8 to ascii
libs/libc/stdio/lib_libgetstreams.c: C source, UTF-8 Unicode text
->
libs/libc/stdio/lib_libgetstreams.c: C source, ASCII text

Signed-off-by: chao an <anchao@xiaomi.com>
2023-07-14 01:24:50 +08:00
chao an
8ef5f02b66 libs: fix visual studio Compiler Error C2036
D:\code\nuttx\include\nuttx\net\netfilter\ip_tables.h(288,42): error C2036: "void *" : unknown size

Reference:
https://learn.microsoft.com/en-us/cpp/error-messages/compiler-errors-1/compiler-error-c2036?view=msvc-170

Signed-off-by: chao an <anchao@xiaomi.com>
2023-07-14 01:23:16 +08:00
chao an
54740b3ad2 win/MSVC: add packed_struct macro implement
Signed-off-by: chao an <anchao@xiaomi.com>
2023-07-14 01:18:09 +08:00
zhangyuan21
b7216d54ff arm64: Use the correct cpu id for fpu idle task init
Signed-off-by: zhangyuan21 <zhangyuan21@xiaomi.com>
2023-07-14 01:17:02 +08:00
simbit18
b0965ab963 Fix nuttx coding style
Remove TABs
Fix indentation
Fix Multi-line comments
Fix Comments to the Right of Statements.
2023-07-14 01:16:06 +08:00
zhangyuan21
d8797bde4e arm_gicv2: accesses the non-secure copy in non-secure state
Signed-off-by: zhangyuan21 <zhangyuan21@xiaomi.com>
2023-07-14 01:15:13 +08:00
zhangyuan21
601202ee4a arm64: Use the correct aff in up_affinity_irq function
Signed-off-by: zhangyuan21 <zhangyuan21@xiaomi.com>
2023-07-14 01:13:01 +08:00
wangyingdong
57bf3e1fea net: Add msg_peek support for udp and tcp
Signed-off-by: wangyingdong <wangyingdong@xiaomi.com>
2023-07-13 19:40:04 +08:00
guoshichao
79af1cdfe6 libs/libc/getpgid: add getpgid implementation
1. the getpgid function can help to pass the
ltp/open_posix_testsuite/killpg related testcases
2. NuttX do not support process group, so we use the process id as
process group id
3. the implementation are referred to: https://pubs.opengroup.org/onlinepubs/9699919799/functions/getpgid.html

Signed-off-by: guoshichao <guoshichao@xiaomi.com>
2023-07-13 19:37:35 +08:00
simbit18
1b1ac6f3b7 Fix nuttx coding style
Remove TABs
Fix indentation
Fix Multi-line comments
Fix Comments to the Right of Statements.

Fix nuttx coding style

Fix Comments to the Right of Statements.
2023-07-13 19:30:56 +08:00
Xiang Xiao
0ee304954a boards/tiva: Enable LTO for lm3s6432-s2e/nsh
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2023-07-13 10:13:21 +08:00
Neale Ferguson
878384fef0 Fix and improve dynamic loader
This patch fixes some issues found by Mark Stevens and
improve the dynamic loader.
2023-07-13 10:11:58 +08:00
chenrun1
4d285cb14d xtensa_saveusercontext:Leave the context information empty
In the current implementation of other architectures, it is not really implemented to preserve the context, so it is emulated from other architectures to clear the context.
If this behavior is not implemented, it will cause the xtensa architecture processor to loop assert in the active assert case

Signed-off-by: chenrun1 <chenrun1@xiaomi.com>
2023-07-13 09:48:46 +08:00
raiden00pl
a59f82b8d2 cmake: support pre-processor for linker script 2023-07-13 03:05:39 +08:00
chenrun1
3bdba79851 armv8m/arm_hardfault.c:fix code style.
Signed-off-by: chenrun1 <chenrun1@xiaomi.com>
2023-07-13 03:05:28 +08:00
chenrun1
842adf888f armv8m/arm_hardfault:add arm_gen_nonsecurefault information
Signed-off-by: chenrun1 <chenrun1@xiaomi.com>
2023-07-13 03:05:28 +08:00
yinshengkai
043d5922e4 drivers: add ascii drvier, returns a printable string of 0x21-0x7f
Signed-off-by: yinshengkai <yinshengkai@xiaomi.com>
2023-07-12 11:13:37 -06:00
dulibo1
13c7138c8d add refcnt using epoll_create to fix bug when use popen which dup the fd and close at end after epoll_create
Signed-off-by: dulibo1 <dulibo1@xiaomi.com>
2023-07-13 01:06:53 +08:00
yinshengkai
ce98f186c0 syslog: add syslog channel filtering function
support to control the opening or closing of the specified channel through the syslogmask command at runtime

Signed-off-by: yinshengkai <yinshengkai@xiaomi.com>
2023-07-13 01:04:07 +08:00
rongyichang
6902ed9516 drivers/lcd: add area alignment ioctl for lcd driver
Signed-off-by: rongyichang <rongyichang@xiaomi.com>
2023-07-13 01:03:18 +08:00
raiden00pl
f43c7e99be boards/stm32h7: Add stm32h745i-disco board 2023-07-12 11:30:57 -03:00
raiden00pl
f7905512be stm32h7: add LTDC support 2023-07-12 11:30:57 -03:00
raiden00pl
8ceff0dc5a arm/stm32h7: Add STM32H745 family 2023-07-12 11:30:57 -03:00
dulibo1
062e08ea3a serial:fix driver/serial/serial.c logic error
Signed-off-by: dulibo1 <dulibo1@xiaomi.com>
2023-07-12 11:28:54 -03:00
dulibo1
7ccdb2cfa8 battery:fix poll return type
Signed-off-by: dulibo1 <dulibo1@xiaomi.com>
2023-07-12 11:06:47 -03:00
fangxinyong
ffa084f3d2 signal: SIGKILL or SIGSTOP cannot be caught
pass ltp signal test cases, for posix spec, SIGKILL and SIGSTOP cannot be caught.

https://pubs.opengroup.org/onlinepubs/9699919799/functions/signal.html
https://pubs.opengroup.org/onlinepubs/007904875/functions/sigset.html

Signed-off-by: fangxinyong <fangxinyong@xiaomi.com>
2023-07-12 21:27:06 +08:00
fangxinyong
7462b199bb signal: SIGCONT can be caught
pass ltp sigaction case 19-5.c, 23-5,c and 28-5.c.
When SIGCONT is dispatched, resume all members of the task group.
So there is nothing do in default action.

Signed-off-by: fangxinyong <fangxinyong@xiaomi.com>
2023-07-12 21:27:06 +08:00
Zhe Weng
3d5eae2497 arch/arm64: Enable FPU for qemu-armv8a:netnsh_smp and netnsh_smp_hv
When reading https://github.com/apache/nuttx-apps/pull/1793, I found a previous problem https://github.com/apache/nuttx-apps/pull/1454#discussion_r1045718067 now still exists on current master (inf in iperf bandwidth).

By step-by-step debugging, I found a value of 1000000.0 stored in register d8 is overwritten as 0 after context switch, then fdiv results in inf because of divided by 0. Finally I found that ARCH_FPU is not enabled while compiler is using FPU, and may lose values in floating-point registers.

Signed-off-by: Zhe Weng <wengzhe@xiaomi.com>
2023-07-12 10:04:13 -03:00
raiden00pl
ad6361f0cc cmake: fix build after c33d1c9c97 (vfork -> fork) 2023-07-12 09:47:54 -03:00
Zhe Weng
4ffd2cc84c net/nat: Fix compiler warning
We found warning of "%x" mismatch with "in_addr_t" on some platforms.

Signed-off-by: Zhe Weng <wengzhe@xiaomi.com>
2023-07-12 19:29:14 +08:00
yinshengkai
9c6f48e57b drivers/segger: add RTT serial support
usage:
  1. Connect Jlink, start JLinkGDBServer
     JLinkGDBServer -if SWD -device stm32h743zi -speed 16000
  2. Listen to the RTT port data and forward it to the virtual serial port
     sudo socat -d -d PTY,link=/dev/ttyRTT0,raw,ignoreeof TCP:127.0.0.1:19021,reuseaddr
  3. Read serial data
     minicom -D /dev/ttyRTT0

Performance:(STM32H743, 400MHZ)
time "dd if=/dev/zero of=/dev/console bs=512 count=2048"
6.67 sec  157KB/s

Signed-off-by: yinshengkai <yinshengkai@xiaomi.com>
2023-07-12 09:54:50 +08:00
yinshengkai
e1553e8407 drivers/rtt: check whether Jlink is connected
Signed-off-by: yinshengkai <yinshengkai@xiaomi.com>
2023-07-12 09:54:50 +08:00