Commit Graph

52350 Commits

Author SHA1 Message Date
Yanfeng Liu 81d3e123cb docs/rpmsgfs: initial docs on RPMsg file system usage.
This patch adds steps about configuring and using the RPMsg file system
with simple example.

Signed-off-by: Yanfeng Liu <yfliu2008@qq.com>
2024-02-20 18:25:18 -08:00
Rdk-T cc95a76795 Add XMC4 flash command sequence API 2024-02-20 08:52:27 -08:00
simonatoaca bb6f32d610 esp32-sparrow-kit: Add I2S support for the board's microphone
The board's microphone uses 24-bit i2s and this commit also fixes
the segmentation fault caused by the audio buffer overflow.

arch/xtensa/src/esp32/esp32_i2s.c: Fix bug regarding 24-bit audio and add AUDIOIOC_STOP to ioctl
drivers/audio/audio_i2s.c: Report number of channels on AUDIOIOC_GETCAPS
in boards/xtensa/esp32/esp32-sparrow-kit:
	/configs/nsh/defconfig: Add I2S configs
	/src/esp32-sparrow-kit.h: Add the signature of esp32_i2sdev_initialize()
	/src/esp32_bringup.c: Add call to esp32_i2sdev_initialize()

Signed-off-by: simonatoaca <simona.alexandra2000@gmail.com>
2024-02-20 06:46:06 -08:00
Takeyoshi Kikuchi 716a95934d fs: fat: fs_fat32: fix default return value of fat_ioctl().
When issuing an ioctl for a file that exists in a FAT32 file system,
the FAT ioctl() is first executed, but it returns -ENOSYS in
an attempt to pass through to the vfs.

Therefore, the ioctl of the VFS layer, which expects -ENOTTY,
is not processed and an error occurs.

Signed-off-by: Takeyoshi Kikuchi <kikuchi@centurysys.co.jp>
2024-02-20 04:08:26 -08:00
Tiago Medicci Serrano d453f94f63 Documentation: Add entry about the RMT peripheral for ESP32 family
Add documentation about the RMT peripheral (and using it to drive
WS2812 addressable RGB LEDs) for ESP32-S2, ESP32-S3, ESP32-C3,
ESP32-C6 and ESP32-H2.
2024-02-19 19:02:34 -08:00
Tiago Medicci Serrano 1d645318cc esp32s3/rmt: Define default receiver device for the RMT peripheral
This enables using the example without needing to pass a different
argument for the receiver.
2024-02-19 19:02:34 -08:00
Tiago Medicci Serrano e49684d781 risc-v/esp_<rmt|ws2812>: Implement the RMT peripheral for ESP32 RVs
This commit implements the RMT peripheral for all the supported
Espressif's RISC-V devices. It also implements the support for the
WS2812 addressable RGB LED using the RMT peripheral.
2024-02-19 19:02:34 -08:00
Tiago Medicci Serrano c5358d6365 boards/esp32s2-saola-1: Change the RMT output pin to on-board LED
This enables the on-board WS2812 addressable LED to be driven by
the RMT peripheral with the `rmt` defconfig.
2024-02-19 19:02:34 -08:00
Tiago Medicci Serrano 62a608b558 xtensa/esp_ws2812: Get actual RMT clock to encode WS2812 data
WS2812 data is encoded into RMT items according to the RMT clock
source. This commit makes it by using the actual clock source in
spite of a pre-defind value.
2024-02-19 19:02:34 -08:00
Xiang Xiao 2e91c07ca7 Remove the back slash from long literal string
since the back slash is only needed for the long macro definition

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2024-02-19 16:43:15 +01:00
Bowen Wang 8bf8e21614 rptun: should initialize the vring da when da == 0 || da == -1
Be compatible with Linux, Linux remoteproc will init the vring.da
when da == FW_RSC_U32_ADDR_ANY

Signed-off-by: Bowen Wang <wangbowen6@xiaomi.com>
2024-02-19 05:01:46 -08:00
chao an e11c793b33 toolchain/tasking: add dependencies rules for tasking compiler
Tasking compiler uses customized compilation options for generating dependencies files

Signed-off-by: chao an <anchao@lixiang.com>
2024-02-19 03:36:43 -08:00
wangyongrong 10a8c2be92 rptun ioctl: Strip rpmsg ioctl and rptun ioctl.
rptun ioctl only handle RPTUNIOC_START, RPTUNIOC_STOP, RPTUNIOC_RESET,
rpmsg ioctl handles the public ioctl commands part.

