chao an
b452e2fddf
mm/iob: new function iob_reserve() to adjust headroom offset
...
Signed-off-by: chao an <anchao@xiaomi.com>
2022-11-29 13:16:23 +08:00
Lucas Saavedra Vaz
a926445995
boards: Fix buttons GPIO IRQ on ESP boards
2022-11-28 17:24:57 -03:00
Lucas Saavedra Vaz
cd5e536c40
boards/esp32-lyrat: Add buttons example
2022-11-28 17:24:57 -03:00
Gao Feng
08f5a5a3be
meminfo: buflen identify the left of buffer
...
It is enought to only checking the buflen's avaiable or not.
(total size means total copied size)
Co-authored-by: Petro Karashchenko <petro.karashchenko@gmail.com>
2022-11-29 01:29:55 +08:00
qiaohaijiao1
127a3585cc
tools/ci/docker/linux/Dockerfile: add libmad0-dev in docker environment
...
Signed-off-by: qiaohaijiao1 <qiaohaijiao1@xiaomi.com>
2022-11-29 00:20:25 +08:00
zhanghongyu
ec8cc6db37
net: add parameter check in psock_setsockopt
...
0 0x565a60bd in memmove (dest=0xf7fbaabe, src=0x0, count=3) at string/lib_memmove.c:58
1 0x565d8b90 in usrsock_iovec_do (srcdst=0xf7fbaab0, srcdstlen=2018, iov=0xf3de798c, iovcnt=0, pos=0, from_iov=true, done=0xf3de78e7) at usrsock/usrsock_devif.c:155
2 0x565d9349 in usrsock_iovec_get (dst=0xf7fbaab0, dstlen=2032, iov=0xf3de797c, iovcnt=2, pos=0, done=0xf3de78e7) at usrsock/usrsock_devif.c:612
3 0x5659f4b9 in usrsock_request (iov=0xf3de797c, iovcnt=2) at usrsock/usrsock_rpmsg.c:210
4 0x565d9436 in usrsock_do_request (conn=0x566316c0 <g_usrsock_connections>, iov=0xf3de797c, iovcnt=2) at usrsock/usrsock_devif.c:659
5 0x565dcfe9 in do_setsockopt_request (conn=0x566316c0 <g_usrsock_connections>, level=1, option=7, value=0x0, value_len=4) at usrsock/usrsock_setsockopt.c:131
6 0x565dd11e in usrsock_setsockopt (psock=0xf3dea840, level=1, option=7, value=0x0, value_len=4) at usrsock/usrsock_setsockopt.c:208
7 0x565d4d31 in psock_setsockopt (psock=0xf3dea840, level=1, option=7, value=0x0, value_len=4) at socket/setsockopt.c:310
8 0x565d4dde in setsockopt (sockfd=3, level=1, option=7, value=0x0, value_len=4) at socket/setsockopt.c:396
Signed-off-by: zhanghongyu <zhanghongyu@xiaomi.com>
2022-11-29 00:20:09 +08:00
chao an
615845d9a6
net/devif: add common interface to build L2 headers
...
So we can hide the implementation details of L2 NICs.
Signed-off-by: chao an <anchao@xiaomi.com>
2022-11-28 14:44:15 +01:00
xinbingnan
4800c166ec
Dockerfile: fix cp clang-extdef-mapping no effect
...
Use a wrong command `CMD`, and the correct is `RUN`.
That's a low level fault made by me.
Signed-off-by: xinbingnan <xinbingnan@xiaomi.com>
2022-11-28 14:31:19 +01:00
田昕
1d8d6e5ed2
drivers/syslog:support stream as syslog backend.
...
Signed-off-by: 田昕 <tianxin7@xiaomi.com>
2022-11-28 20:19:00 +08:00
ligd
b71f124b7b
armv7-r: correct the wrong usage of ARMV7A_XX marco
...
Signed-off-by: ligd <liguiding1@xiaomi.com>
2022-11-28 12:21:32 +01:00
ligd
f243e4f268
localtime: fix deadlock when print syslog in romfs
...
thread1:
romfs_seek -> take romfslock -> syslog -> tzset
thread2:
sylsog -> tzset -> tz_load -> romfs_open -> deadlock
Signed-off-by: ligd <liguiding1@xiaomi.com>
2022-11-28 18:04:38 +08:00
ligd
11fa70d53a
romfs: change lock to recursion lock
...
Signed-off-by: ligd <liguiding1@xiaomi.com>
2022-11-28 18:04:38 +08:00
TimJTi
578f7783c6
Corrects PIO errors and omissions for SAMA5D2
...
Changes and corrections after review
Correct slow clock config
2022-11-28 16:37:44 +08:00
田昕
9d48d86606
libc/stream:add putc interface for mtd/blk stream.
...
Signed-off-by: 田昕 <tianxin7@xiaomi.com>
2022-11-28 16:37:01 +08:00
ligd
139663ba89
local: add net_lock to local_listen
...
Signed-off-by: ligd <liguiding1@xiaomi.com>
2022-11-28 16:36:39 +08:00
Xiang Xiao
c38d6f1ae4
net: Remove usrsock specific process from common code as much as possible
...
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-11-28 16:32:41 +09:00
yinshengkai
699e3e8291
let segger RTT kconfig sink one level
...
Signed-off-by: yinshengkai <yinshengkai@xiaomi.com>
2022-11-28 15:22:58 +08:00
Masayuki Ishikawa
5215eb7e0f
boards: cxd56xx: Fix the build error in cxd56_crashdump.c
...
Summary:
- This commit fixes the build error in cxd56_crashdump.c
regressed by https://github.com/apache/nuttx/pull/7707
Impact:
- None
Tesing:
- Tested with spresense:wifi
Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
2022-11-28 08:18:47 +01:00
ligd
f72bab20b6
inet: fix compile failed if not define UDP
...
inet/ipv4_setsockopt.c: In function ‘ipv4_setsockopt’:
inet/ipv4_setsockopt.c:200:19: error: invalid use of undefined type ‘struct udp_conn_s’
200 | conn->ttl = ttl;
| ^~
inet/ipv4_setsockopt.c:223:19: error: invalid use of undefined type ‘struct udp_conn_s’
223 | conn->flags |= _UDP_FLAG_PKTINFO;
| ^~
inet/ipv4_setsockopt.c:223:30: error: ‘_UDP_FLAG_PKTINFO’ undeclared (first use in this function)
223 | conn->flags |= _UDP_FLAG_PKTINFO;
| ^~~~~~~~~~~~~~~~~
inet/ipv4_setsockopt.c:223:30: note: each undeclared identifier is reported only once for each function it appears in
inet/ipv4_setsockopt.c:227:19: error: invalid use of undefined type ‘struct udp_conn_s’
227 | conn->flags &= ~_UDP_FLAG_PKTINFO;
Signed-off-by: ligd <liguiding1@xiaomi.com>
2022-11-28 08:16:59 +01:00
ligd
092c78d636
signal: correct signal() return value & errno
...
Signed-off-by: ligd <liguiding1@xiaomi.com>
2022-11-28 14:15:21 +08:00
ligd
eef619fc46
signal: correct sigset() return value & errno
...
ref:
https://man7.org/linux/man-pages/man3/sigset.3.html
The dispositions for SIGKILL and SIGSTOP cannot be changed.
Signed-off-by: ligd <liguiding1@xiaomi.com>
2022-11-28 14:15:21 +08:00
Xiang Xiao
af2b491420
driver/segger: Move SYSLOG_RTT config from drivers/syslog to drivers/segger
...
and remove include/nuttx/syslog/syslog_rtt.h
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-11-27 23:10:39 +01:00
Xiang Xiao
fd268d7123
drivers/segger: Add STREAM_RTT option
...
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-11-27 23:10:39 +01:00
Xiang Xiao
ac365ab7e9
drivers/segger: Refine Kconfig option
...
1.Add SEGGER_SYSVIEW_RTT_CHANNEL option
2.SEGGER_RTT_BUFFER_SIZE_UP always default to 1KB
3.SEGGER_SYSVIEW_RTT_BUFFER_SIZE default to SEGGER_RTT_BUFFER_SIZE_UP
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-11-27 23:10:39 +01:00
Xiang Xiao
7c7ab96b53
libc/stdio: Remove putc macro from lib_libvsprintf.c
...
call lib_stream_put directly instead
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-11-27 22:59:21 +01:00
Xiang Xiao
7568a0df22
libc/stdio: Don't count the output length repeatly in vsprintf_internal
...
let's reuse the counting from lib_outstream_s::nput instead
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-11-27 22:59:21 +01:00
Xiang Xiao
33e35c6ce3
libc/stdio: Don't set FL_[LONG|SHORT] repeatly in vsprintf_internal
...
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-11-27 22:59:21 +01:00
Xiang Xiao
df6666ab5e
libc/stream: Rename lib_stream_[put|get]c to lib_stream_[put|get]
...
keep the macro consistent with the callback name
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-11-27 22:59:21 +01:00
Xiang Xiao
6d30726a1b
Remove the unnecessary "return;" at the end of function
...
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-11-27 22:23:50 +01:00
yinshengkai
126b33c488
drivers/segger: add Segger RTT stream support
...
Signed-off-by: yinshengkai <yinshengkai@xiaomi.com>
2022-11-27 23:39:20 +08:00
Xiang Xiao
4663987e66
Fix devif/ipv4_input.c:405:1: warning: label ‘done’ defined but not used [-Wunused-label]
...
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Signed-off-by: chao an <anchao@xiaomi.com>
2022-11-27 18:01:38 +08:00
chao an
6fa60627eb
net/devif/ip: build l2 header on the IP layer
...
Signed-off-by: chao an <anchao@xiaomi.com>
2022-11-27 12:13:45 +08:00
chao an
81325a8a3d
net/arp: add link layer check for arp_out/arp_ipin
...
ARP support is only built if the Ethernet link layer is supported.
Continue and send the ARP request only if this device uses the
Ethernet link layer protocol.
Signed-off-by: chao an <anchao@xiaomi.com>
2022-11-27 12:13:45 +08:00
chao an
8850dee746
net/devif: move preprocess of txpoll into common code
...
Signed-off-by: chao an <anchao@xiaomi.com>
2022-11-27 12:11:12 +08:00
chao an
db88554d7d
net/devif: add common funtion to build L2 headers before sending
...
Generic callback before device output to build L2 headers before sending
Signed-off-by: chao an <anchao@xiaomi.com>
2022-11-27 12:11:12 +08:00
Nathan Hartman
03802dad13
NuttX graduated the Incubator; update repository links
2022-11-26 11:58:15 -08:00
SuGliger
83a4b45dd4
boards/esp32-wrover-kit: Fix GPIO conflicts
2022-11-26 11:58:58 +08:00
SuGliger
9cdb865c9c
boards/esp32-wrover-kit: Add Lua Interpreter defconfig
2022-11-26 11:58:58 +08:00
wangbowen6
a0ded9d0d4
fs_epoll: [bug fix] epoll node use-after-free in epoll extend list
...
Signed-off-by: wangbowen6 <wangbowen6@xiaomi.com>
2022-11-26 11:56:58 +08:00
yinshengkai
377bf97613
stream: replace the stream function pointer with a macro
...
Signed-off-by: yinshengkai <yinshengkai@xiaomi.com>
2022-11-25 21:41:51 +08:00
yinshengkai
511070c300
include: unified stream read and write interface
...
Signed-off-by: yinshengkai <yinshengkai@xiaomi.com>
2022-11-25 21:41:51 +08:00
wangbowen6
2f2176151e
fs_epoll: [bug fix] EPOLL_CTL_ADD/MOD consider the teardown list too
...
Signed-off-by: wangbowen6 <wangbowen6@xiaomi.com>
2022-11-25 21:34:09 +08:00
TimJTi
4075509579
4 byte read mode bit position
...
GG25Q devices have the 4 byte read mode in bit 0 not bit 3 of the status register. This changes allows for both depending on the JEDEC DEVICE ID that is read back.
2022-11-25 10:11:11 -03:00
zouboan
b45f113943
boards/sparc add initial support of s698pm-dkit board
2022-11-25 08:54:28 -03:00
Lee Lup Yuen
c2d083e3c1
Update boards/arm64/a64/pinephone/src/pinephone_boardinit.c
...
Co-authored-by: hartmannathan <59230071+hartmannathan@users.noreply.github.com>
2022-11-25 17:19:48 +08:00
Lee Lup Yuen
b31054b1e3
arch/arm64: Add support for PINE64 PinePhone
...
This PR adds support for PINE64 PinePhone and the Allwinner A64 SoC (based on Arm Cortex-A53).
With this PR, PinePhone boots successfully to nsh (via microSD Card) and runs console apps.
- `arch/arm64/Kconfig`: Added Allwinner A64 SoC
- `boards/Kconfig`: Added PINE64 PinePhone
- `arch/arm64/src/a64/Kconfig`: New Kconfig for Allwinner A64 SoC
- `boards/arm64/a64/pinephone/Kconfig`: New Kconfig for PINE64 PinePhone
- `src/a64/a64_boot.c`, `a64_boot.h`: Boot functions for Allwinner A64
- `src/a64/a64_lowputc.S`: Low-level console output
- `src/a64/a64_serial.c`, `a64_serial.h`: A64 Serial Driver
- `src/a64/chip.h`: A64 SoC Definitions
- `include/a64/chip.h`: A64 Memory Map, Generic Interrupt Controller
- `include/a64/irq.h`: A64 Interrupts
- `src/a64/Make.defs`: Source files for A64
- `configs/nsh/defconfig`: Board Configuration for `pinephone:nsh`
- `src/pinephone_appinit.c`: Init PinePhone
- `src/pinephone_boardinit.c`: Init PinePhone
- `src/pinephone_bringup.c`: Start PinePhone Drivers
- `src/pinephone.h`: PinePhone Declarations
- `include/board_memorymap.h`: PinePhone Memory Map
- `scripts/dramboot.ld`: PinePhone Linker Script
- `scripts/Make.defs`: Source files for PinePhone
- `src/Makefile`: PinePhone Makefile
- `platforms/arm/a64/boards/pinephone/index.rst`: Building and booting NuttX on PinePhone
- `platforms/arm/a64/index.rst`: Overview of Allwinner A64
- `introduction/supported_platforms.rst`: Added Allwinner A64
- `introduction/detailed_support.rst`: Added Allwinner A64
2022-11-25 17:19:48 +08:00
Xiang Xiao
9bfc91e6f1
libc/stream: Remove \n special handle from syslogstream_putc
...
since \r\n process is already done in up_putc or serial driver level
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-11-25 09:10:05 +01:00
chao an
1815c2e1e1
tools/nuttx-gdbinit: restore the context at the end of each command
...
Signed-off-by: chao an <anchao@xiaomi.com>
2022-11-25 11:32:42 +09:00
Alan Carvalho de Assis
0e57e69b08
Add libc_stubs functions to get hmac_md5()
...
Co-author: Gustavo Nihei <gustavo.nihei@espressif.com>
Co-author: Lucas Vaz <lucas.vaz@espressif.com>
2022-11-25 10:26:37 +08:00
Xiang Xiao
5fd1379d3f
syslog: Move syslog stream to libc like other stream implementation
...
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-11-25 01:46:31 +08:00