Commit Graph

44132 Commits

Author SHA1 Message Date
Petro Karashchenko
a1f6717e2a mtd/filemtd: improve write and erase access
Signed-off-by: Petro Karashchenko <petro.karashchenko@gmail.com>
2022-02-15 12:06:24 +08:00
Huang Qi
5cde8c6934 risc-v: Let g_cpu_basestack determined at compile time
Fix the CPU1 idle tasks stack corruption since the cpux's idle stack
is loaded from g_cpu_basestack (data section) before, but on this time
it maybe not ready since it is initialized by CPU0, and the value
from g_cpu_basestack is random.

Signed-off-by: Huang Qi <huangqi3@xiaomi.com>
2022-02-15 11:40:34 +09:00
Huang Qi
0d7f30c86d risc-v/k210: Move wfi to entry of the slave cpu boot routine
Fix another potential bug in non-smp case: load a value from overflowed address of g_cpu_basestack.

Signed-off-by: Huang Qi <huangqi3@xiaomi.com>
2022-02-15 11:40:34 +09:00
Masayuki Ishikawa
0258968abd drivers: wireless: Fix gs2200m_ioctl_accept()
Summary:
- I received an issue report that multiwebcam in Spresense SDK 2.4.0
  has a problem with the Chrome browser
- Actually, the browser tries to establish 2 connections but
  the multiwebcam can handle only 1 connection. And if accept() for
  the second connection is delayed, the connection no longer exists
  in the gs2200m hardware
- This commit fixes this issue by checking if the cid is valid or not.

Impact:
- gs2200m driver only

Testing:
- Tested with spresense:wifi_smp

Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
2022-02-15 10:22:42 +08:00
fenghang
555d25633a add phyplus_rel_1.4
update source for phyplus driver rel_1.4

update source  for phyplus driver rel 1.4

update source for phyplus driver 1.4

update phy6222 config files
2022-02-15 10:21:10 +08:00
Xiang Xiao
4207882cdc arm/armv8-m: Handle the special irq correctly in up_secure_irq
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-02-15 09:45:34 +09:00
David Sidrane
1ca952243c stm32h7:flash can not use usleep
commit 328374f4658d11655f268f968f4c6c7a3942f320

   changed the wait to use usleep. This killed the
   write performace from the published values in the
   datasheet of ~100 us to 2 mS per 256 bits. On
   a 1000 per tick config. It can be 10 X worse
   on the default 100 per tick config.

   This changes uses up_udelay.
2022-02-15 02:09:04 +08:00
David Sidrane
8659a31c9d stm32h7:flash Fix lock violations 2022-02-15 02:09:04 +08:00
Juha Niskanen
176d78938f tools/Unix.mk: silence output from version.sh
This fixes error:

  tools/Unix.mk:49: *** missing separator. Stop.

that can happen if version.sh is invoked on a git repository
that contains no tags.

See https://github.com/apache/incubator-nuttx/issues/5324