Signed-off-by: wangyongrong <wangyongrong@xiaomi.com>
2024-02-19 02:15:45 -08:00
wangyongrong 6d27c12c57 rptun dump: move rptun_dump.c to rptun.c, remove redundant code.
Signed-off-by: wangyongrong <wangyongrong@xiaomi.com>
2024-02-18 20:35:40 -08:00
Alan Carvalho de Assis e0051240fb Documentation: Add docummentation to AVR32DEV1/UC3B-CPU board.
This commit add documentation to the UC3B-CPU board, this is
board is a clone of Atmel AVR32DEV1.

Signed-off-by: Alan C. Assis <acassis@gmail.com>
2024-02-18 17:29:48 -08:00
Alan Carvalho de Assis 331877d4ee boards/raspberrypi-pico: Add autoleds and userleds support
This commit adds support to autoleds and userleds for
raspberrypi-pico board. It uses the board LED connected
to GPIO 25.

Signed-off-by: Alan C. Assis <acassis@gmail.com>
2024-02-19 07:54:58 +08:00
freakishness b283e39eb5 Add support for hpm6360evk 2024-02-18 09:17:56 -08:00
raiden00pl 02b418a7ea arch/arm/src/nrf52/CMakeLists.txt: format file 2024-02-18 07:40:41 -08:00
raiden00pl b3b543e093 arch/nrf52: add initial support for IEEE 802.15.4
Supported features:

- frame transmition
- frame reception and filtering
- immediate ACK (incoming and outgoing)
- promiscuous mode
- delayed transmision
- radio events trace
- setting pending bit for all incoming Data Request frames
- un-slotted CSMA-CA

Work in progres features (some logic is present, but they require more work):

- beacon transmision (periodic transmition works, but requires verification)
- slotted CSMA-CA
- GTS

Fetures not implemented:

- enhanced ACK (Enh-ACK)
- enhanced beacon
- low power mode
- advanced features from IEEE 802.15.4e (DSME, TSCH)

Added examples for boards:

- nrf52832-dk: mrf24j40_6lowpan
- nrf52832-dk: mrf24j40_mac
- nrf52840-dk: ieee802154_6lowpan
- nrf52840-dk: ieee802154_mac
- nrf52840-dongle: ieee802154_mac
- nrf9160-dk-nrf52: ieee802154_6lowpan
- nrf9160-dk-nrf52: ieee802154_mac
2024-02-18 07:40:41 -08:00
raiden00pl 3f763f5d69 nrf52/nrf52_radio: various changes to support IEEE802154
- remove read-write logic - this should be handled by radio protocol implementation
- remove EVENTS and TASKS bit definitions - we can just use a signle definition
- add more radio ops
- fix frequency configuration
- fix printf warnings
- fix radio reset
2024-02-18 07:40:41 -08:00
raiden00pl a99275ec1a various cosmetic changes related to ieee802154 2024-02-18 07:40:41 -08:00
Bowen Wang de61a8e009 intel64/Toolchain.defs: move toolchain releated option to Toolchain.defs
Follow other arch does, move common toolchain option to Toolchain.defs

Signed-off-by: Bowen Wang <wangbowen6@xiaomi.com>
2024-02-18 05:34:53 -08:00
Bowen Wang 415f13372d x86_64_netinitialize: support CONFIG_NETDEV_LATEINIT for x86_64
Now x86_64 can use config CONFIG_NETDEV_LATEINIT

Signed-off-by: Bowen Wang <wangbowen6@xiaomi.com>
2024-02-18 05:34:53 -08:00
Bowen Wang ca22e95577 virtio: move metal_init to the virtio_register_drivers()
Only call metal_init() once for virtio framework

Signed-off-by: Bowen Wang <wangbowen6@xiaomi.com>
2024-02-18 04:09:44 -08:00
Bowen Wang db85061b0b sim/rpmsg: change SIM_RPTUN_MASTER to SIM_RPMSG_MASTER
Simply the config, later we can directly use macro SIM_RPMSG_MASTER
to controll all the rpmsg transport init.

Signed-off-by: Bowen Wang <wangbowen6@xiaomi.com>
2024-02-18 04:09:34 -08:00
Bowen Wang f246907e78 sim/sim_bringup: make rpmsg services init controled by CONFIG_RPMSG
Because all rpmsg services depends on RPMSG instead RPTUN

