Commit Graph

43787 Commits

Author SHA1 Message Date
Petro Karashchenko
b7d5d54d7c boards/same70-qmtech: switch console to UART0
Signed-off-by: Petro Karashchenko <petro.karashchenko@gmail.com>
2022-01-19 11:06:19 -03:00
ligd
302945760c rpmsg_rtc: dirctly call rpmsg_rtc_server_xx() in server_ept_cb()
Signed-off-by: ligd <liguiding1@xiaomi.com>
2022-01-19 19:37:02 +08:00
Petro Karashchenko
4d5aace138 boards/arm/samv7: fix build error when automount is enabled
Signed-off-by: Petro Karashchenko <petro.karashchenko@gmail.com>
2022-01-19 19:36:36 +08:00
chao.an
086fb829fd net/usrsock: fix build warning
usrsock/usrsock_sockif.c:72:3: warning:
initialization of ‘int (*)(struct socket **)’ from incompatible pointer type
‘int (*)(struct socket *, int,  void *, size_t)’ {aka ‘int (*)(struct socket *, int,  void *, long unsigned int)’} [-Wincompatible-pointer-types]
   72 |   usrsock_ioctl               /* si_ioctl */
      |   ^~~~~~~~~~~~~

Signed-off-by: chao.an <anchao@xiaomi.com>
2022-01-19 12:09:53 +01:00
Petro Karashchenko
630c209bbc tools: add option to reuse boards common files for custom boards
Signed-off-by: Petro Karashchenko <petro.karashchenko@gmail.com>
2022-01-19 12:09:37 +01:00
Petro Karashchenko
87e5b1b87c tools/mkromfsimg.sh: fix build error in case if romfs is used
Signed-off-by: Petro Karashchenko <petro.karashchenko@gmail.com>
2022-01-19 12:09:22 +01:00
SPRESENSE
13d3527642 boards: cxd56xx: Add board serial string for usb devices
Add obtaining board unique serial string logic for USB devices.

refs #13909
2022-01-19 09:25:48 +01:00
SPRESENSE
021a58d71a usbdev: Add board unique serial string support
iSerialNumber field in the device descriptor can be used to determining the
board when multiple boards connected to the same host. So add feature to change
serial string by board unique ID dynamically.
To use this feature, user must be implement the board_usbdev_serialstr() logic.

