Commit Graph

51920 Commits

Author SHA1 Message Date
raiden00pl ac5c47fcb6 nrf52832-dk: add timer example 2023-12-03 05:47:07 -08:00
shizhenghui 49398d32aa move userspace interface from video.h to sys/videoio.h
Signed-off-by: shizhenghui <shizhenghui@xiaomi.com>
2023-12-02 19:44:39 -08:00
wangzhaofeng 1967b8432a copy part of linux videodev2.h which is used in v4l2m2m
Signed-off-by: wangzhaofeng <wangzhaofeng@xiaomi.com>
2023-12-02 19:44:39 -08:00
chenrun1 a6dc4412ba misc/rwlock:Implementing read/write locks.
A new locking mechanism: read/write locks
When there is a writer it is not possible to put on a read lock or a write lock; when there is a reader it is possible to reenter the read lock but not the write lock.
Writers are exclusive locks, readers are shared locks.
At the same time through the waiter count to determine whether there is currently a blocked task, if there is then in the unlock time to wake up all the waiter, through the priority of the competition to complete the blocked lock execution.
For example:
When we have a reader blocking two waiter writers, when the reader is unlocked it wakes up both writers. The writer with higher priority wakes up and checks for a successful condition and locks the lock, the second writer wakes up and fails to check for a condition and continues to block the lock.

Signed-off-by: chenrun1 <chenrun1@xiaomi.com>
2023-12-02 19:43:19 -08:00
raiden00pl 95ac627d59 arch/nrf{52|53|91}: add missing support for 1 Mbps UART baud 2023-12-02 19:40:09 -08:00
Zhang Yang 4f9d014994 Fix -nan issue with f32 2023-12-01 18:49:46 -08:00
Eren Terzioglu 9c793067cc xtensa/esp32s3: Fix esp32s3 mcuboot ota crash 2023-12-01 18:48:10 -08:00
Eren Terzioglu 5b19d8b2cb xtensa/esp32s2: Add RTC support 2023-11-30 21:02:12 -03:00
Eren Terzioglu 31abcb0e9a xtensa/esp32s3: Add rtc defconfig 2023-11-30 08:58:17 -08:00
chao an 7b1f22ca18 xmc4/spi: fix typo
Signed-off-by: chao an <anchao@xiaomi.com>
2023-11-30 06:16:09 -08:00
chao an 09c17fcfa8 segger/rtt: correct macro name to avoid unable to change default mode
SEGGER_RTT_MODE_BLOCK_IF_FIFO_FULL should be CONFIG_SEGGER_RTT_MODE_BLOCK_IF_FIFO_FULL

Signed-off-by: chao an <anchao@xiaomi.com>
2023-11-30 06:16:09 -08:00
chao an 3d57055057 libc/arm: add support of PACBTI
Reference:
https://developer.arm.com/documentation/100748/0617/Security-features-supported-in-Arm-Compiler-for-Embedded/PACBTI-M-extension-mitigations-against-ROP-and-JOP-style-attacks
https://developer.arm.com/documentation/101754/0619/armclang-Reference/armclang-Command-line-Options/-mbranch-protection

Signed-off-by: chao an <anchao@xiaomi.com>
2023-11-30 01:12:24 -08:00
Rodrigo Sim 14000d077d seeed-xiao-rp2040: Add initial board support 2023-11-29 19:32:22 -08:00
chao an 22654f62c0 libc/arm: add acle-compat license
add acle-compat implementation, and the implementation are ported from newlib

Signed-off-by: chao an <anchao@xiaomi.com>
2023-11-29 19:04:30 -08:00
chao an 29bda7cf27 libc/machine/arm: align related implementations of armv7 architecture
1. sync arch elf changes
2. fix cmake compilation break
3. remove the definition of related math files

Signed-off-by: chao an <anchao@xiaomi.com>
2023-11-29 19:04:30 -08:00
raiden00pl 74874e0874 boards/sim/nxscope: use default /dev/ttySIM0 path 2023-11-29 18:35:44 -08:00
raiden00pl 47b27321d5 boards/sim/nxscope: remove CONFIG_ALLSYMS=y
this option adds some python dependencies for mkallsyms.py and we don't need it for this example
2023-11-29 18:35:44 -08:00
Zhe Weng bd19065933 net/loopback: Fix flags of lo device
netdev_register will set IFF_LOOPBACK in d_flags, we should not just
change it into IFF_UP only.

Signed-off-by: Zhe Weng <wengzhe@xiaomi.com>
2023-11-29 07:57:01 -08:00
chenwen@espressif.com 53beaf1a67 xtensa/esp32s3: Add SPIRAM high memory support
1. Configurable mapping of virtual address to psram physical address
  2. Access SPIRAM memory at high physical address through bank switching

