Commit Graph

20615 Commits

Author SHA1 Message Date
Dong Heng
9ae2fa2b54 xtensa/esp32s3: Fix code style of esp32s3_psram_octal.c 2023-05-10 10:55:20 -03:00
Takumi Ando
08eef2a700 stm32f0l0g0: Fix GPIO port definitions
These series have the following GPIO ports:
- STM32F03X: A to D, and F
- STM32F05/07/09X: A to F
- STM32G0X: A to F
- STM32L0X: A to E, and H

Signed-off-by: Takumi Ando <t-ando@advaly.co.jp>
2023-05-10 18:01:07 +08:00
Takumi Ando
94eb8a0ee0 stm32f0l0g0: Add GPIOE to STM32G0x
All STM32G0x series have 6 GPIO ports A to F.

Refered: RM0444, RM0454

Signed-off-by: Takumi Ando <t-ando@advaly.co.jp>
2023-05-10 18:01:07 +08:00
Dong Heng
3161005c40 xtensa/esp32: Fix himem driver crash in SMP mode 2023-05-10 17:56:38 +08:00
hujun5
6e71527af2 arch/arm64: 64 bit platform compile error reported
compile error log:
common/arm64_arch_timer.c: In function 'arm64_tick_max_delay':
common/arm64_arch_timer.c:178:12: error: conversion from 'long unsigned int' to 'clock_t' {aka 'unsigned int'} changes value from '18446744073709551615' to '4294967295' [-Werror=overflow]
  178 |   *ticks = UINT64_MAX;
      |            ^~~~~~~~~~

Signed-off-by: hujun5 <hujun5@xiaomi.com>
2023-05-10 09:06:59 +02:00
hujun5
7f4cb3057a arch/arm64: merge serial_pl011.c and qemu_serial.c
At present, the serial drivers qemu_serial.c and serial_pl011.c on the fvp-v8r and qemu platforms in arm64 are duplicated
and need to be merged. The plan is to place them under the drivers\serial directory to create a common code module,
so that both fvp-v8r and qemu can use the same code.
In the future, if new platforms use pl011 serial ports, they can also be directly reused

Signed-off-by: hujun5 <hujun5@xiaomi.com>
2023-05-10 09:06:59 +02:00
simbit18
4720162a97 arch/z80/src: Fix nxstyle errors
error: Long line found
2023-05-10 00:47:41 +08:00
David Sidrane
8068dc0238 stm32h7:sdmmc It is not an error if no wait was needed
If the CONFIG_MMCSD_SDIOWAIT_WRCOMPLETE is enabled and the
   card is found to be ready in the waitenable call. Then
   we do not need a Watchdog nor to configure the pin for
   IRQ to detect ready.

   This was reported as an error, and it is not, it simply means
   we do not have to wait.
2023-05-10 00:46:44 +08:00
simbit18
e01a46c8c3 arch/risc-v/src/qemu-rv/Kconfig: Fix indentation
Remove spaces from Kconfig
Add TABs
2023-05-10 00:45:29 +08:00
simbit18
4452ee0743 arch/risc-v/src/mpfs/Kconfig: Fix indentation
Remove spaces from Kconfig
Add TABs
2023-05-10 00:45:29 +08:00
simbit18
2a56bbdb00 arch/ceva/src/xc5/Kconfig: Fix indentation
Remove spaces from Kconfig
Add TABs
2023-05-10 00:45:29 +08:00
simbit18
58ebf26b98 arch/arm/src/tlsr82/Kconfig: Fix indentation
Remove spaces from Kconfig
Add TABs
2023-05-10 00:45:29 +08:00
simbit18
79d6d56532 arch/arm/src/sama5/Kconfig: Fix indentation
Remove spaces from Kconfig
Add TABs
2023-05-10 00:45:29 +08:00
simbit18
64c4fb0a53 arch/arm/src/s32k3xx/Kconfig: Fix indentation
Remove spaces from Kconfig
Add TABs
2023-05-10 00:45:29 +08:00
simbit18
02c9e20b8d arch/arm/src/lpc43xx/Kconfig: Fix indentation
Remove spaces from Kconfig
2023-05-10 00:45:29 +08:00
simbit18
1fc6a4469a arch/arm/src/kinetis/Kconfig: Fix indentation
Remove spaces from Kconfig
2023-05-10 00:45:29 +08:00
simbit18
75b02b037c arch/arm/src/imx6/Kconfig: Fix indentation
Remove spaces from Kconfig
Add TABs
2023-05-10 00:45:29 +08:00
simbit18
934814aba1 arch/sim/Kconfig: Fix indentation
Remove spaces from Kconfig
2023-05-10 00:45:29 +08:00
qinwei1
2eac660ff6 arm64: Updating ARCH_EARLY_PRINT support
Summary:
  Keeping this option out of depend on any common serial.
