Commit Graph

53040 Commits

Author SHA1 Message Date
YAMAMOTO Takashi
3a4560ed40 esp32s3: make textheap return i-bus address consistently
Perform I-D translation for extram as well.

Also, use macros from soc.h.
2024-05-14 00:30:21 +08:00
jianglianfang
a7961a3d48 driver/vnc:fix vnc kbd assert cause by wrong data conversion
Signed-off-by: jianglianfang <jianglianfang@xiaomi.com>
2024-05-13 18:12:48 +08:00
YAMAMOTO Takashi
ab7805062d esp32s3/esp32s2: Fix D_I_BUS_OFFSET
It seems like a wrong copy-and-paste from esp32c3.
Actually, internal memory mapping varies among processors.

esp32s3: lightly tested with wamr aot
esp32s2: not tested (i have no hardware access)
2024-05-13 18:12:21 +08:00
halyssonJr
e67df47b64 add support for zero-cross driver 2024-05-12 20:40:07 -03:00
Alan Carvalho de Assis
1f3c47754d boards/stm32h7: Add initial support to WeAct STM32H743
Signed-off-by: Alan C. Assis <acassis@gmail.com>
2024-05-12 21:36:13 +08:00
Inochi Amaoto
4d2d9ecf39 arch/risc-v: fix idle stack assign order
The bc022f8cd8 introduces a static way to calculate idle stack
address for risc-v platform. However, it uses the reverse order
to access idle stack, which breaks boards with smp configuration.

Correct the idle stack order of g_cpux_idlestack.

Fixes: bc022f8cd8 ("arch/risc-v: unify idle stack calculation")
Signed-off-by: Inochi Amaoto <inochiama@outlook.com>
2024-05-12 15:22:50 +09:00
Inochi Amaoto
bc022f8cd8 arch/risc-v: remove g_cpux_idlestack
As all the board allocate idle stack from _ebss. The idle stack
layout is fix and can be computed directly by using _ebss. There
is no need to use g_cpux_idlestack array anymore, remove it.

Signed-off-by: Inochi Amaoto <inochiama@outlook.com>
2024-05-11 17:57:59 +02:00
Inochi Amaoto
afb5a66847 arch/risc-v: unify idle stack calculation
As the stack layout is unified, it is possible to
use a unify formula to calculate the top of idle
stack.

Signed-off-by: Inochi Amaoto <inochiama@outlook.com>
2024-05-11 17:57:59 +02:00
simbit18
09bfaa7292 fix nxstyle
fix Relative file path does not match actual file.
2024-05-11 01:19:06 +08:00
Peter van der Perk
a8f81e4051 imxrt: lpuart singlewire transfer support 2024-05-10 20:00:24 +08:00
Jani Paalijarvi
975d99c3f6 drivers/mmcsd/mmcsd_sdio.c: Fix SD card 4-bit support
Fix a bug which causes that 1-bit mode is always selected.
This happens even if the driver sets SDIO_CAPS_4BIT capability
in case of the card and the host support 1- and 4-bit wide bus.

Signed-off-by: Jani Paalijarvi <jani.paalijarvi@unikie.com>
2024-05-10 19:43:08 +08:00
chao an
1890b58e67 sched/misc: dump stack as platform bit width
before:
stack_dump: 0x8002ff80: 8003057b 00000000 00000000 00000000 00000002 00000000 80030068 00000000
stack_dump: 0x8002ffa0: 00000002 00000000 00000000 00000000 80030280 00000000 8000898e 00000000
stack_dump: 0x8002ffc0: 00000000 00000000 00000000 00000000 0000000b 00000000 0000000a 00000000
stack_dump: 0x8002ffe0: 8002a470 00000000 00000000 00000000 00000000 00000000 00000000 00000000

after:
stack_dump: 0x8002ff80: 000000008003057b 0000000000000000 0000000000000002 0000000080030068 0000000000000002 0000000000000000 0000000080030280 000000008000898e
stack_dump: 0x8002ffc0: 0000000000000000 0000000000000000 000000000000000b 000000000000000a 000000008002a470 0000000000000000 0000000000000000 0000000000000000

Signed-off-by: chao an <anchao@lixiang.com>
2024-05-10 19:42:41 +08:00
Yanfeng Liu
7ec304e6a8 pthread/join: catch null pexit_value case
This adds handling for null pointer in errout route as it crashes my
ostest sometimes.

