Commit Graph

52380 Commits

Author SHA1 Message Date
p-szafonimateusz
9b0017659c arch/x86_64: add cmake support
Signed-off-by: p-szafonimateusz <p-szafonimateusz@xiaomi.com>
2024-02-23 07:45:57 +08:00
Alan Carvalho de Assis
45fd5d44bd DOC: Fix NXPlayer name typo 2024-02-22 08:09:44 -08:00
nuttxs
d2b4734756 Deinitialize ESP32-S3 SPI slave GDMA engine 2024-02-22 04:34:29 -08:00
chao an
996b9377a7 arch/tricore: add Infineon AURIX TriCore support
Add support for tricore TC397

1. Porting based on AURIX TC397 KIT_A2G_TC397_5V_TFT evaluation board

   https://www.infineon.com/cms/en/product/evaluation-boards/kit_a2g_tc397_5v_tft/

2. In order to avoid license and coding style issues, The chip-level code
   still uses the implementation of AURIX Development Studio SDK.
   The SDK package will be downloaded as a third-party package during compilation:

   https://github.com/anchao/tc397_sdk

3. Single core only, SMP implementation will be provided in the future.
4. Implemented the basic System Timer, ASCLIN UART driver.
5. Only the Tasking tool chain is supported (ctc/ltc, license maybe required)
6. 'ostest' can be completed on the TC397 development board.

How to run?

1. Setup the tasking toolchain and license

$ export TSK_LICENSE_KEY_SW160800=d22f-7473-ff5d-1b70
$ export TSK_LICENSE_SERVER=192.168.36.12:9090

2. Build nuttx ELF

$ ./tools/configure.sh tc397/nsh
$ make -j
...
artc I800: creating archive libc_fpu.a
LD: nuttx

3. Switch to windows PC, setup AURIX-studio to Debugger Launcher

4. Replace runing ELF to nuttx, and re-download ELF

Signed-off-by: chao an <anchao@lixiang.com>
2024-02-21 21:39:19 -08:00
chao an
930ad64a0c Documentation: Add docummentation for Infineon’s AURIX TriCore architecture
This commit add documentation for the Infineon’s AURIX TriCore architecture.

Signed-off-by: chao an <anchao@lixiang.com>
2024-02-21 21:39:19 -08:00
chao an
09aede87ee tools/nxstyle: add infineon prefix into ignore list
add infineon prefix into ignore list to avoid nxstyle warning

Signed-off-by: chao an <anchao@lixiang.com>
2024-02-21 21:39:19 -08:00
wangyongrong
be4875ed30 rptun ioctl: remove rptun_panic and rptun_dump_all
In the previous patch, we moved rptun_panic and rptun_dump_all in rptun to rpmsg.
In order to ensure CI pass, this two API in rptun is not removed. So we remove rptun_panic and rptun_dump_all in this patch.

Signed-off-by: wangyongrong <wangyongrong@xiaomi.com>
2024-02-21 21:38:05 -08:00
Masayuki Ishikawa
1a11479831 Revert "assert: change the do-while of assert to a conditional expression"
This reverts commit 23aba6c2a1.
2024-02-21 21:29:48 -08:00
Masayuki Ishikawa
e6ca27ac2f Revert "assert: When defining NDEBUG, do not use macro parameters"
This reverts commit 3b6e7c1927.
2024-02-21 21:29:48 -08:00
Masayuki Ishikawa
e67d32a5ba Revert "fix variable set but not used"
This reverts commit d2d93ba58c.
2024-02-21 21:29:48 -08:00
chenrun1
ae730ac246 fs_lock:Avoid deadlock caused by KILL SIGNAL
Signed-off-by: chenrun1 <chenrun1@xiaomi.com>
2024-02-21 13:29:36 -03:00
chenrun1
6e3e03f6b0 fs/vfs:cmakelists add fs_lock config
Signed-off-by: chenrun1 <chenrun1@xiaomi.com>
2024-02-21 13:29:36 -03:00
Zhe Weng
14602be4cc fs/lock: Limit inode type for file locks
When we close a socket fd, it will call get path on sockets.
`close(socket_fd)` -> `file_closelk(filep)` -> `file_fcntl(F_GETPATH)`
It causes a heavy stack load for each socket close operation.
(We have `GETPATH` for sockets to be used for `fdinfo`)

But the socket fds are not intended to be used for file locks.
And so do some other file types, so we may just limit the usage of flock.

Signed-off-by: Zhe Weng <wengzhe@xiaomi.com>
2024-02-21 13:29:36 -03:00
chenrun1
8cdec83adb fs_locks:Fix getlk's l pid return
When there is no conflicting lock, getlk should not tamper with the l_pid content from the upper layer

Signed-off-by: chenrun1 <chenrun1@xiaomi.com>
2024-02-21 13:29:36 -03:00
chenrun1
5c6bd833ed fs_lock:Implementing file locks
Signed-off-by: chenrun1 <chenrun1@xiaomi.com>
2024-02-21 13:29:36 -03:00
chenrun1
17ede2fde4 list.h:add list_for_every_entry_safe_from
Signed-off-by: chenrun1 <chenrun1@xiaomi.com>
2024-02-21 13:29:36 -03:00
guohao15
b36521d4a4 hsearch_r: add DELETE action
Signed-off-by: guohao15 <guohao15@xiaomi.com>
2024-02-21 13:29:36 -03:00
guohao15
4fd175fd5c api: add simple hashtable api
merge form OpenGroup
https://pubs.opengroup.org/onlinepubs/009696899/functions/hcreate.html

