wangzhi16
893c5e92c2
Reduce the size of tcb by four bytes.
...
Signed-off-by: wangzhi16 <wangzhi16@xiaomi.com>
2025-01-02 23:18:42 +08:00
Filipe Cavalcanti
75aa80dba8
arch/xtensa: enable SPIRAM test during boot of ESP32|S3
2025-01-02 23:12:39 +08:00
Gao Feng
da845163a3
xtensa/esp32: add lock for async operation work
...
g_work as singleton can be changed by context switching,
but previous one async operation have not finished yet.
adapt based on: 10a1d17a85
2024-12-30 18:14:32 +08:00
chenxiaoyi
ad8902a33e
esp32[|s2|s3]: adapt to new syscall implementation
...
Signed-off-by: chenxiaoyi <chenxiaoyi@xiaomi.com>
2024-12-27 00:25:55 +08:00
chenxiaoyi
aa426d1edb
xtensa: change write intset register to syscall instruction
...
Signed-off-by: chenxiaoyi <chenxiaoyi@xiaomi.com>
2024-12-27 00:25:55 +08:00
chenxiaoyi
1757ecc5c1
xtensa: add backtrace link from syscall exception
...
Signed-off-by: chenxiaoyi <chenxiaoyi@xiaomi.com>
2024-12-27 00:25:55 +08:00
hujun5
eb587d72e0
fix compile error
...
Configuration/Tool: esp32s2-kaluga-1/audio
Error: chip/esp32s2_lowputc.c:102:22: error: expected '}' before ';' token
102 | .lock = SP_UNLOCKED;
| ^
chip/esp32s2_lowputc.c:62:1: note: to match this '{'
62 | {
Signed-off-by: hujun5 <hujun5@xiaomi.com>
2024-12-23 14:48:35 +08:00
hujun5
f25e3d2324
use small lock in following files
...
arch/risc-v/src/litex/litex_emac.c
arch/risc-v/src/mpfs/mpfs_coremmc.c
arch/risc-v/src/mpfs/mpfs_usb.c
arch/xtensa/src/esp32/esp32_idle.c
arch/xtensa/src/esp32/esp32_rtc_lowerhalf.c
arch/xtensa/src/esp32s2/esp32s2_idle.c
arch/xtensa/src/esp32s2/esp32s2_lowputc.c
arch/xtensa/src/esp32s2/esp32s2_lowputc.h
arch/xtensa/src/esp32s2/esp32s2_rtc_lowerhalf.c
arch/xtensa/src/esp32s3/esp32s3_idle.c
Signed-off-by: hujun5 <hujun5@xiaomi.com>
2024-12-22 18:53:15 +08:00
hujun5
8411a97b85
use small lock in following files
...
arch/xtensa/src/esp32s3/esp32s3_rtc_lowerhalf.c
arch/z16/src/z16f/z16f_serial.c
arch/z80/src/z8/z8_serial.c
boards/arm/max326xx/max32660-evsys/src/max326_button.c
boards/arm/stm32/stm32f4discovery/src/stm32_gs2200m.c
drivers/i2c/i2c_bitbang.c
drivers/power/supply/act8945a.c
drivers/serial/uart_pci_16550.c
drivers/serial/uart_pl011.c
drivers/wireless/bluetooth/bt_uart_shim.c
Signed-off-by: hujun5 <hujun5@xiaomi.com>
2024-12-22 18:43:26 +08:00
Tiago Medicci Serrano
7548db1980
arch/xtensa: Support __thread and thread_local keywords
...
Enable architecture-specific support for those keywords. This is a
"gcc-based" thread local storage implementation.
2024-12-21 20:49:07 +08:00
hujun5
67b95d0142
use small lock in following files
...
arch/arm/src/armv7-a/arm_gicv2.c
arch/arm/src/imx6/imx_serial.c
arch/arm/src/imxrt/imxrt_flexcan.c
arch/xtensa/src/esp32/esp32_himem.c
arch/xtensa/src/esp32s3/esp32s3_himem.c
Signed-off-by: hujun5 <hujun5@xiaomi.com>
2024-12-20 20:58:43 +08:00
hujun5
ecdff659d1
modifyreg[8|32]: use small lock in modifyreg[8|32]
...
reason:
We would like to replace the big lock with a small lock.
Signed-off-by: hujun5 <hujun5@xiaomi.com>
2024-12-19 21:55:21 +08:00
hujun5
75ddce6e3a
modifyreg16: use small lock in modifyreg16
...
reason:
We would like to replace the big lock with a small lock.
Signed-off-by: hujun5 <hujun5@xiaomi.com>
2024-12-18 20:28:26 +08:00
Alin Jerpelea
559b533863
arch/xtensa: migrate to SPDX identifier
...
Most tools used for compliance and SBOM generation use SPDX identifiers
This change brings us a step closer to an easy SBOM generation.
Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2024-12-18 17:51:57 +08:00
hujun5
e3717b3086
esp32_rtc: use small lock in arch/xtensa/src/esp32[s2]/esp32s2_rtc.c
...
reason:
We would like to replace the big lock with a small lock.
Signed-off-by: hujun5 <hujun5@xiaomi.com>
2024-12-18 11:53:15 +08:00
Eren Terzioglu
767c5f16f0
esp32[s2|s3]: Add pulse counter support
2024-12-17 13:35:42 -03:00
Filipe Cavalcanti
ac56285bf8
arch/xtensa: fix memcpy on AP password
2024-12-17 11:27:02 -03:00
chao an
33d717d3a0
tools/parsetrace.py: fix typo lenght -> length
...
Signed-off-by: chao an <anchao@lixiang.com>
2024-12-17 20:48:07 +08:00
chao an
a59f59b9f5
libc/gnu: fix typo adress -> address
...
fix typo adress -> address
Signed-off-by: chao an <anchao@lixiang.com>
2024-12-17 20:48:07 +08:00
hujun5
63f947941a
esp32s3_rtc: use small lock in arch/xtensa/src/esp32s3/esp32s3_rtc.c
...
reason:
We would like to replace the big lock with a small lock.
Signed-off-by: hujun5 <hujun5@xiaomi.com>
2024-12-17 16:20:05 +08:00
Eren Terzioglu
970d1a1f7c
esp32[c3|c6|h2]: Add efuse support
2024-12-17 01:04:39 +08:00
Gao Feng
9e8e7ace09
xtensa: support coredump by register set alignment
2024-12-13 18:21:37 +08:00
simbit18
e4705e7f62
Fix Kconfig style
...
Remove spaces from Kconfig files
Add TABs
2024-12-12 02:18:23 +08:00
chao an
4eeb6546ec
esp/mcpwm: fix unpaired spin lock
...
N/A
Signed-off-by: chao an <anchao@lixiang.com>
2024-12-11 21:36:51 +08:00
Tiago Medicci Serrano
f3ec1bd60c
xtensa/esp32s3: Update the reserved size for struct __lock
...
After https://github.com/apache/nuttx/pull/15075 , the static
assertion at `nuttx/arch/xtensa/src/esp32s3/esp32s3_libc_stubs.c`
was being triggered when building any of the ESP32-S3's defconfigs.
This commit updates the reserved size to reflect the changes
introduced by the related PR.
2024-12-11 21:36:20 +08:00
Gao Feng
10a1d17a85
xtensa/esp32s3: add lock for async operation work
...
g_work as singleton can be changed by context switching,
but previous one async operation have not finished yet.
2024-12-10 22:01:43 +08:00
Gao Feng
1c7d81881c
xtensa/esp32: encrypted MTD for partition offset
...
Non-encrypted mtd can not be used for encrypted device.
Even without SPI Flash encryption,
encrypted MTD also can be used to read no-encrypted data.
2024-12-10 18:15:47 +08:00
Eren Terzioglu
001a663b74
esp32[s2|s3]: Add nxdiag without esptool wrapper
2024-12-07 11:45:59 +08:00
Xiang Xiao
60fb917eda
Remove FAR from 32/64bit arch
...
since these arch doesn't distinguish between near and far pointers
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2024-12-05 22:55:39 +08:00
chenxiaoyi
f313ee5715
xtensa: inline up_switch_context
...
Signed-off-by: chenxiaoyi <chenxiaoyi@xiaomi.com>
Signed-off-by: hujun5 <hujun5@xiaomi.com>
2024-12-05 20:32:45 +08:00
zhangyuan29
1dc1e65202
arch/xtensa: use arch atomic when enable iram heap
...
S32C1I instructions may target cached, cache-bypass,
and data RAM memory locations. S32C1I instructions
are not permitted to access memory addresses in data ROM,
instruction memory or the address region allocated to
the XLMI port. Attempts to direct the S32C1I at these
addresses will cause an exception.
Signed-off-by: zhangyuan29 <zhangyuan29@xiaomi.com>
2024-12-05 00:05:15 +08:00
hujun5
dabf589940
remove redundant judgments *running_task != NULL
...
reason:
In irq, g_running_tasks is always valid.
Signed-off-by: hujun5 <hujun5@xiaomi.com>
2024-12-04 22:50:08 +08:00
hujun5
bc844509e2
addrenv: Ensure that the transmission parameter of addrenv_switch is not NULL
...
reason:
avoid obtaining this_task multiple times.
Signed-off-by: hujun5 <hujun5@xiaomi.com>
2024-12-04 14:20:12 +08:00
Tiago Medicci Serrano
5358f5b940
libm: Do not link the toolchain's libm unless explicitly selected
...
Fix CMake-based build system to include the toolchain's libm only
when `CONFIG_LIBM_TOOLCHAIN` is selected. Before this commit, if
the user selected `CONFIG_LIBM_NEWLIB`, for instance, the build
system would still link the toolchain's libm functions instead of
the ones provided by newlib.
PS: this commit applies the same changes previously introduced for
the other architectures.
2024-12-04 09:30:33 +08:00
hujun5
cc96289e2d
xtensa: syscall SYS_switch_context and SYS_restore_context use 0 para
...
reason:
simplify context switch
sys_call0(SYS_switch_context)
sys_call0(SYS_restore_context)
size nuttx
before
text data bss dec hex filename
187620 1436 169296 358352 577d0 nuttx
after
text data bss dec hex filename
187576 1452 169280 358308 577a4 nuttx
size reduce -44
Signed-off-by: hujun5 <hujun5@xiaomi.com>
2024-12-02 20:05:05 +08:00
Alin Jerpelea
8d50457dfc
arch/xtensa: migrate to SPDX identifier
...
Most tools used for compliance and SBOM generation use SPDX identifiers
This change brings us a step closer to an easy SBOM generation.
Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2024-12-02 17:23:25 +08:00
hujun5
a0420df332
xtensa: remove g_running_tasks[this_cpu()] = NULL
...
reason:
We hope to keep g_running_tasks valid forever.
Signed-off-by: hujun5 <hujun5@xiaomi.com>
2024-12-02 13:29:59 +08:00
hujun5
321419491e
missing update running_task
...
This commit fixes the regression from https://github.com/apache/nuttx/pull/14865
Signed-off-by: hujun5 <hujun5@xiaomi.com>
2024-11-30 02:48:58 +08:00
hujun5
635da96bae
xtensa: remove up_set_current_regs/up_current_regs
...
reason:
up_set_current_regs initially had two functions:
1: To mark the entry into an interrupt state.
2: To record the context before an interrupt/exception. If we switch to a new task, we need to store the upcoming context regs by calling up_set_current_regs(regs).
Currently, we record the context in other ways, so the second function is obsolete. Therefore, we need to rename up_set_current_regs to better reflect its actual meaning, which is solely to mark an interrupt.
Signed-off-by: hujun5 <hujun5@xiaomi.com>
2024-11-30 02:48:58 +08:00
YAMAMOTO Takashi
388ab6c2db
esp32s3: don't clear pending interrupts on eg. up_putc
...
Fixes https://github.com/apache/nuttx/issues/14872
2024-11-28 19:00:21 +08:00
chao an
4dda9800b4
espressif/mcpwm: fix compile error
...
continue work of PR #14938
Signed-off-by: chao an <anchao@lixiang.com>
2024-11-26 16:34:19 +08:00
hujun5
53548509b1
fix build error
...
common/espressif/esp_rmt.c: In function 'rmt_set_tx_thr_intr_en':
common/espressif/esp_rmt.c:654:48: error: passing argument 1 of 'spin_lock_irqsave' makes pointer from integer without a cast [-Werror=int-conversion]
654 | flags = spin_lock_irqsave(g_rmtdev_common.rmt_spinlock);
| ~~~~~~~~~~~~~~~^~~~~~~~~~~~~
| |
| spinlock_t {aka unsigned char}
/home/hujun5/downloads1/vela_sim/nuttx/include/nuttx/spinlock.h:617:55: note: expected 'volatile spinlock_t *' {aka 'volatile unsigned char *'} but argument is of type 'spinlock_t' {aka 'unsigned char'}
617 | irqstate_t spin_lock_irqsave(FAR volatile spinlock_t *lock)
| ~~~~~~~~~~~~~~~~~~~~~^~~~
CC: nsh_script.c common/espressif/esp_rmt.c:662:48: error: passing argument 1 of 'spin_lock_irqsave' makes pointer from integer without a cast [-Werror=int-conversion]
662 | flags = spin_lock_irqsave(g_rmtdev_common.rmt_spinlock);
| ~~~~~~~~~~~~~~~^~~~~~~~~~~~~
| |
| spinlock_t {aka unsigned char}
/home/hujun5/downloads1/vela_sim/nuttx/include/nuttx/spinlock.h:617:55: note: expected '
Signed-off-by: hujun5 <hujun5@xiaomi.com>
2024-11-26 09:03:29 +08:00
hujun5
34e79f9618
spinlock: use spin_lock_init replace spin_initialize
...
reason:
1: spin_lock_init and spin_initialize have similar functionalities.
2: spin_lock and spin_unlock should be called in matching pairs.
Signed-off-by: hujun5 <hujun5@xiaomi.com>
2024-11-26 00:02:44 +08:00
simbit18
7df0e945ad
Fix Kconfig style
...
Remove spaces from Kconfig files
Add TABs
Replace help => ---help---
Remove extra TABs
Add comments
2024-11-20 16:45:40 -03:00
YAMAMOTO Takashi
788f8fc495
esp32s3_partition.c: Appease a compiler warning (-Wdiscarded-qualifiers)
2024-11-20 17:43:12 +08:00
liamHowatt
27e587b179
arch/esp32s3: fb add pandisplay
...
Signed-off-by: liamHowatt <liamjmh0@gmail.com>
2024-11-19 20:51:50 +08:00
YAMAMOTO Takashi
ae5df0e06c
esp32s3_serial.c: make a comment match the code
2024-11-18 19:10:24 +08:00
YAMAMOTO Takashi
fd6eccb00e
arch/xtensa/src/esp32/esp32_serial.c: fix a comment
2024-11-18 19:10:24 +08:00
hujun5
19b4911d7f
arch: remove up_current_regs in common code
...
reason:
When entering an exception or interrupt, there are two sets of registers:
one is the "running regs", which we need to save,
and the other is the "ready to running regs", which we may soon use.
For consistency in logic, we can always store the "running regs" in the regs field of g_running_tasks,
otherwise it may lead to errors in the storage location of the "running regs."
When we need to access the "running regs," we should uniformly retrieve them from the regs field of g_running_tasks.
As the next step, we will rename the set_current_regs/up_current_regs functions
for each architecture to more appropriate names, solely for the purpose of identifying interrupts.
Signed-off-by: hujun5 <hujun5@xiaomi.com>
2024-11-15 18:25:35 +08:00
wangmingrong1
17ce9b86c1
gcov: Correct existing gcov configuration
...
1. add CONFIG_COVERAGE_ALL to replace CONFIG_SCHED_GCOV_ALL
2. Correct all SCHED_GCOV, SCHED_GCOV_ALL
Signed-off-by: wangmingrong1 <wangmingrong1@xiaomi.com>
2024-11-15 01:05:16 +08:00