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
Xiang Xiao
90c641d4c1
libc/streams: Add lib_[si]gets_t callback
...
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-11-25 01:07:12 +08:00
Xiang Xiao
5ee1da4211
libc/streams: Ensure the different stream type has the common layout
...
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-11-25 01:07:12 +08:00
Zhe Weng
869c93638d
net/icmpv6: Fix ipv6->len
in icmpv6_reply
...
The `ipv6->len` is the length excluding the IPv6 header, so need to be `dev->d_len - IPv6_HDRLEN`.
Signed-off-by: Zhe Weng <wengzhe@xiaomi.com>
2022-11-24 23:19:10 +08:00
Zhe Weng
a26ea96f3b
net/icmpv6: Fix datalen
in icmpv6_reply
...
The `datalen` indicates the whole len of original packet, which will become the payload inside icmpv6 packet.
Using `datalen = (ipv4->len[0] << 8) + ipv4->len[1]` in icmp_reply is correct, because it includes IPv4 header, but when coming to IPv6, the `len` does not include the header, so we need to add it back.
Signed-off-by: Zhe Weng <wengzhe@xiaomi.com>
2022-11-24 23:19:10 +08:00
Zhe Weng
233974b327
net/icmpv6: Fix icmpv6 checksum calculation in icmpv6_reply
...
The second param of icmpv6_chksum is `iplen`, which indicates `The size of the IPv6 header`.
Signed-off-by: Zhe Weng <wengzhe@xiaomi.com>
2022-11-24 23:19:10 +08:00
nietingting
6368b29751
test: update usrsocktest script
...
Signed-off-by: nietingting <nietingting@xiaomi.com>
2022-11-24 23:14:31 +08:00
flyingfish89
4b87a8b079
lib_libvsprintf: fix the float point print bug
...
such as code: double value = +0x1.000000000000080000000000p-600;
printf("Hello, World!! %.7g:f64\n", value);
expected output : Hello, World!! 2.40992e-181:f64
but real output : Hello, World!! 2.40992e-B1:f64
the reason: we want printf "18", but the flag of character is 'B'
and 'B' is '0'+18,so printf 'B';
2022-11-24 12:02:03 -03:00
chao an
3caa551ff4
net: remove psock reference from connect
...
Signed-off-by: chao an <anchao@xiaomi.com>
2022-11-24 22:57:42 +08:00
chao an
f2a7711ef8
net/soerr: add new _SO_CONN_SETERRNO() macro
...
support so error code set from conn instance
Signed-off-by: chao an <anchao@xiaomi.com>
2022-11-24 22:57:42 +08:00
chao an
6d8c28a83c
boards/citest: disable NET_ARP for usrsocktest
...
Signed-off-by: chao an <anchao@xiaomi.com>
2022-11-24 20:54:18 +08:00
wangbowen6
c37d90c194
net/local: support FIONWRITE for domain socket ioctl
...
Signed-off-by: wangbowen6 <wangbowen6@xiaomi.com>
2022-11-24 19:47:08 +08:00
田昕
28739b8b8a
libc/stream:Add mtd backend stream.
...
Signed-off-by: 田昕 <tianxin7@xiaomi.com>
2022-11-24 12:07:10 +08:00
liangchaozhong
0ec4b0a149
tcp: recv returns 0 without set errno
...
Issue:
recv return 0 means peer side has already closed the connection according to
man page's description.
0 is returned without set errno when TCP rx timeout happens with current
design.
Solution:
return result instead of ir_result when ir_result is 0, then -1 will be
returned with errno set to EAGAIN for tcp rx buffer empty case.
Signed-off-by: liangchaozhong <liangchaozhong@xiaomi.com>
2022-11-23 23:23:44 +08:00
Ville Juven
39a567db20
mm/circbuf.c: Fix incorrect usage of void* arithmetics
2022-11-23 23:22:06 +08:00
Ville Juven
4781379ee2
obstack/obstack_free: Fix incorrect usage of void* for arithmetics
...
Using void* for arithmetics is a GCC extension, and thus should not be
used for portable code.
2022-11-23 23:22:06 +08:00
Ville Juven
52228fd222
stm32f7: Fix compliation of stm32_flash.c (add stm32_waste.c)
...
/arch/arm/src/libarch.a(stm32_flash.o): in function `up_progmem_write':
/arch/arm/src/chip/stm32_flash.c:419: undefined reference to `stm32_waste'
Seems like the symbol definition + declaration were completely missing
2022-11-23 20:30:26 +08:00
dongjiuzhu1
d5b08a7ef1
net/usrsock: fix get/setsockopt issue about usrsock protocol
...
Signed-off-by: dongjiuzhu1 <dongjiuzhu1@xiaomi.com>
2022-11-23 21:27:15 +09:00
Robert-Ionut Alexa
9c6971279d
esp32-sparrow-kit: enable support for MMCSD-SPI
...
Add the necessary configs to the default nsh config file in order to enable
support for MMCSD-SPI.
Signed-off-by: Robert-Ionut Alexa <robertalexa2000@gmail.com>
2022-11-23 19:52:34 +08:00
Robert-Ionut Alexa
e0374c30e4
esp32-sparrow-kit: add support for the LTR308 light sensor
...
Add support to esp32-sparrow-kit for the LTR308 sensor. This patch also
enables the sensor in the default nsh config file.
Signed-off-by: Robert-Ionut Alexa <robertalexa2000@gmail.com>
2022-11-23 19:52:34 +08:00
Robert-Ionut Alexa
3351146c0b
boards/xtensa/esp32: add initial commit for the ESP32-SPARROW-KIT
...
ESP32-SPARROW-KIT is built upon ESP32-WROVER-KIT by adding various
peripherals. This is an initial commits that only backports the code
as it is, without further changes.
Signed-off-by: Robert-Ionut Alexa <robertalexa2000@gmail.com>
2022-11-23 19:52:34 +08:00
Xiang Xiao
98a9762e2a
rptun: fix rptun don't wait issue when get tx patyload
...
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-11-23 19:42:30 +09:00
Ville Juven
321b9ea732
stm32f7/stm32_bbsram.c: Fix build error due to changed include path
...
Use correct path to include mutex.h
Fixes:
chip/stm32_bbsram.c:42:10: fatal error: mutex.h: No such file or directory
42 | #include <mutex.h>
| ^~~~~~~~~
2022-11-23 18:20:29 +08:00