Signed-off-by: Yanfeng Liu <yfliu2008@qq.com>
2024-05-10 19:42:13 +08:00
Yanfeng Liu
a35b2a5cc7 sched/posixspawn: disable tedious logging
This log appears for NSH internal commands in KERNEL build and
duplicates a lot with task_spawn: log. So drop it to make the
DEBUG_SCHED_INFO logging more readable.

Signed-off-by: Yanfeng Liu <yfliu2008@qq.com>
2024-05-10 15:40:34 +08:00
Tiago Medicci Serrano
0ed714bba4 esp32s3/adc: Update the bootloader configuration for ESP32-S3
Avoid using the legacy bootloader in case it isn't required. Use
the simple boot instead.
2024-05-10 01:44:02 +08:00
YAMAMOTO Takashi
1b5b9845f4 esp32s3-devkit/toywasm: use ARCH_CHIP_ESP32S3WROOM2_32M
As documented in [1], this config is for a board with 32MB flash.

[1] Documentation/platforms/xtensa/esp32s3/boards/esp32s3-devkit/index.rst
2024-05-10 01:44:02 +08:00
Tiago Medicci Serrano
8dca62f8f9 esp32s3: Limit MTD partition size according to the flash size
Whenever a MTD partition is set, this change limits its size
according to the flash size, avoiding the MTD partition to be
greater than the actual flash size.
2024-05-10 01:44:02 +08:00
Tiago Medicci Serrano
bc4a020146 Revert "esp32s3: give ESP32S3_APP_FORMAT_LEGACY a prompt"
This reverts commit 2295fa818d.
2024-05-10 01:44:02 +08:00
chao an
c4017a4b22 cmake/romfs: separate c flags to avoid compile fail
riscv-none-elf-gcc: warning:  -Wstrict-prototypes: linker input file unused because linking not done
riscv-none-elf-gcc: error:  -Wstrict-prototypes: linker input file not found: No such file or directory

Signed-off-by: chao an <anchao@lixiang.com>
2024-05-09 23:45:23 +08:00
simbit18
792b99473c fix nxstyle
corrected comments in C89 style
2024-05-09 23:44:40 +08:00
Michal Lenc
a1f5fd4e72 icjx: use iC-JX interrupt config instead of the general one
There might be multiple expanders, one with interrupt used and other
without. This commit fixes initial incorrect interrupt design by
introducing ICJX_INT_ENABLE config option.

Also fixes naming of ICJX_MULTIPLE option.

Signed-off-by: Michal Lenc <michallenc@seznam.cz>
2024-05-09 23:43:56 +08:00
Yanfeng Liu
8eadde89f1 riscv/qemu: enable debug features
This enables debug features in `rv-virt/nsh` and `rv-virt/nsh64` to
help debugging with QEMU targets.

Signed-off-by: Yanfeng Liu <yfliu2008@qq.com>
2024-05-09 17:31:33 +08:00
hujun5
9a36b8b823 csection: We can save execution time by removing judgments.
test:
We can use qemu for testing.

compiling
make distclean -j20; ./tools/configure.sh -l qemu-armv8a:nsh_smp ;make -j20
running
qemu-system-aarch64 -cpu cortex-a53 -smp 4 -nographic -machine virt,virtualization=on,gic-version=3 -net none -chardev stdio,id=con,mux=on -serial chardev:con -mon chardev=con,mode=readline -kernel ./nuttx

or
compiling
make distclean -j20; ./tools/configure.sh -l sabre-6quad:smp ;make -j20
running
qemu-system-arm  -semihosting -M sabrelite -m 1024 -smp 4 -kernel nuttx/nuttx -nographic

Signed-off-by: hujun5 <hujun5@xiaomi.com>
2024-05-09 13:45:02 +08:00
hujun5
ace5dde1a9 arm/imx6: we use spin_lock_irqsave replace enter_critical_section to protect gpio init
,because enter_critical_section may be called before os initialized

Signed-off-by: hujun5 <hujun5@xiaomi.com>
2024-05-09 13:45:02 +08:00
hujun5
2ee8aa6f2b sched: we use spin_lock_irqsave replace enter_critical_section to protect g_irqvector
enter_critical_section may be called before os initialized

Signed-off-by: hujun5 <hujun5@xiaomi.com>
2024-05-09 13:45:02 +08:00
hujun5
5cee996588 up_putc: int up_putc, enter_critical_section may be called
before kernel has been iniitialized,we use spin_lock_irqsave to replace.