Signed-off-by: Juha Niskanen <juha.niskanen@haltian.com>
2022-02-15 02:01:50 +08:00
David Sidrane
8ca4cf49b1 stm32h7:Fix build for all config {R|T}XDMA states 2022-02-14 18:43:30 +01:00
zouboan
2391e4bd71 Update libs/libdsp/lib_observer.c
Co-authored-by: Mateusz Szafoni <raiden00pl@gmail.com>
2022-02-14 10:47:15 -03:00
zouboan
132f27a91a lib_observer: add nolinear fluxlink observer 2022-02-14 10:47:15 -03:00
Anton Potapov
8f6be5e4ce Fix configure.sh for custom apps dir. 2022-02-14 21:28:07 +08:00
Xiang Xiao
17a7d612df arch: Replace nx_vsyslog with vsyslog
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-02-14 09:41:45 -03:00
Xiang Xiao
47e38eb70f binfmt: Decouple builtin from binfs file system
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-02-14 09:35:35 -03:00
chao.an
4be416a2a8 arm/backtrace: fix the compile warning
Signed-off-by: chao.an <anchao@xiaomi.com>
2022-02-14 16:29:38 +08:00
Huang Qi
b8477f857b k210: Use common cpu idle stack implementation
Signed-off-by: Huang Qi <huangqi3@xiaomi.com>
2022-02-14 11:32:34 +08:00
Huang Qi
ae3fa5cfbf boards/k210: Add -mstrict-align to arch level flags since it don't support unaligned memory access
Signed-off-by: Huang Qi <huangqi3@xiaomi.com>
2022-02-14 11:32:34 +08:00
Huang Qi
55d88627a0 risc-v: Implement common up_cpu_idlestack
Signed-off-by: Huang Qi <huangqi3@xiaomi.com>
2022-02-14 11:32:34 +08:00
raiden00pl
cbbe1c661e net/can/can_recvmsg.c: fix unused variable 'conn' error 2022-02-14 10:42:01 +08:00
raiden00pl
00917bfe9d stm32/fdcan: add CAN FD frames support 2022-02-14 10:42:01 +08:00
raiden00pl
dd8408a973 stm32/fdcan: use array indexes when accessing RX/TX FIFO 2022-02-14 10:42:01 +08:00
Xiang Xiao
34baf47307 libc: posix_openpty should use the absolute path("dev/ptmx")
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-02-14 08:43:05 +09:00
raiden00pl
5b678ab12e net/can/can_setsockopt.c: fix assertion, value can be NULL 2022-02-13 23:16:00 +08:00
Michael Jung
70dae3bb3b Add arm_tcbinfo.c to stm32u5's common C sources
And re-order the list of common C sources alphabetically.

Signed-off-by: Michael Jung <mijung@gmx.net>
2022-02-13 16:32:35 +08:00
Michael Jung
6086f42bfb b-u585i-iot02a: Board Support
Support for the STMicroelectronics B-U585I-IOT02A development board. This
is a proof-of-concept port that demonstrates running NuttX as the
Non-Secure TrustZone domain companion to TrustedFirmware-M.

Signed-off-by: Michael Jung <mijung@gmx.net>
2022-02-13 16:32:35 +08:00
Michael Jung
5c1c939cdc stm32u5: Architecture Support for STM32U5
Architecture support for STMicroelectronics STMU585xx MCUs.  This is
based on corresponding code for STM32L5, but has been considerably
adjusted.  Tested with a B-U585I-IOT02A board and a simple NSH
configuration, but only running NuttX in the non-secure world with
TrustedFirmware-M.

Signed-off-by: Michael Jung <mijung@gmx.net>
2022-02-13 16:32:35 +08:00
Huang Qi
64130b4775 risc-v: Use _ebss instead of _default_stack_limit as idle stack base
Signed-off-by: Huang Qi <huangqi3@xiaomi.com>
2022-02-13 14:37:57 +08:00
Zeng Zhaoxiu
fc4ab4fd94 semaphore: Improve the nxsem_release_holder function.
1. The task which called nxsem_release_holder may not be a holder of the semaphore,
   counts of the holder would not be decreamented.
   This commit try to resolve the problem if there is only one holder.
2. Avoid counts overflow.

Signed-off-by: Zeng Zhaoxiu <walker.zeng@transtekcorp.com>
2022-02-13 03:20:51 +08:00
Zeng Zhaoxiu
ea8f5f565e semaphore: Cleanup, merge public code.
Signed-off-by: Zeng Zhaoxiu <walker.zeng@transtekcorp.com>
2022-02-13 03:20:51 +08:00
Zeng Zhaoxiu
5bf7c185af semphore: release all semphores' holder that the task held when exit
Add a list in TCB to track all semphores the task held, so we
can release all holders when exit, so nxsched_verify_tcb
is unnecessary.

Signed-off-by: Zeng Zhaoxiu <walker.zeng@transtekcorp.com>
2022-02-13 03:20:51 +08:00
Jiuzhu Dong
12b256f860 mm/mm_mallinfo: using mm_foreach to do mm_mallinfo
Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
2022-02-13 03:20:31 +08:00
Jiuzhu Dong
b1a51a5b30 mm/mm_checkcorruption: using mm_foreach to do mm_checkcorruption
Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
2022-02-13 03:20:31 +08:00
Jiuzhu Dong
eba0323eae mm/mm_heap: add mm_foreach to run handler for every memory node
Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
2022-02-13 03:20:31 +08:00
Alexander Lunev
774994b951 net/tcp: support for FIN+ACK case in tcp send event handlers 2022-02-13 03:20:18 +08:00
Michal Lenc
4236fa926f boards/arm/samv7/same70-xplained: added PWM support
This commit adds board level support of PWM driver to SAME70-XPLAINED
board. The functionality is tested with two new configurations