Signed-off-by: guohao15 <guohao15@xiaomi.com>
2024-02-21 13:29:36 -03:00
yinshengkai
d2d93ba58c fix variable set but not used
These variables will trigger variable 'ret' set but not used warnings due to different configurations.

Signed-off-by: yinshengkai <yinshengkai@xiaomi.com>
2024-02-21 13:28:20 -03:00
yinshengkai
3b6e7c1927 assert: When defining NDEBUG, do not use macro parameters
The implementation of assert in linux is as follows:
define assert(expr)        (__ASSERT_VOID_CAST (0))

After defining NDEBUG in sqlite, some variables will be undefined,
and referencing variables in assert will cause compilation errors.

sqlite3.c:28729:23: error: ‘mutexIsInit’ undeclared (first use in this function)
28729 |   assert( GLOBAL(int, mutexIsInit) );

Signed-off-by: yinshengkai <yinshengkai@xiaomi.com>
2024-02-21 13:28:20 -03:00
yinshengkai
23aba6c2a1 assert: change the do-while of assert to a conditional expression
According to the standard definition, assert should return a void expression
https://pubs.opengroup.org/onlinepubs/007904875/basedefs/assert.h.html

This patch involves two changes:

If you define the NDEBUG macro, assert does not use any parameters and directly returns a void expression.
assert should return a void expression and cannot use do-while statements.
If the following code , a compilation error will occur.

Signed-off-by: yinshengkai <yinshengkai@xiaomi.com>
2024-02-21 13:28:20 -03:00
Jorge Guzman
97724cbe6c stm32h7/linum-stm32h753bi: add modbus master using uart6 2024-02-21 07:20:08 -08:00
Eren Terzioglu
aa0dccb7bc risc-v/espressif: Add SPI Flash support 2024-02-21 07:19:51 -08:00
chenrun1
7b37dd1224 littlefs/Make.defs:Add get path temp patch
Signed-off-by: chenrun1 <chenrun1@xiaomi.com>
2024-02-21 06:15:39 -08:00
zhouliang3
161ae0ef5c fs/littlefs: Add to get the full path
Signed-off-by: zhouliang3 <zhouliang3@xiaomi.com>
2024-02-21 06:15:39 -08:00
Yanfeng Liu
4456b2db29 risc-v/k230: add IPI support to speed up RPTUN/RPMSG
This patch adds inter-processor interrupt support using K230 mailbox
device to improve the RPMsg efficiency. The polling logic has been
dropped.

Major changes:

- in arch/risc-v/include/k230:
  - irq.h          add IRQ for IPI devices
- in arch/risc-v/src/k230:
  - Kconfig        add IPI related config, increase polling delay
  - Make.defs      add k230_ipi.c to CHIP_SRCS
  - k230_hart.c    fix typo, add notes of zero MISA reading w/ NUTTSBI
  - k230_irq.c     use K230_PLIC_IRQS as ext IRQ limit to support IPI
  - k230_rptun.c   use IPI instead of polling
- in boards/risc-v/k230/canmv230/configs
  - master         enable IPI support
  - remote         enable IPI, TMPFS, RPMSGFS etc

New additions:

- in arch/risc-v/src/k230:
  - k230_ipi.h     add K230 IPI related defintions
  - k230_ipi.c     add K230 IPI driver

Signed-off-by: Yanfeng Liu <yfliu2008@qq.com>
2024-02-21 04:37:03 -08:00
xuxin19
5452f013df cmake/nuttx_add_library.cmake:add target that define in external module CMakeLists.txt
when nuttx's CMake build system calls an external module that already supports CMake,
since `add_library` may have been called internally,
it needs to provide a way to add its internally defined target to the final link.

Signed-off-by: xuxin19 <xuxin19@xiaomi.com>
2024-02-21 19:58:34 +08:00
chao an
f4bc5b5c6b cmake/toolchain: fix compiler warning on ARM32
-- Detecting CXX compile features
-- Detecting CXX compile features - done
arm-none-eabi-gcc: error:  -Wstrict-prototypes: No such file or directory
arm-none-eabi-gcc: error:  -Wstrict-prototypes: No such file or directory
-- Configuring done
-- Generating done

Signed-off-by: chao an <anchao@lixiang.com>
2024-02-21 00:43:42 -08:00
Yongrong Wang
232586873a include/rpmsg/rpmsg.h: remove temp define RPMSGIOC_START, RPMSGIOC_STOP, RPMSGIOC_RESET
Signed-off-by: Yongrong Wang <wangyongrong@xiaomi.com>
2024-02-21 12:42:07 +08:00
Saurav Pal
93d03d0418 fs: Add VFS docs
This commit adds VFS docmentation, and details about the VFS interface.

Signed-off-by: Saurav Pal <resyfer.dev@gmail.com>
2024-02-20 18:28:09 -08:00
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