Commit Graph

52862 Commits

Author SHA1 Message Date
dongjiuzhu1
9c55f21a6f drivers/cdcacm/serial: add release interface to release uart_dev resource
Signed-off-by: dongjiuzhu1 <dongjiuzhu1@xiaomi.com>
2024-04-21 23:21:54 +08:00
raiden00pl
5af805b2ef sensors/bmi270: add support for the new sensor framework
bmi270 can be used with the new sensor framework
2024-04-21 19:06:18 +08:00
raiden00pl
3d765616ea sensors/adxl372: add support for the new sensor framework
adxl372 can be used with the new sensor framework
2024-04-21 18:57:33 +08:00
hujun5
d0820acbbb sched: misc: Remove sched_lock in _assert()
Signed-off-by: hujun5 <hujun5@xiaomi.com>
2024-04-21 11:40:01 +02:00
hujun5
72548951d3 drivers: syslog: Replace sched_lock with critical section in syslog_flush_intbuffer()
Signed-off-by: hujun5 <hujun5@xiaomi.com>
2024-04-21 11:40:01 +02:00
Michael Jung
3739a233b7 rp2040/w5500-evb-pico: Add documentation
Signed-off-by: Michael Jung <michael.jung@secore.ly>
2024-04-21 11:11:09 +08:00
Michael Jung
f55145b43c rp2040: add w5500-evb-pico board configuration
This is copy of raspberrypi-pico with all occurences of raspberrypi replaced by
w5500-evb.  Only the usbnsh defconfig is available, which is based on the
raspberrypi-pico:usbnsh defconfig, but enables the WIZnet W5500 Ethernet chip.
TCP/IP for IPv4 and IPv6 is enabled.

Signed-off-by: Michael Jung <michael.jung@secore.ly>
2024-04-21 11:11:09 +08:00
Michael Jung
9c705828bc rp2040: Add lower layer driver for WIZnet W5500
Courtesy of Adam Comley

Signed-off-by: Michael Jung <michael.jung@secore.ly>
2024-04-21 11:11:09 +08:00
Yanfeng Liu
a70c0a90a7 tools/configure.sh: revise help message
Revising the help message for `-L` option.

Signed-off-by: Yanfeng Liu <yfliu2008@qq.com>
2024-04-21 11:07:09 +08:00
Yanfeng Liu
c577abe222 docs/os: fix typos
This fixes a few typos in conventions.rst and libc/index.rst.

Signed-off-by: Yanfeng Liu <yfliu2008@qq.com>
2024-04-21 11:06:46 +08:00
Yanfeng Liu
102a62c7e3 mm/mm_gran: remove allocation size limitation
This patch refactors granule allocator to remove the 32 granules
limitation with the help of a gran_range_s structure and related
functions, see "mm_grantable.h" for details.

Below are the major functions explaining how this works:

- The gran_match() checks if a gran range all in the given state.
  it gives last mismatch position when fails free range matching.
- The gran_search() tries to find the position of a free range.
  It leverages last mismatch position from gran_match() to speed
  up the search.

range size handling is mainly in gran_match() and gran_set_().

Signed-off-by: Yanfeng Liu <yfliu2008@qq.com>
2024-04-20 16:24:37 -03:00
raiden00pl
db7c8be61f sensors: add support for bmm150 magnetometer
add support for Bosch BMM150 Magnetometer
2024-04-20 16:20:43 -03:00
ChenChuang
e43aa99ae8 fix: the bug about rwbuffer causing mem overflow
when the offest from rwb->wrblockstart to startblock
plus rwb->wrnblocks is greater than rwb->wralignblocks,
it will be causing memory overflow since rwb->wrbuffer is
allocated rwb.wrmaxblock(rwb.wralignblocks) blocks.
2024-04-20 11:58:12 -03:00
raiden00pl
ebcf25b2f6 sensors: add support for adxl362 accelerometer
add support for Analog Devices ADXL362 accelerometer
2024-04-20 11:47:50 -03:00
Jukka Laitinen
33d0276f3e arch/arm64/src/imx9/imx9_lpuart.c: Change ARMV8M_DCACHE_LINESIZE -> ARMV8A_DCACHE_LINESIZE
Signed-off-by: Jukka Laitinen <jukkax@ssrc.tii.ae>
2024-04-20 18:43:41 +08:00
Jukka Laitinen
155c776ba8 arch/arm64/src/imx9/imx9_usbdev.c: Fix the descriptor alignments and cache management
Align all the dtd and dqh on cache line boundaries and clean up the cache management