Using the option, need to implement xxx_lowputc.S/c.
  You can also logging the booting message through rewriting
fake arm64_lowputc with other debug method (eg semihosting,
ARM debug channel etc).

Signed-off-by: qinwei1 <qinwei1@xiaomi.com>
2023-05-09 21:00:48 +08:00
chao an
bebddf3981 sim/asan: disable detect_invalid_pointer_pairs/detect_stack_use_after_return
These 2 detections will have some false positives in coroutine environment

Signed-off-by: chao an <anchao@xiaomi.com>
2023-05-09 20:59:41 +08:00
chao an
25bce71b14 arm64/makefile: preprocess link script to make configure more flexibly
1. arm64/makefile: preprocess link script to make configure more flexibly
2. arm64/EXTRA_LIBS: link all staging library

Signed-off-by: chao an <anchao@xiaomi.com>
2023-05-09 20:48:33 +08:00
Filipe Cavalcanti
c5f3d3d596 arch/arm/src/common/tiva_i2c.c: Update the current message buffer before writing to I2C data register. 2023-05-09 12:22:48 +03:00
Lwazi Dube
5a553db88a arch/arm/sama5: Fix OHCI SchedulingOverrun interrupt storm.
The following message is printed continuously and the nsh
shell is unusable on sama5d3-xplained.
"OHCI ERROR: Unhandled interrupts pending: 000001". This
happens when a keyboard is removed and reinserted on
port3 (lower port) while a bluetooth dongle is in port2.
2023-05-09 10:18:34 +08:00
simbit18
0fd32d8149 arch/xtensa/src/esp32s3/Kconfig: Fix indentation and help attribute
Replace help => ---help---
Remove spaces from Kconfig
Add TABs
2023-05-08 12:42:54 -03:00
simbit18
999ac5d5bb arch/xtensa/src/esp32/kconfig: Fix indentation
Remove spaces from Kconfig
Add TABs
2023-05-08 12:42:54 -03:00
simbit18
94aff9f937 arch/risc-v/src/mpfs/kconfig: Fix indentation
Remove spaces from Kconfig
Add TABs
2023-05-08 12:42:54 -03:00
simbit18
8a0729ac18 arch/arm/src/stm32h7/kconfig
Remove spaces from Kconfig
2023-05-08 12:42:54 -03:00
simbit18
5ed2d90c31 arch/arm/src/sama5/kconfig: Fix indentation
Remove spaces from Kconfig
Add TABs
2023-05-08 12:42:54 -03:00
simbit18
4d48e4626d arch/arm/src/imxrt/Kconfig: Fix indentation
Remove spaces from Kconfig
2023-05-08 12:42:54 -03:00
Ville Juven
22d6f97843 mpfs/mpfs_spi.c: Fix some logic errors in the driver
- putreg32() is used the wrong way around (reg, val) instead of (val, reg)
- MPFS_SPI_FRAMESIZE is not a register, FSIZE is the name
- Clear all interrupts _before_ writing the FIFO, this prevents a race
  condition where a short transmission completes before the interrupt is
  enabled.
2023-05-08 11:49:30 -03:00
Filipe Cavalcanti
9355bd9d01 boards/arm/tiva: mpu6050 driver binding to TM4C1294
Fixed printf warning during compilation and added MPU6050 to bringup of tm4c.
2023-05-08 11:48:06 -03:00
simbit18
2b51111030 arch/z80/src/z180: Fix nxstyle errors
error: Long line found
2023-05-08 13:56:36 +02:00
Xiang Xiao
325f395300 Replace all strncpy with strlcpy
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2023-05-08 09:57:01 +02:00
Xiang Xiao
6f6fce95a2 Replace all sprintf with snprintf
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2023-05-08 09:57:01 +02:00
hujun5
0f243bde33 arch: fix the issue of asynchronous signal processing
in SMP, signal processing cannot be nested, we use xcp.sigdeliver to identify whether there is currently a signal being processed, but this state does not match the actual situation
One possible scenario is that signal processing has already been completed, but an interrupt occurs, resulting in xcp.sigdeliver not being correctly set to NULL,
At this point, a new signal arrives, which can only be placed in the queue and cannot be processed immediately
Our solution is that signal processing and signal complete status are set in the same critical section, which can ensure status synchronization

Signed-off-by: hujun5 <hujun5@xiaomi.com>
2023-05-08 09:11:14 +02:00
hujun5
6bf989159e system/signal: in interrupting the context, regs modify logic error
In the interrupt context, we should first save the interrupt context and modify the interrupt register
to execute the signal processing program immediately after exiting the current interrupt