Signed-off-by: hujun5 <hujun5@xiaomi.com>
2024-05-09 13:45:02 +08:00
hujun5
90f9ffc2e8 sched/sched: CONFIG_SCHED_RESUMESCHEDULER macro define error
we removed "select SCHED_RESUMESCHEDULER",
As SCHED_RESUMESCHEDULER is not a necessary feature in SMP,
turning it on by default may affect performance.

Signed-off-by: hujun5 <hujun5@xiaomi.com>
2024-05-09 01:39:47 +08:00
hujun5
e187dbd663 chip/s698pm_cpustart.c: Fix compile error
chip/s698pm_cpustart.c: In function 's698pm_cpu_boot':
Error: chip/s698pm_cpustart.c:74:17: error: unused variable 'tcb' [-Werror=unused-variable]
   struct tcb_s *tcb = this_task();
                 ^~~
cc1: all warnings being treated as errors
make[1]: *** [Makefile:99: s698pm_cpustart.o] Error 1
make[1]: Target 'libarch.a' not remade because of errors.
make: *** [tools/LibTargets.mk:164: arch/sparc/src/libarch.a] Error 2
make: Target 'all' not remade because of errors.
/github/workspace/sources/nuttx/tools/testbuild.sh: line 370: /github/workspace/sources/nuttx/../nuttx/nuttx.manifest: No such file or directory
  Normalize s698pm-dkit/smp

Signed-off-by: hujun5 <hujun5@xiaomi.com>
2024-05-09 01:39:47 +08:00
Stuart Ianna
c4dbabb1bb drivers/devicetree: Add a set of commonly used FDT utilities. 2024-05-09 01:37:11 +08:00
Pressl, Štěpán
297b3b0209 arch/arm/src/samv7/sam_pwm.c: option to make channels synchronous
Make channels synchronous (i.e. share the same timebase) with the help
of SAMV7_PWMx_CHy_SYNC defines. All the channels share the same
timebase of channel 0, so this channel must be defined too.

Signed-off-by: Stepan Pressl <pressste@fel.cvut.cz>
2024-05-08 23:45:40 +08:00
YAMAMOTO Takashi
b049b490b8 esp32-devkitc/wamr_wasi_debug: fix image size in an example 2024-05-08 23:45:05 +08:00
YAMAMOTO Takashi
adcabeb6bf esp32-devkitc/wamr_wasi_debug: Remove a few things to reduce the size
* Remove a few things to fit the default partition size

* Tweak CONFIG_ESP32_STORAGE_MTD_SIZE to match flash 4MB
2024-05-08 23:45:05 +08:00
simbit18
8de8308bb4 Documentation/Documentation/platforms/arm/gd32f4/boards/gd32f470zk-eval: gd32f470z_eval.png Remove the execute permissions on the updated files. 2024-05-08 11:03:05 -03:00
Inochi Amaoto
f4a38c01df arch/risc-v: Make esp32 SoCs allocate idle stack after ebss
ESP32 SoC use a static allocated array as idle stack. To fit
the existed idle stack allocation, make idle stack allocated
from ebss for the whole esp32 series.

Signed-off-by: Inochi Amaoto <inochiama@outlook.com>
2024-05-08 15:43:41 +08:00
Yanfeng Liu
64e008f65b sched/task: minor polish on task_init()
This removes duplicated mask operation and revises comments.

Signed-off-by: Yanfeng Liu <yfliu2008@qq.com>
2024-05-08 15:43:25 +08:00
Yanfeng Liu
ce8cfde768 nuttx/sched.h: minor revision on comments
This is mainly to align them better.

Signed-off-by: Yanfeng Liu <yfliu2008@qq.com>
2024-05-08 15:41:28 +08:00
Yanfeng Liu
ef15b5296d riscv/virt: M-mode poweroff support
This adds poweroff support to `rv-virt/nsh` and `rv-virt/nsh64`.

Signed-off-by: Yanfeng Liu <yfliu2008@qq.com>
2024-05-08 15:39:26 +08:00
Jani Paalijarvi
5b3ef20629 arm64/imx9: Allocate 64B granules instead of 256B
Optimal size of granule is 64B (the dcache line size).
We can use it now as we don't have max. 32 granules limitation anymore.

Signed-off-by: Jani Paalijarvi <jani.paalijarvi@unikie.com>
2024-05-08 08:48:12 +08:00
Jani Paalijarvi
0d3a1bc617 arm64/imx9: Fix fat_dma_ macro issue.
Defining fat_dma_alloc(s) as imx9_dma_alloc(s) causes compiler errors.