refs #13909
2022-01-19 09:25:48 +01:00
YAMAMOTO Takashi
f2ee1c5b35 boards/sim/sim/sim/scripts/Make.defs: undefine more platform macro
Namely __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__,
which libcxx refstring.h uses to detect macOS.
2022-01-19 11:38:21 +08:00
YAMAMOTO Takashi
7a576ff056 boards/sim/sim/sim/scripts/Make.defs: Disable libcxx availability macros 2022-01-19 11:38:21 +08:00
Alexander Lunev
6bb7a92a9a net/tcp/tcp_send*: added debug asserts for TCP_ACKDATA, TCP_REXMIT and TCP_DISCONN_EVENTS flags 2022-01-19 10:45:38 +08:00
Xiang Xiao
8bcdefafc9 board: Remove -fno-strength-reduce
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-01-19 00:14:03 +01:00
ligd
67f7efe0b1 rpmsg_rtc: fix typo
Signed-off-by: ligd <liguiding1@xiaomi.com>
2022-01-18 17:51:02 +01:00
Alexander Lunev
79e609a8c8 net/tcp/sendfile: swapped the location of TCP_DISCONN_EVENTS and TCP_ACKDATA conditions towards tcp_send_unbuffered.c unification 2022-01-19 00:13:38 +08:00
ligd
a9e3a5c233 rpmsg_rtc: to simply the SYNC cmd logic
Signed-off-by: ligd <liguiding1@xiaomi.com>
2022-01-18 22:48:15 +08:00
ligd
cb502a869c clock: update clock_synchronize() to support with time
Signed-off-by: ligd <liguiding1@xiaomi.com>
2022-01-18 22:48:15 +08:00
ligd
0a51f13ca5 rpmsg_rtc: merge the rpmsg_rtc_init to same place
Signed-off-by: ligd <liguiding1@xiaomi.com>
2022-01-18 22:48:15 +08:00
raiden00pl
4e1df81fa8 boards/nucleo-g431rb: add CAN example 2022-01-18 18:19:10 +08:00
raiden00pl
499c7ce4f5 boards/b-g431b-esc1: add CAN example 2022-01-18 18:19:10 +08:00
raiden00pl
d3841eb753 boards/nucleo-g431rb: add option to select HSI or HSE ass PLL source 2022-01-18 18:19:10 +08:00
raiden00pl
72ce934f73 boards/b-g431b-esc1: add option to select HSI or HSE as PLL source 2022-01-18 18:19:10 +08:00
Petro Karashchenko
9551de7115 net: use HTONS, NTOHS, HTONL, NTOHL macro in kernel code
Signed-off-by: Petro Karashchenko <petro.karashchenko@gmail.com>
2022-01-18 10:59:47 +01:00
Alexander Lunev
5b13797cce net/tcp/tcp_send*: reliably obtain the TCP connection pointer in TCP event handlers
Do not use pvconn argument to get the TCP connection pointer because pvconn is
normally NULL for some events like NETDEV_DOWN. Instead, the TCP connection pointer
can be reliably obtained from the corresponding TCP socket.
2022-01-18 16:14:38 +08:00
Peter Kalbus
04b27b6877 Fix aligment issue: pktbuf needs to be 16bit aligned
Otherwise hardfault in cdcecm_receive() at BUF->type.
2022-01-18 09:08:09 +01:00
SPRESENSE
8d591d5bc7 fs/smartfs: Fix file size corruption when opening with truncate mode
If a existing file is opened with truncate mode e.g. fopen(file, "w+"),
the file size will be incorrect after writing any data to the file.
Before writing to the first sector, the reading is performed again.
As a result, it makes an invalid file size. When a sector buffer is used,
it must also write to the first sector.
2022-01-18 08:44:49 +01:00
SPRESENSE
60913d3b69 Revert "fs/smartfs: Fix file size corruption when opening with overwriting mode"
This reverts commit 89a79b03cf.
2022-01-18 08:44:49 +01:00
Gustavo Henrique Nihei
04723a89f2 xtensa: Fix core voltage level when SPI Flash runs at 80Mhz
Signed-off-by: Gustavo Henrique Nihei <gustavo.nihei@espressif.com>
2022-01-18 02:21:46 +08:00
Alexander Lunev
f61f276120 net/tcp/sendfile: TCP retransmission could not start because of incorrect snd_ackcb callback handling:
Both the snd_ackcb and snd_datacb callbacks were created and destroyed right after sending every packet.
Whenever TCP_REXMIT event occurred due to TCP send timeout, TCP_REXMIT was ignored because
snd_ackcb callback had been destroyed by the time.
The issue is fixed as follows:
- both the snd_ackcb and snd_datacb callbacks are combined into one snd_cb callback
  (the same way as in tcp_send_unbuffered.c).
- the snd_cb callback lives until all requested data (via sendfile) is sent,
  including all ACKs and possible retransmissions.

As a positive side effect of the code optimization / fix, sendfile TCP payload throughput is increased.
2022-01-18 02:03:40 +08:00
raiden00pl
e140ba1a21 arch/stm32: fdcan cosmetics 2022-01-17 09:36:00 -03:00
raiden00pl
c450dea6e5 stm32: add FDCAN support
based on PR #2987
2022-01-17 09:36:00 -03:00
Petro Karashchenko
4f98ac4879 arch/arm/samv7: implement quadrature encoder driver
Signed-off-by: Petro Karashchenko <petro.karashchenko@gmail.com>
2022-01-17 09:35:12 -03:00
zouboan
74aeb5d0c5 port nuttx to sparc-v8 commit
includes following parts:
add support of sparc in arch/Kconfig
add support of sparc in boards/Kconfig
add sparc dir in arch, add sparc dir in boards
add support of sparc in libs/libc/machine
modify all the coding style problem about saprc
2022-01-17 09:09:29 -03:00
Eero Nurkkala
10d98f64d3 Documentation: risc-v/mpfs: update documentation
Update the risc-v/mpfs documentation to match the current work.