Signed-off-by: Bowen Wang <wangbowen6@xiaomi.com>
2024-02-18 04:09:34 -08:00
Bowen Wang fcfd5e8ebf rpmsg/Kconfig: add rpmsg_local_name to replace rptun_local_name
Because rpmsg service depends on RPMSG, make rpmsg socket use the
RPMSG_LOCAL_NAME

Signed-off-by: Bowen Wang <wangbowen6@xiaomi.com>
2024-02-18 04:09:34 -08:00
Bowen Wang 169f47beec rpmsg: make all the rpmsg services deponds on RPMSG
After decoupled the rpmsg and rptun, all the rpmsg service should
depends on the RPMSG.

Signed-off-by: Bowen Wang <wangbowen6@xiaomi.com>
2024-02-18 04:09:34 -08:00
chao an 39a0e6fa74 toolchain/lto: enable lto flags only on GNU toolchain
Some commercial customized toolchains do not support these options

Signed-off-by: chao an <anchao@lixiang.com>
2024-02-18 00:47:53 -08:00
Rodrigo Sim b871783889 board/stm32f401rc-rs485: Add USB console support
This commit adds support to use NSH over USB without
connecting an external USB/Serial adapter.

Signed-off-by: Rodrigo Sim <rcsim10@gmail.com>
2024-02-17 18:28:20 -08:00
raiden00pl c1e81c348d ieee802154_mac: add TRACEDUMP request
Used to dump trace log from radio.
Not used in upstream yet, will be supported by nrf52 IEEE 802.15.4 implementation
2024-02-17 05:00:44 -08:00
raiden00pl f4324e118e arch/nrf{52|53|91}: let the events from comparator correspond to CC id
this allows us to use the same value to set the comparator and handle comparator events,
making RTC easier to use
2024-02-17 05:00:35 -08:00
raiden00pl 1d94b2159c mrf24j40: add support for IEEE802154_ATTR_PHY_REGDUMP 2024-02-17 05:00:27 -08:00
raiden00pl a77c3b367a arch/nrf{52|53}/gpiote.c: fix event reconfiguration for a given pin
if a given pinset is already used, we need to update it, not add another event
2024-02-17 05:00:06 -08:00
raiden00pl 4996f0cd16 boards/nrf{52|53|91}/common: add reset logic 2024-02-17 04:59:56 -08:00
raiden00pl dbbe06193e arch/arm/src/nrf{52|53|91}/xxx_rtc.h: include nuttx/irq.h
fixes undefined xcpt_t error that sometimes occurs
2024-02-17 04:59:49 -08:00
Xiang Xiao 42dad89211 rpmsg/ping: Replace UINT_MAX with CLOCK_MAX
since clock_t may map to either 32-bit or 64-bit integer type,
UINT_MAX may not be the maximum value of clock_t.

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2024-02-16 22:16:31 +02:00
Petro Karashchenko 9feac3b644 Revert "citest/sim01: disable sim:libcxxtest on macOS"
This reverts commit 1ecd78f5cc.
2024-02-16 10:42:23 -08:00
Petro Karashchenko 5495ff4d78 libs/libxx: add patch to remove mach/mach_time.h inclusion
Inclusion of mach/mach_time.h by libcxx/src/chrono.cpp breaks
the build on latest MACOS dues to https://forums.developer.apple.com/forums/thread/746737
The interface from mach/mach_time.h is not referenced in chrono.cpp
so it is safe to remove it

Signed-off-by: Petro Karashchenko <petro.karashchenko@gmail.com>
2024-02-16 10:42:23 -08:00
Alan Carvalho de Assis 940f1bace0 arch/stm32h7: Clear all PWM channel when during STOP
I noticed when executing pwm STOP command in
multichannel mode, the channel still outputting.

This commit fixes this issue.

Signed-off-by: Alan C. Assis <acassis@gmail.com>
2024-02-15 21:27:22 -08:00
Alan Carvalho de Assis 5975b25951 arch/stm32f7: Clear all PWM channel when during STOP
I noticed when executing pwm STOP command in
multichannel mode, the channel still outputting.

This commit fixes this issue.

Signed-off-by: Alan C. Assis <acassis@gmail.com>
2024-02-15 21:27:22 -08:00
Alan Carvalho de Assis 6d346793ee arch/stm32: Clear all PWM channel when during STOP
I noticed when executing pwm STOP command in
multichannel mode, the channel still outputting.

This commit fixes this issue.