Signed-off-by: hujun5 <hujun5@xiaomi.com>
2023-05-07 20:33:46 +08:00
Xiang Xiao
49fa611fad boards/sim: Enable more sanitizer check when enable
to catch more runtime usage error

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2023-05-06 09:09:36 +03:00
Alan Carvalho de Assis
276d1c8f48 esp32s3: Add support to RTC 2023-05-06 11:43:01 +08:00
Dong Heng
bd122915f0 xtensa/esp32s3: Support octal lines mode SPIRAM 2023-05-05 18:38:12 +08:00
zhangyuan21
91d34ffd09 arch/sim: add up_getusrsp for sim
Signed-off-by: zhangyuan21 <zhangyuan21@xiaomi.com>
2023-05-05 13:40:04 +08:00
zhangyuan21
841b178782 assert: show stacks with the sp from regs
1. Get the value of sp from dump regs when an exception occurs,
   to avoid getting the value of fp from up_getsp and causing
   incomplete stack printing.
2. Determine which stack the value belongs to based on the value
   of SP to avoid false reports of stack overflow

Signed-off-by: zhangyuan21 <zhangyuan21@xiaomi.com>
2023-05-05 13:40:04 +08:00
Stuart Ianna
dec80be431 arch/risc-v/litex: Fix emac driver compilation when only IPv6 is used. 2023-05-05 11:53:13 +08:00
Lucas Saavedra Vaz
58f59fe9dc arch/xtensa/esp32s2: Fix SPIRAM compilation warnings
This commit aims to fix compilation warnings that happens when enabling SPIRAM for ESP32-S2
2023-05-04 18:41:54 -03:00
Lucas Saavedra Vaz
a5a3b919a0 audio: Add i2s_getmclkfrequency function
Rename i2s_mclkfrequency to i2s_setmclkfrequency and add i2s_getmclkfrequency for getting the current MCLK frequency from the I2S interface
2023-05-04 18:41:54 -03:00
simbit18
fcba68513d arch: Fix nxstyle errors
error: Long line found
2023-05-04 23:21:51 +03:00
fangxinyong
06f8875c0c arch/sim: do not free memory of zero-length reallocation
Follow the change: https://github.com/apache/nuttx/pull/9151,
if MM_CUSTOMIZE_MANAGER is enabled, heap memory manager in host is used,
for example in sim:asan build.

malloc and related allocation APIs will fall back to host_realloc,
do not free memory of zero-length reallocation. So memory allocations
return valid pointer when request zero size in all sim build.

call stack:
    malloc()         (mm/umm_heap/umm_malloc.c)
    mm_malloc()      (arch/sim/src/sim/sim_heap.c)
    mm_realloc()     (arch/sim/src/sim/sim_heap.c)
    host_realloc()   (arch/sim/src/sim/posix/sim_hostmemory.c)
    host_memalign()  (arch/sim/src/sim/posix/sim_hostmemory.c)

Signed-off-by: fangxinyong <fangxinyong@xiaomi.com>
2023-05-05 00:19:28 +08:00
chao an
1be95c3313 sim/lsan: disable fast-unwind by default
The fast-unwind implementation of leak-sanitizer will obtain the
current stack top/bottom and frame address(Stack Pointer) for
backtrace calculation:

https://github.com/gcc-mirror/gcc/blob/releases/gcc-13/libsanitizer/lsan/lsan.cpp#L39-L42

Since the scheduling mechanism of NuttX sim is coroutine
(setjmp/longjmp), if the Stack Pointer is switched, the fast-unwind
will unable to get the available address, so the memory leaks on the
system/application side that cannot be caught normally. This PR will
disable fast-unwind by default to avoid unwind failure.

Signed-off-by: chao an <anchao@xiaomi.com>
2023-05-04 18:05:22 +03:00
Tiago Medicci Serrano
28361a295d esp32/wifi: add support to WPA3 on Station Mode
Add support to select WPA3-SAE while connecting to an AP. Please
note that STA mode sets a security threshold, i.e, it was able to
connect to a WPA3-SAE network prior to this change because it
connects to an equally or more secure network than the set
threshold. Considering this patch, the device is now able to
ignore WPA2-PSK APs when WPA3 is set.
2023-05-03 23:23:31 +08:00
Tiago Medicci Serrano
9ede7d4650 esp32s3/wifi: add support to WPA3 on Station Mode
Add support to select WPA3-SAE while connecting to an AP. Please
note that STA mode sets a security threshold, i.e, it was able to
connect to a WPA3-SAE network prior to this change because it
connects to an equally or more secure network than the set
threshold. Considering this patch, the device is now able to
ignore WPA2-PSK APs when WPA3 is set.
2023-05-03 23:23:31 +08:00
zhangyuan21
884be2bdb9 assert: Distinguish between assert and exception
CURRENT_REGS may change during assert handling, so pass
in the 'regs' parameter at the entry point of _assert.

Signed-off-by: zhangyuan21 <zhangyuan21@xiaomi.com>
2023-05-03 14:49:32 +08:00