Signed-off-by: Eero Nurkkala <eero.nurkkala@offcode.fi>
2022-01-17 17:33:03 +08:00
chao.an
377093339e boards/sim: add dynamic connection defconfig
Signed-off-by: chao.an <anchao@xiaomi.com>
2022-01-17 13:34:49 +08:00
chao.an
a9d0dd7051 net/netlink: fix build warning if disable CONFIG_NETLINK_ROUTE
netlink/netlink_sockif.c: In function ‘netlink_sendmsg’:
netlink/netlink_sockif.c:676:10: warning: unused variable ‘len’ [-Wunused-variable]
  676 |   size_t len = msg->msg_iov->iov_len;
      |          ^~~

Signed-off-by: chao.an <anchao@xiaomi.com>
2022-01-17 13:34:49 +08:00
chao.an
0d7f12c489 net/icmp: fix build break if enable NET_ALLOC_CONNS
Signed-off-by: chao.an <anchao@xiaomi.com>
2022-01-17 13:34:49 +08:00
Huang Qi
676d35f007 risc-v: Make exception_common 8 byte align
Some SoC like bl602 require the exception entry 8 byte align, it should
be safe for other chips so we can apply it globally.

Signed-off-by: Huang Qi <huangqi3@xiaomi.com>
2022-01-17 11:44:50 +08:00
Alexander Lunev
0f080cdeaf net/tcp/sendfile: NET_TCP_WRITE_BUFFERS and NET_SENDFILE were inconsistent with each other:
tcp_sendfile() reads data directly from a file and does not use NET_TCP_WRITE_BUFFERS data flow
even if CONFIG_NET_TCP_WRITE_BUFFERS option is enabled.
Despite this, tcp_sendfile relied on NET_TCP_WRITE_BUFFERS specific flow control variables that
were idle during sendfile operation. Thus it was a total inconsistency.

E.g. because of the issue, TCP socket used by sendfile() operation never issued
FIN packet on close() command, and the TCP connection hung up.

As a result of the fix, simultaneously enabled CONFIG_NET_TCP_WRITE_BUFFERS and
CONFIG_NET_SENDFILE options can coexist.
2022-01-17 01:42:41 +08:00
Huang Qi
e97ba17451 arch/risc-v: Refine riscv_cpupause.c
Signed-off-by: Huang Qi <huangqi3@xiaomi.com>
2022-01-16 23:11:32 +08:00
Petro Karashchenko
8d3bf05fd2 include: fix double include pre-processor guards
Signed-off-by: Petro Karashchenko <petro.karashchenko@gmail.com>
2022-01-16 11:11:14 -03:00
Xiang Xiao
1adee3d657 rtc/rpmsg: Implement ioctl and destroy on server side
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-01-16 11:58:13 +01:00
Xiang Xiao
fd6a643460 rtc/rpmsg: Remove C99 specific statement
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-01-16 11:58:13 +01:00
Xiang Xiao
2b238d0772 rtc/rpmsg: Replace clock_[get|set]time with rtc_ops_s::[rd|set]time
to support the multiple rtc driver instance

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-01-16 11:58:13 +01:00
Xiang Xiao
3d3c4767a9 rtc/rpmsg: Replace session to client
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-01-16 11:58:13 +01:00
Xiang Xiao
41b9cf3cd8 rtc/rpmsg: Add sync parameter to control whether call clock_synchronize
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-01-16 11:58:13 +01:00
Xiang Xiao
6121f15d51 rtc/rpmsg: Move rtc_initialize out of rpmsg_rtc_initialize
like other rtc driver

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-01-16 11:58:13 +01:00
Xiang Xiao
93b0b9678f sim: Forward /dev/rtc0 operation to rpmsg rtc driver
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-01-16 11:58:13 +01:00
raiden00pl
2aede9168b boards/nucleo-f446re: add SocketCAN example 2022-01-15 12:51:55 -03:00
raiden00pl
3b1de327cd boards/nucleo-f302r8: add CAN and SocketCAN examples 2022-01-15 12:51:55 -03:00
Huang Qi
3200c936cc arch/risc-v: Refine riscv_cpuindex.c
Signed-off-by: Huang Qi <huangqi3@xiaomi.com>
2022-01-15 21:54:05 +08:00