Signed-off-by: Alan C. Assis <acassis@gmail.com>
2024-02-15 21:27:22 -08:00
Yanfeng Liu 9620d7a12d rpmsg/debug: add debug configs and macros
This patch adds debug macros for RPTUN/RPMSG related logging purposes.

Signed-off-by: Yanfeng Liu <yfliu2008@qq.com>
2024-02-15 19:53:55 -08:00
Yanfeng Liu 709a1c61f1 risc-v/k230: revise k230 hart operations and kernel linker script.
This patch revises `k230_hart.[ch]` by:

  - revising big core boot/stop control.
  - making k230_hart_is_big() available in S-mode.
  - adding more comments.

This patch also revises the `ld-kernel.script` so that to match the
latest MMU pgtable design.

Signed-off-by: Yanfeng Liu <yfliu2008@qq.com>
2024-02-15 19:53:24 -08:00
Yanfeng Liu 1ecd78f5cc citest/sim01: disable sim:libcxxtest on macOS
There have been errors like below on macOS for sim:libcxxtest

```
Error: /Applications/Xcode.../include/mach/vm_page_size.h:59:44:
error: expected ';' after top level declarator
```
This patch tries to disable that check on macOS.

Signed-off-by: Yanfeng Liu <yfliu2008@qq.com>
2024-02-15 06:15:24 -08:00
Yanfeng Liu 0e55e461a5 docs/tmpfs: add initial document
This adds initial document for using TMPFS based on my short experience,
hoping to save people's time on guessing how to use.

Signed-off-by: Yanfeng Liu <yfliu2008@qq.com>
2024-02-15 17:49:15 +08:00
KMSorSMS 410ac71b70 fix typo error in quickstart compiling_cmake
"
I used

cd nuttx
cmake -B build -DBOARD_CONFIG=stm32f401rc-rs485:nsh -GNinja

to config
and when following the instruction in this official websites I found the
command to use cmake to build the target is wrong.
which is "cmake --build build -t menuconfig" also wrong the output dir
"build/nuttx".
and by the way, In my practice I find the bin file and elf file is not
in build/nuttx but in build/. So I changed these. But I'm not 100% sure
that my fix is right as I'm a beginner, but what I fix works fine in my
computer. This is my first PR to the public doc. My fix maybe totally
wrong as I am not get into the nuttx, just following the instruction and
encountered some mistakes.
thx for reviewing
"
2024-02-15 17:48:28 +08:00
Yanfeng Liu 87ad1196e1 rptun/rptun_initialize: add explicit initialization for variable
This explicitly initializes variable `onceinit` before use.

Signed-off-by: Yanfeng Liu <yfliu2008@qq.com>
2024-02-14 10:50:48 -05:00
Yanfeng Liu a4b22fe999 risc-v/k230: initial Asymmetric Multi-Processing support
K230 chip has two T-Head C908 RiscV cores, previously we run NuttX
on either little or big cores. This patch runs NuttX on both cores
with OpenAMP support via the RPTUN driver.

New additions:

- in arch/risc-v/src/k230
  - k230_rptun.c              K230 RPTUN driver
  - k230_rptun.h              K230 RPTUN driver header file

- in baords/risc-v/k230/canmv230
  - configs/master            Build config for master node
  - configs/remote            Build config for remote node
  - scripts/ld-rptun.script   Build script for RPTUN

Major changes:

- arch/risc-v/Kconfig         Select NUTTSBI_LATE_INIT upon NUTTSBI
- in arch/risc-v/include
  - k230/irq.h                Add UART3 IRQ defs
- in arch/risc-v/src/k230
  - Kconfig                   Add RPTUN related config items
  - Make.defs                 Add k230-rptun.c to sources
  - hardware/k230_memorymap.h Add K230 device and CSR defs
  - k230_hart.c               Add hart ctrl for RPTUN
  - k230_hart.h               Add hart ctrl for RPTUN
  - k230_mm_init.c            Add Svpmbt to support RPTUN
  - k230_start.c              Revised to support RPMsg UART
- in boards/risc-v/k230/canmv230
  - scripts/Make.defs         Add RPTUN script selection
  - src/canmv_init.c          Add RPTUN and RPMsg_UART initialization
- in Documentation/platforms/risc-v/k230/boards/canmv230
  - index.rst                 Add AMP usage information.

Signed-off-by: Yanfeng Liu <yfliu2008@qq.com>
2024-02-13 10:34:21 -03:00
Nicolas Lemblé 4a85fbfd09 arch/xmc4: Fix CCU registers 2024-02-13 10:33:04 -03:00