Signed-off-by: Jani Paalijarvi <jani.paalijarvi@unikie.com>
2024-05-08 08:48:12 +08:00
Jani Paalijarvi
c11ffaa78f arm64/imx9: Add DMA preflight support for uSDHC
Signed-off-by: Jani Paalijarvi <jani.paalijarvi@unikie.com>
2024-05-08 08:48:12 +08:00
Jani Paalijarvi
602bd685ec arm64/imx9: Add uSDHC driver
Signed-off-by: Jani Paalijarvi <jani.paalijarvi@unikie.com>
2024-05-08 08:48:12 +08:00
Yanfeng Liu
c9a2e4a6c5 risc-v/virt: enable gradeful shutdown in kernel build
This enables graceful shutdown via `poweroff` command in `knsh64`
and `knsh32` configs.

Signed-off-by: Yanfeng Liu <yfliu2008@qq.com>
2024-05-07 21:02:49 +08:00
Yanfeng Liu
c352b04155 risc-v/sbi: add SRST extenstion usage in S-mode
This adds SBI specfication v0.3 based `riscv_sbi_system_reset()` to
support SBI firmware based system reset in kernel mode.

Signed-off-by: Yanfeng Liu <yfliu2008@qq.com>
2024-05-07 21:02:49 +08:00
zhanghongyu
908814a575 libc/lib_bzero:Add bzero prototype.
Implement the bzero function as an alternative to macro expansion.

and support gcc FORTIFY_SOURCE features for nuttx libc

This function will use gcc's function
__builtin_dynamic_object_size and __builtin_object_size

Its function is to obtain the size of the object through compilation,
so as to judge whether there are out-of-bounds operations in commonly used functions.
It should be noted that the option -O2 and above is required to enable this function

Signed-off-by: zhanghongyu <zhanghongyu@xiaomi.com>
2024-05-07 14:59:05 +02:00
dependabot[bot]
4ffad2656e build(deps): bump jinja2 from 3.1.3 to 3.1.4 in /Documentation
Bumps [jinja2](https://github.com/pallets/jinja) from 3.1.3 to 3.1.4.
- [Release notes](https://github.com/pallets/jinja/releases)
- [Changelog](https://github.com/pallets/jinja/blob/main/CHANGES.rst)
- [Commits](https://github.com/pallets/jinja/compare/3.1.3...3.1.4)

---
updated-dependencies:
- dependency-name: jinja2
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-05-07 15:49:59 +08:00
chenwen@espressif.com
3a9d163aae esp32_c3/pm: Fix assert issue in PM mode
1. Adjust code to avoid PM wakelock->count less than or equal to 0.
    2. Fix some document format issues.

Signed-off-by: chenwen@espressif.com <chenwen@espressif.com>
2024-05-07 15:45:32 +08:00
Ivan Palijan
6e941aed8b Added support in Nucleo-L476RG board for BMP280 sensor. 2024-05-07 02:14:15 +08:00
hujun5
32d3dc4a9f arch: armv7-a: Disable IRQ to make the A core
policy consistent with the M core for TEE

Signed-off-by: hujun5 <hujun5@xiaomi.com>
2024-05-06 15:05:07 -03:00
Inochi Amaoto
04e40182ad arch/risc-v: Make bl602 allocate idle stack after ebss
Although almost all board support allocating idle stack after ebss,
bl602 have a different memory layout for idle stack. To unify them,
make idle stack allocated from ebss for bl602.

Signed-off-by: Inochi Amaoto <inochiama@outlook.com>
2024-05-06 15:04:24 -03:00
hujun5
03895f1073 sched: sched: Simplify the scheduling logic in nxsched_add_readytorun() for SMP
test:
We can use qemu for testing.
compiling
make distclean -j20; ./tools/configure.sh -l qemu-armv8a:nsh_smp ;make -j20 running
qemu-system-aarch64 -cpu cortex-a53 -smp 4 -nographic -machine virt,virtualization=on,gic-version=3 -net none -chardev stdio,id=con,mux=on -serial chardev:con -mon chardev=con,mode=readline -kernel ./nuttx

We have also tested this patch on other ARM hardware platforms.
Signed-off-by: hujun5 <hujun5@xiaomi.com>
2024-05-07 01:15:55 +08:00