Signed-off-by: chenwen@espressif.com <chenwen@espressif.com>
2023-11-29 06:33:51 -08:00
chao an 88dd492e4d arm/clang: clang must depends on the implementation of the math library
Since picolibc used by clang-17 does not provide an implementation of libm,
if you want to use clang, please must specify a libm as an option.

Signed-off-by: chao an <anchao@xiaomi.com>
2023-11-29 03:58:05 -08:00
chao an 0bf9e5eb8d armv6-m/dumpnvic: fix build warning
armv6-m/arm_dumpnvic.c: In function 'arm_dumpnvic':
armv6-m/arm_dumpnvic.c:67:13: warning: format '%x' expects argument of type 'unsigned int', but argument 4 has type 'uint32_t' {aka 'long unsigned int'} [-Wformat=]
   67 |       _info("   IPR%d: %08x  IPR%d: %08x  IPR%d: %08x  IPR%d: %08x\n",
      |             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
armv6-m/arm_dumpnvic.c:67:27: note: format string is defined here
   67 |       _info("   IPR%d: %08x  IPR%d: %08x  IPR%d: %08x  IPR%d: %08x\n",
      |                        ~~~^
      |                           |
      |                           unsigned int
      |                        %08lx

Signed-off-by: chao an <anchao@xiaomi.com>
2023-11-29 03:58:05 -08:00
chao an 4540dd4718 stm32/clang: enable LIBM avoid build break on clang-17
Signed-off-by: chao an <anchao@xiaomi.com>
2023-11-29 03:58:05 -08:00
chao an 27bfdf68ae stm32/ethernet: fix build warning
chip/stm32_ethernet.c:2014:7: warning: variable 'i' set but not used [-Wunused-but-set-variable]
 2014 |   int i;
      |       ^
1 warning generated.

Signed-off-by: chao an <anchao@xiaomi.com>
2023-11-29 03:58:05 -08:00
chao an 1ce1a19afd arm/clang: replace deprecated parameter
In LLVM Clang 17.0.1, the `--config` parameter has been deprecated and replaced by the `-target` parameter

Signed-off-by: chao an <anchao@xiaomi.com>
2023-11-29 03:58:05 -08:00
chenwen@espressif.com e2a82f008a xtensa/esp32s3: Invalidate cache if the flash address used has a cache mapping.
Signed-off-by: chenwen@espressif.com <chenwen@espressif.com>
2023-11-29 03:57:50 -08:00
Michal Lenc e852f28710 ci: add open_memestream CI test
CI test for open_memestream() stdio function was added.

Signed-off-by: Michal Lenc <michallenc@seznam.cz>
2023-11-29 02:13:19 -08:00
Michal Lenc eea7db24f3 libc: add support for open_memstream
Adds support for POSIX interface open_memstream() that allows writing
to dynamic memory buffer stream. The stream is dynamically reallocated
as the buffer grows with initial size set to zero.

The caller has to free the buffer after the stream is closed.

The implementation uses fopencookie() for custom stream operations and
callbacks.

Signed-off-by: Michal Lenc <michallenc@seznam.cz>
2023-11-29 02:13:19 -08:00
yaojingwei a57e3f365a video.c: modify set_buf call seqence in start_capture function.
To avoid losing the first frame, the set_buf needs to excute first. At the same time, imgdata->start_capture should excuted before the imgsensor->start_capture.

Signed-off-by: yaojingwei <yaojingwei@xiaomi.com>
2023-11-29 02:01:34 -08:00
chenwen@espressif.com 54b71de23a xtensa/esp32s3: Fix some ESP32S3 module reboot and QVL issues
1. Increase the data length in timing tuning.
2. Add MSPI Error-Correcting Code function when accessing SPIRAM.
3. Add delay before timing tuning.
2023-11-29 01:51:58 -08:00
Ville Juven 8494fd2097 mpfs/mpfs_corespi.c: Round up divider to prevent overlock of SPI
The divider should be rounded to the next full integer to ensure that
the resulting SPI frequency is <= target frequency, i.e. the SPI is
not overclocked.
2023-11-29 01:47:55 -08:00
raiden00pl 9858dfde32 Documentation: disable parallel build 2023-11-29 01:37:10 -08:00
raiden00pl de199faed6 Documentation: turn warnings into errors 2023-11-29 01:37:10 -08:00
Takumi Ando e11627d0fb boards: Use MS56XX instead of MS5611
Signed-off-by: Takumi Ando <t-ando@advaly.co.jp>
2023-11-28 16:48:50 -03:00
Takumi Ando 3353bd3ced sensors: mx5611: Add support for MS5607
MS5607 has few differences between MS5611.

Signed-off-by: Takumi Ando <t-ando@advaly.co.jp>
2023-11-28 16:48:50 -03:00
raiden00pl 6dfe1bf58c Documentation: port warnings_filter Sphinx extension from Zephyr
ignore known warnings:

/home/raiden00/git/RTOS/nuttx/nuttx/Documentation/reference/os/netdev.rst:61: WARNING: Duplicate C declaration, also defined at reference/os/netdev:39.
Declaration is '.. c:struct:: net_driver_s'.
/home/raiden00/git/RTOS/nuttx/nuttx/Documentation/reference/user/07_signals.rst:180: WARNING: Duplicate C declaration, also defined at reference/user/structures:112.
Declaration is '.. c:struct:: sigaction'.
2023-11-28 09:18:29 -08:00
Ville Juven e39ef8563e semaphore/_SEM_XX: Remove the _SEM redirection macros as unnecessary 2023-11-27 04:52:54 -08:00
Ville Juven 5f36a43609 sched/semaphore: Move named semaphores to user space 2023-11-27 04:52:54 -08:00
Ville Juven c9bdadd541 sched/semaphore: Move cancel point and errno handling to libc / user-space
This moves all the public POSIX semaphore functions into libc and with
this most of the user-space logic is also moved; namely cancel point and
errno handling.

This also removes the need for the _SEM_XX macros used to differentiate
which API is used per user-/kernel mode. Such macros are henceforth
unnecessary.
2023-11-27 04:52:54 -08:00
Michal Lenc 34afef5cfb Documentation: add open_memstream test entry
Test tool for open_memstream() function added to documentation.

Signed-off-by: Michal Lenc <michallenc@seznam.cz>
2023-11-27 03:24:53 -08:00
Xiang Xiao a28ad5299a tools/ci: Upgrade macOS arm64 toolchain to 12.3.rel1
and enable arm64 ci build on macOS

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2023-11-26 14:10:00 +02:00
Xiang Xiao d30daa54b0 tools/ci: Upgrade clang arm toolchain to 17.0.1
from https://github.com/ARM-software/LLVM-embedded-toolchain-for-Arm/releases/tag/release-17.0.1

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2023-11-26 12:49:55 +01:00
Rodrigo Sim 89ddb2f709 stm32f401rc-rs485: Add sdcard support 2023-11-25 23:16:44 -08:00
Rodrigo Sim 01c5ec1622 Documentation: Fix errors on linum-stm32h753bi 2023-11-25 17:59:42 -08:00
Nathan Hartman 3ed629274e mm: Fix some typos 2023-11-24 09:57:10 -08:00
Ville Juven 20eb1831b1 rv-virt/knsh: Set correct RAM_START and RAM_SIZE
Also, set RAM_VSTART, because we have vaddr=paddr mapping. Otherwise
RAM_VSTART gets its default value which is 0.
2023-11-24 04:39:25 -08:00
ligd 00121f9812 sched: delete check when pick nexttcb in readytorun list
CPU0                     CPU1
1. feed0 thread             feed1 thread
   (prio 1 affinity)        (prio 1 affinity)
2. nsh_main
   sched_lock()
3. waitpid()                hello_main
4. ------                   hello exit()
5. ------                   exit()->exit_wakeup()->wakeup nsh ->
                            add_readytorun()->
                            nsh at schedlock state set g_cpu_schedlock
6. -----                    exit()->nxtask_exit()->remove_readytorun()
                            -> check g_cpu_schedlock -> pick idle1
7. waitpid() return         idle thread
8. sched_unlock             idle thread

The error is in step 6:
pick a idle thread to execute not feed1 thread.

resolve:
remove the schedlocked-check in remove_readytorun()

Signed-off-by: ligd <liguiding1@xiaomi.com>
2023-11-24 12:43:54 +09:00
Eren Terzioglu 438cb4a16a xtensa/esp32s3: Add rtc heap support 2023-11-23 16:49:48 -08:00
Ville Juven 8a2b83c482 mm/kmap: Finalize kmap implementation for RISC-V
After this, RISC-V fully supports the kmap interface.

Due to the current design limitations of having only a single L2 table
per process, the kernel kmap area cannot be mapped via any user page
directory, as they do not contain the page tables to address that range.

So a "kernel address environment" is added, which can do the mapping. The
mapping is reflected to every process as only the root page directory (L1)
is copied to users, which means every change to L2 / L3 tables will be
seen by every user.
2023-11-23 16:38:41 -08:00
Nathan Hartman 26e4dd5638 Documentation: Fix various typos 2023-11-23 16:38:19 -08:00
Nathan Hartman 9b77b2ba0b Documentation: Remove executable bit from reStructuredText file. 2023-11-23 16:37:28 -08:00