pwm:
  An example configuration with configured PWM.
pysim:
  This configuration contains support for pysimCoder application and
  includes ADC and PWM peripherals and Ethernet driver.

Signed-off-by: Michal Lenc <michallenc@seznam.cz>
2022-02-13 03:20:07 +08:00
Michal Lenc
56b3fc0ef9 arch/arm/src/samv7: added support for PWM driver
This commit adds initial support for PWM driver to SAM MCU series.
Only general PWM on PWMH output is currently supported, complementary
output on PWML is not allowed. The current state of the driver also does
not support external triggering of other perihperals.

Multichannel option is supported. The functionality of the driver was
tested on an example pwm application and with a real time control system.

Signed-off-by: Michal Lenc <michallenc@seznam.cz>
2022-02-13 03:20:07 +08:00
Huang Qi
95b0c85f58 arch: Add xxx_tcbinfo.c to SoC level Make.defs
Fix build break with CONFIG_DEBUG_TCBINFO enabled.

Signed-off-by: Huang Qi <huangqi3@xiaomi.com>
2022-02-12 21:07:35 +09:00
Peter Kalbus
271518a5ff sim: detect clang native compiler on MacOS. 2022-02-11 21:23:07 +08:00
chao.an
98833affd0 net/can: remove psock reference from can connect
remove the psock back reference since timestamp
has been migrated to can_conn_s

Signed-off-by: chao.an <anchao@xiaomi.com>
2022-02-11 21:22:55 +08:00
chao.an
369f7cc451 net/rpmsg: fix the NULL pointer reference on nonblock accept
Signed-off-by: chao.an <anchao@xiaomi.com>
2022-02-11 21:22:45 +08:00
Huang Qi
cafd3e5c48 sched/tcbinfo: Fix warning by discarded qualifiers
Signed-off-by: Huang Qi <huangqi3@xiaomi.com>
2022-02-11 20:32:17 +08:00
anjiahao
ce3c604f48 libc/chdir:"PWD" should save absolute path
Signed-off-by: anjiahao <anjiahao@xiaomi.com>
2022-02-11 13:05:20 +01:00
chao.an
e749f6ca7e net/tcp/monitor: do not migrate the state to close
1. remove the unnecessary interfaces tcp_close_monitor()

socket flags(s_flags) is a global state for net connection
remove the incorrect update for stop monitor

2. do not start the tcp monitor from duplicated psock

the tcp monitor has already registered in connect callback

------------------------------------------------------------
This patch also fix the telnet issue reported by:
https://github.com/apache/incubator-nuttx/pull/5434#issuecomment-1035600651

the orignal session fd is closed after dup, the connect state
has incorrectly migrated to close:

drivers/net/telnet.c:
 977 static int telnet_session(FAR struct telnet_session_s *session)
 ...
 1031   ret = psock_dup2(psock, &priv->td_psock);
 ...
 1082   nx_close(session->ts_sd);

Signed-off-by: chao.an <anchao@xiaomi.com>
2022-02-11 18:56:40 +09:00
Huang Qi
3fe9c9523c risc-v: Fix style issue in SoC's Make.defs
Signed-off-by: Huang Qi <huangqi3@xiaomi.com>
2022-02-11 15:20:17 +08:00
Jiuzhu Dong
02ba5f4103 fs/epoll_fd: support dup file descriptor
Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
2022-02-11 13:52:35 +08:00
Jiuzhu Dong
bff02fcd79 romfs: add FAR for all pointer and optimize some code
Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
2022-02-11 13:46:05 +08:00
Jiuzhu Dong
ef66c620c4 input/uinput: fix codesyle issue
Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
2022-02-11 11:58:49 +08:00
Alan C. Assis
d49ad207ef esp32c3: Fix issue #5377 UART1 not working because clock as disabled 2022-02-11 10:01:25 +08:00
chao.an
eac13a113d net/udp: remove psock hook to avoid invalid reference
Signed-off-by: chao.an <anchao@xiaomi.com>
2022-02-10 15:04:33 -03:00