Commit Graph

52642 Commits

Author SHA1 Message Date
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
Eren Terzioglu de948babbf xtensa/esp32s2: Fix esp32s2 wdt interrupt bug 2024-02-13 10:31:35 -03:00
Jukka Laitinen 72f9bd142f openamp: Fix void pointer arithmetic in openamp to remove compilation warnings
Signed-off-by: Jukka Laitinen <jukkax@ssrc.tii.ae>
2024-02-12 17:06:33 +01:00
Roberto Bucher 4a04c22147 STM32-H745 files for pysimCoder 2024-02-10 20:01:12 -03:00
Rodrigo Sim f4d500f436 stm32f401rc-rs485: Add rs-485 master mode configuration 2024-02-10 19:52:52 -03:00
trns1997 5c118967bb build xmc4800-relax using CMake 2024-02-10 10:20:59 -03:00
Yanfeng Liu ec7c876f13 fs/mount: add FS_RPMSGFS as cause of NODFS_SUPPORT
It seems that RPMSGFS is missed from the list that doesn't need block or
MTD drivers. This attempts to add it.

Signed-off-by: Yanfeng Liu <yfliu2008@qq.com>
2024-02-10 17:07:05 +08:00
Yanfeng Liu b258680949 rpmsg/rpmsg_ping: tenative fix for build issue
rpmsg_ping.c is blocking CI checks for RPTUN related patches like #11673.
this patch simply fix the compilation issue of rpmsg_ping.c:

- line 191: overflow conversion from "long unsigned int" to "unsigned int"
- line 226: "sendlen" used uninitialized

Signed-off-by: Yanfeng Liu <yfliu2008@qq.com>
2024-02-08 12:38:21 -03:00
Raman Gopalan 0967eb4c24 avr32dev1: Fix compilation and nsh boot-up
I recently imported NuttX version 6.0 (and nsh) into a Microchip
Studio project [1] on Windows to figure out what was going wrong with
the avr32dev1 build. I also briefly checked NuttX version 10.

I worked with the assumption that the avr32 (avr32dev1) specific
changes to the codebase were minimal across NuttX releases.

For the initial proof of concept I used Microchip Studio version 7.0
(with the recent Microchip's ASF updates). I use avr32-gcc (4.4.7)
hosted here [2] for building NuttX for avr32dev1 on GNU/Linux.

Even with the Microchip Studio project, I had initial debug problems
with just stepping through the code a line at a time. I had to bring
in crt0, a trampoline stub and the linker file from one of my older
projects to really build on the suspicion I had with the linker file.

Perhaps an older version of avr32-gcc did something differently. I am
not sure about this. I used avr32-objdump to see the output sections
of the generated elf file. I just had to tweak the linker script to
ensure correct linking of the sections.

With those changes, I was able to inspect the UART sections within
NuttX Microchip Studio project.

Second important change: the transmit pin: I had to reassign the pin
to see the nsh console.

These are the currently assigned UART pins:

RX: PA_24 -> Physical IC pin 59
TX: PB_02 -> Physical IC pin 24

For the avr32dev1 board, they are pins: J1 (berg pin 28) and J2 (berg
pin 10).

In addition, the PR fixes silly compilation problems with avr32dev1.

I have tested the nsh build with my avr32dev1 boards. I used Atmel ICE
to program one of them (flash at 0x80000000) and dfu-programmer to
test my other board (flash at 0x80002000). The other RS-232 parameters
are the same as they were.

References:
[1]: https://github.com/ramangopalan/nuttx_avr32dev1
[2]: https://github.com/ramangopalan/avr32-gnu-toolchain-linux_x86_64
2024-02-08 11:12:13 -03:00