Signed-off-by: Jukka Laitinen <jukkax@ssrc.tii.ae>
2024-04-20 18:43:41 +08:00
anjiahao
67b7152034 Documentation:update qemugdb usage
Remove nuttx-gdbinit,use tools/gdb/__init__.py instead

Signed-off-by: anjiahao <anjiahao@xiaomi.com>
2024-04-20 18:42:28 +08:00
chao an
d59f9186ca arch/risc-v: add llvm experimental extensions into command line
LLVM supports (to various degrees) a number of experimental extensions.
All experimental extensions have experimental- as a prefix. There is
explicitly no compatibility promised between versions of the toolchain,
and regular users are strongly advised not to make use of experimental
extensions before they reach ratification.

Fix compile error:
riscv64-unknown-elf-clang: error: invalid arch name 'rv64gcv_zfh_zvfh', requires '-menable-experimental-extensions' for experimental extension 'zvfh'

Signed-off-by: chao an <anchao@lixiang.com>
2024-04-19 20:13:54 +08:00
chao an
d11b1ba9cb drivers/serial/16550: remove unused function
drivers/serial/uart_16550.c:690:20: warning: unused function 'u16550_restoreuartint' [-Wunused-function]
static inline void u16550_restoreuartint(FAR struct u16550_s *priv,
                   ^

Signed-off-by: chao an <anchao@lixiang.com>
2024-04-19 20:13:16 +08:00
chao an
3a5abf724e sched/Kconfig: make disable idle loop configurable
disable idle loop in experimental

Signed-off-by: chao an <anchao@lixiang.com>
2024-04-19 20:12:17 +08:00
Ville Juven
252b4a4094 imx93-evk/README.txt: Update instructions
It is advisable to set bootdelay to 0 when using bootcmd to disable
dcache on u-boot. Using bootdelay -1 will definitely work as it disables
bootcmd altogether (and leaves the dcache enabled). This step is added
to remove confusion.
2024-04-19 20:12:03 +08:00
chao an
e863e3dd37 arch/risc-v: add LLVM clang support
Verified on LLVM-Metal:
$ riscv64-unknown-elf-clang --version
(LLVM-Metal 15.9.0-2023.03.0) clang version 15.9.0
Target: riscv64-unknown-unknown-elf
Thread model: posix

Signed-off-by: chao an <anchao@lixiang.com>
2024-04-19 12:27:56 +08:00
Xiang Xiao
55e3cf7e2d sched: Move dump.c to sched_dumponexit.c
The dump.c is a part of sched module, so move it to sched directory.

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2024-04-19 08:39:10 +08:00
xuxin19
859247c224 cmake:enhance set_source_files_properties for NuttX CMake module
Because `set_source_files_properties` in cmake will overwrite the properties instead of appending them.
This module implements addition and deletion by
first `getting_source_file_property` and then `set_source_files_properties`

Signed-off-by: xuxin19 <xuxin19@xiaomi.com>
2024-04-18 14:57:58 -03:00
xuxin19
4b11d37cf7 cmake-bugfix:add santity check for target depends and change
inter_library header inheritance level

Signed-off-by: xuxin19 <xuxin19@xiaomi.com>
2024-04-18 14:57:58 -03:00
xuxin19
6960f1b967 cmake:change add_dep to nuttx_add_dep for nuttx_add_application
Signed-off-by: xuxin19 <xuxin19@xiaomi.com>
2024-04-18 14:57:58 -03:00
xuxin19
8ab4d3c950 cmake:sanity check to avoid custom board not providing Kconfig by
default

Signed-off-by: xuxin19 <xuxin19@xiaomi.com>
2024-04-18 14:57:58 -03:00
Huang Qi
93d75129de riscv: Add Vector CSRs to csr.h
The CSR register definitions from RVV 1.0 spec: https://github.com/riscv/riscv-v-spec/blob/master/v-spec.adoc#vector-registers

Signed-off-by: Huang Qi <huangqi3@xiaomi.com>
2024-04-19 00:31:07 +08:00
Ville Juven
d73aab9f71 arm64/imx9: Add LPSPI driver
Add driver for LPSPI

Co-authored-by: Jukka Laitinen <jukkax@ssrc.tii.ae>
2024-04-18 10:58:02 -03:00
Yanfeng Liu
8d4eae41c1 arch/kconfig: revising kernel mapping configs
- Add ARCH_KVMA_MAPPING to guard kernel mapping.
- Set dependency from MM_KMAP to ARCH_KVMA_MAPPING, as per commit
  70de321de3.

Signed-off-by: Yanfeng Liu <yfliu2008@qq.com>
2024-04-18 17:10:04 +08:00
Zhe Weng
3a844d8dd7 net/netlink: Add NETLINK_NETFILTER's CONNTRACK support
Now we only supports conntrack info from NAT entries, to let our apps in user space know the mapping status in NAT.

Signed-off-by: Zhe Weng <wengzhe@xiaomi.com>
2024-04-18 13:03:59 +08:00
Zhe Weng
9b77bb16c9 net/netlink: Move netlink_add_terminator as public
Prepare for other netlink dumps.

Signed-off-by: Zhe Weng <wengzhe@xiaomi.com>
2024-04-18 13:03:59 +08:00
Zhe Weng
b0cf0acc66 net/nat: Add foreach interface for entries
Prepare for netlink conntrack dump of entries.

Signed-off-by: Zhe Weng <wengzhe@xiaomi.com>
2024-04-18 13:03:59 +08:00
Alan Carvalho de Assis
8f4f166bf0 boards/stm32: Add ds1307 to CMake build 2024-04-18 10:20:23 +08:00
Ville Juven
169dd50a08 imx9_gpioirq: Fix testing of ICR field from pinset
icr is tested below with macros like GPIO_INT_LOWLEVEL et al. Those macros
are shifted left by GPIO_INTCFG_SHIFT, so the temporary icr variable
should not be shifted right.
2024-04-18 00:40:07 +08:00
Ville Juven
09a6c400f6 imx9_boot.c: Add initialization of pin interrupts
Initialize the pin interrupt support during boot
2024-04-18 00:40:07 +08:00
Michal Lenc
9798674f27 libc: add support for reallocarray
This commit adds support for reallocarray function. The functionality
is the same as for standard realloc, but the function also checks for
multiplication overflow and fails safely in case it occurs.

Signed-off-by: Michal Lenc <michallenc@seznam.cz>
2024-04-17 11:36:39 -03:00
wangchen
11962c3004 simwifi:change script path from absolute path to soft link
Signed-off-by: wangchen <wangchen41@xiaomi.com>
2024-04-17 19:46:42 +08:00
wangchen
17a46ee549 sim_wifi.sh:add stop_bridge script to the command(./tools/simwifi/sim_wifi.sh clean interface)
stop_bridge script will excute simhostroute.sh interface off
command example:sudo ./tools/simwifi/sim_wifi.sh clean eno1

Signed-off-by: wangchen <wangchen41@xiaomi.com>
2024-04-17 19:46:42 +08:00
Huang Qi
4bcb33926e libc.csv: Fix macro guard for TLS related symbols
The current macro guard for TLS related symbols is
not enough, only if !defined(CONFIG_DISABLE_PTHREAD)
and CONFIG_TLS_NELEM > 0, the TLS related symbols
will enabled.

So if CONFIG_DISABLE_PTHREAD is not defined, but
TLS is disabled, the reference to TLS related symbols
will cause build error (undefined reference to xxx).

Signed-off-by: Huang Qi <huangqi3@xiaomi.com>
2024-04-17 19:45:26 +08:00
Pressl, Štěpán
1a2e752ea7 arch/arm/src/samv7/sam_qencoder.c: add support for GETINDEX ioctl call
The SAMV7's qencoder driver now supports the GETINDEX ioctl call
which does not reset the internal Timer/Counter and returns
the current position, position of the last index and the number
of captured indexes to a struct qe_index_s pointer. Because the
SAMV7's timers are 16bit, the extension to 32 bits must be done.

Select CONFIG_SAMV7_QENCODER_ENABLE_GETINDEX in the Kconfig to
enable this functionality.

This driver does not obey the instructions given in the ATSAMV7
2023 datasheet because the recommended trigger resets the internal
counter which is not desired. Instead, a capture into capture A
and capture B registers is used. This way if an event happens
(the rising edge of the index signal), the current counter's value
is captured.

Signed-off-by: Stepan Pressl <pressste@fel.cvut.cz>
2024-04-17 19:44:34 +08:00
Almir Okato
d098c1dc87 esp32s3: add simple boot support
The Simple Boot feature for Espressif chips is a method of booting
that doesn't depend on a 2nd stage bootloader. Its not the
intention to replace a 2nd stage bootloader such as MCUboot and
ESP-IDF bootloader, but to have a minimal and straight-forward way
of booting, and also simplify the building.

This commit also removes deprecated code and makes this bootloader
configuration as default for esp32s3 targets and removes the need
for running 'make bootloader' command for it.

Other related fix, but not directly to Simple Boot:
- Instrumentation is required to run from IRAM to support it during
initialization. `is_eco0` function also needs to run from IRAM.
- `rtc.data` section placement was fixed.
- Provide arch-defined interfaces for efuses, in order to decouple
board config level from arch-defined values.

Signed-off-by: Almir Okato <almir.okato@espressif.com>
2024-04-17 19:43:05 +08:00
Alan Carvalho de Assis
9009cd6f2d boards: Move DS1307 initialization to stm32/common
The DS1307 was used as board specific, but it is better move it to
stm32/common to be easily used by other boards as well.

Signed-off-by: Alan C. Assis <acassis@gmail.com>
2024-04-17 19:28:56 +08:00
Alan Carvalho de Assis
96dd39ba2e board/stm32f4discovery: Fix ds1307.c initialization
The ds1307 doesn't need to call i2c_register() because it is done
inside stm32_bringup.c

Signed-off-by: Alan C. Assis <acassis@gmail.com>
2024-04-17 19:28:56 +08:00
Jukka Laitinen
58f0ee6364 arch/arm64/src/imx9: Add a more capable uart driver
Add an uart driver supporting LPUART1-8, dma, flow control, tc etc.

Signed-off-by: Jukka Laitinen <jukkax@ssrc.tii.ae>
2024-04-17 00:10:10 +08:00
Almir Okato
f4bbe276e1 esp32[c3|c6|h2]: Fix simple boot map_rom_segments
Currently Simple Boot image have fixed 2 ROM segments and
2 RAM segments, then the parsing iterator must stop when all
ROM segments are found.

Signed-off-by: Almir Okato <almir.okato@espressif.com>
2024-04-17 00:09:58 +08:00
Ville Juven
4a82838be7 imx9_iomux.h: Fix issues with the header file
- Add missing include guard
- Add missing C++ guard
- Fix the initialization ordering in IOMUX_PADCFG macro. Why ? Becaused of:

imx9_iomuxc.h:54:3: error: designator order for field 'iomux_padcfg_s::dsyreg' does not match declaration order in 'iomux_padcfg_s'
   54 |   }
      |
2024-04-16 10:56:33 -03:00
Jukka Laitinen
9beb73d0f0 boards/arm64/imx9/imx93-evk/src/imx9_pwm.c: Fix initialization of TPM PWM registration
Fix typo causing TPM PWM not initializing on EVK board

Signed-off-by: Jukka Laitinen <jukkax@ssrc.tii.ae>
2024-04-16 10:47:35 -03:00
Ville Juven
f8c5b91522 arm64/imx9: Add LPI2C driver 2024-04-16 19:14:43 +08:00
Ville Juven
8e32a3ce24 imx93_gpioirq: Fix the GPIO interrupt source names
The original assumption was that the interrupt numbers are divided
so that 16 pins from 1 port are handled by a single interrupt source.

So source 0 would handle pins 0-15 and source 1 would handle pins 16-31.
This assumption is wrong, each pin has two sources, thus there are two
interrupt lines for each pin.

The driver uses source 0, and leaves source 1 disabled.
2024-04-16 19:11:31 +08:00