Commit Graph

51697 Commits

Author SHA1 Message Date
Marco Casaroli
8611003c98 feat(esp32s3-eye): buttons
This adds button support for the esp32-s3-eye board
2023-10-12 01:39:28 +08:00
Marco Casaroli
5fb2535354 feat(esp32s3-eye): gpio
This adds the gpio driver and configuration to the esp32-s3-eye
board.
2023-10-12 01:39:28 +08:00
simbit18
f22cff9b0b arch/arm/src/mx8mp/Kconfig: Fix Kconfig style
Remove extra TABs
Add comments
2023-10-12 01:38:53 +08:00
yinshengkai
9c59ee7c58 note: optimize note performance and reduce lib_sprintf calls
Signed-off-by: yinshengkai <yinshengkai@xiaomi.com>
2023-10-12 00:15:14 +08:00
yinshengkai
8ddaa3460d note: simplify the shced_note header file
This is to simplify the header file. It uses too many macros, and many of them are unnecessary.

Signed-off-by: yinshengkai <yinshengkai@xiaomi.com>
2023-10-12 00:15:14 +08:00
hujun5
99eeaafd07 lib_memfd: turn a runtime error into a linker error
Signed-off-by: hujun5 <hujun5@xiaomi.com>
2023-10-11 23:39:37 +08:00
liqinhui
3f08f32486 net: allow icmpv6 and udp to find the dev by the ifindex with s_boundto.
In order to support the dhcpv6c.

Signed-off-by: liqinhui <liqinhui@xiaomi.com>
2023-10-11 23:34:01 +08:00
Marco Casaroli
79e5d88f97 feat(esp32s3-eye): wireless
Enable wifi and ble on board_bringup as we do with the DevkitC
2023-10-11 18:30:07 +08:00
hujun5
66fa229fcc Fix some typos in comments
Signed-off-by: hujun5 <hujun5@xiaomi.com>
2023-10-11 08:14:49 +02:00
Lee Lup Yuen
6cad7e9582 arm, arm64, xtensa, libxx: Change sed -r to sed -E to support macOS
When we build NuttX on macOS, it shows many `sed` messages (and the build still completes successfully):

```text
$ tools/configure.sh pinephone:nsh
$ make
sed: illegal option -- r
```

This is due to the Makefiles executing `sed -r` which is not a valid option on macOS.

This PR proposes to change `sed -r` to `sed -E` because:

- `sed -E` on macOS is equivalent to `sed -r` on Linux

- `sed -E` and `sed -r` are aliases according to the GNU `sed` Manual

- `sed -E` is already used in nuttx_add_romfs.cmake, nuttx_add_symtab.cmake and process_config.sh
2023-10-10 11:36:32 +03:00
Philippe Leduc
f38cdb09b4 Add support for SPI through i.MX8MP ecspi module.
Configure SPI for Verdin evaluation board
2023-10-09 18:04:50 -04:00
Xiang Xiao
21beb284bc net/usersock: Return -ENOSUPP directly if domain isn't equal to PF_INET/PF_INET6
regression by https://github.com/apache/nuttx/pull/9647

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2023-10-09 18:04:29 -04:00
TaiJu Wu
e0e6e5c2c8 fix: TreeNode has same attribute with NodeMixin
NodeMixin have attrubute called size and it is set property.
Overwrite this property by _size but it will make report incompatible.

Create a new class NuttxDictExporter to renaming _size into size.
2023-10-09 17:51:01 -04:00
Ville Juven
7c893ddfc2 kmm_map: Add function to map a single page of kernel memory
Mapping a physical page to a kernel virtual page is very simple and does
not need the kernel vma list, just get the kernel addressable virtual
address for the page.
2023-10-09 18:59:43 +03:00
Ville Juven
04bfaf3a55 kmm_map.c: Remember to free the temporary 'pages' variable
The temp variable was freed only in error cases, but it needs to be freed
in the happy case as well.
2023-10-09 18:59:43 +03:00
Ville Juven
5dd0474269 kmm_map.c: Add way to test if addr is within kmap area or not
is_kmap_vaddr is added and used to test that a given (v)addr is actually
inside the kernel map area. This gives a speed optimization for kmm_unmap,
as it is no longer necessary to take the mm_map_lock to check if such a
mapping exists; obviously if the address is not within the kmap area, it
won't be in the list either.
2023-10-09 18:59:43 +03:00
Ville Juven
d199264dca kmm_map: Fix incorrect function name field 2023-10-09 18:59:43 +03:00
Ville Juven
a444435f8b kmm_map.c: Fix user page mapping
User pages are mapped from the currently active address environment. If
the process is running on a borrowed address environment, then the
mapping should be created from there.

This happens during (new) process creation only.
2023-10-09 18:59:43 +03:00
Ville Juven
b2f9926a1b kmm_map.c: Fix call to gran_alloc
Provide the handle to gran_alloc, not pointer to handle.
2023-10-09 18:59:43 +03:00
Ville Juven
3e8575c39e riscv-v/pgalloc.h: Return kernel vaddr for kernel RAM paddr
All kernel memory is mapped paddr=vaddr, so it is trivial to give mapping
for kernel memory. Only interesting region should be kernel RAM, so omit
kernel ROM and don't allow re-mapping it.
2023-10-09 18:59:25 +03:00
Marco Casaroli
cba44cc9dc fix(esp32s3_i2c): i2c_clear_bus on for I2C_RESET
This function is only used now for I2C_RESET, so we wrap it with the
config macro.
2023-10-09 18:55:04 +03:00
Marco Casaroli
f25a382c1a feat(esp32s3_i2c): do not destuck every transaction
It looks like we do not need to send the 9 clock ticks whenever we reset
the FSM. We are already doing this in i2c_reset function if necessary.

This makes the i2c transfers much faster, for example the i2c(-tool) dev
scan feature.
2023-10-09 18:55:04 +03:00
Marco Casaroli
141dc1e3e7 fix(esp32s3_i2c): set regs order
It looks like we need to set this bit before the UPGATE, like we do on
the esp32c3 port.
2023-10-09 18:55:04 +03:00
Ville Juven
d72de58aa8 sched/assert.c: Print process name in assert dump
In addition to printing out the thread name (task name in flat mode),
print the parent process's name as well.

It is quite useful to know which process is the parent of a faulting
thread, although this information can be read from the assert dump, in
some cases the dump might be incomplete (due to e.g. stack corruption,
which causes another exception and PANIC().)
2023-10-09 21:30:33 +08:00
Xiang Xiao
28dee592a3 video/fb: Add fb_register_device
so the user could register fb device directly instead
go through the sequence of up_fbinitialize/up_fbgetvplane

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2023-10-09 13:18:36 +03:00
raiden00pl
4f8a2b3874 libds/lib_misc: use b16abs() 2023-10-07 21:25:56 +08:00
raiden00pl
819bec0888 libdsp/lib_observe: fix typo and use b16sign() 2023-10-07 21:25:56 +08:00
raiden00pl
ec5793db59 fixedmath: add abs and sign operations 2023-10-07 21:25:56 +08:00
chao an
a3d7abb1ae sys/types: supporting 32-bit IDs for gid_t/uid_t
Signed-off-by: chao an <anchao@xiaomi.com>
2023-10-07 18:21:21 +08:00
Xiang Xiao
c775ee1002 spinlock: Add spin_lock_init macro like Linux
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2023-10-06 20:03:19 -04:00
Xiang Xiao
dfa0283d83 spinlock: Rename spin_islocked to spin_is_locked
align with Linux naming style

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2023-10-06 20:03:19 -04:00
Xiang Xiao
aa0b3fcdf9 lib/memfd: shm_unlink or unlink anonymous file
https://man7.org/linux/man-pages/man2/memfd_create.2.html:
       The name supplied in name is used as a filename and will be
       displayed as the target of the corresponding symbolic link in the
       directory /proc/self/fd/.  The displayed name is always prefixed
       with memfd: and serves only for debugging purposes.  Names do not
       affect the behavior of the file descriptor, and as such multiple
       files can have the same name without any side effects.

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2023-10-06 20:02:30 -04:00
TaiJu Wu
1b843633e6 format: modify spin_lock_irqsave format
spin_lock_irqsave() should be spin_lock_irqsave(NULL)

Signed-off-by: TaiJu Wu <tjwu1217@gmail.com>
2023-10-06 20:00:04 -04:00
TaiJu Wu
ffba0d15a5 Feature: implement ticket spinlock
test config: ./tools/configure.sh -l qemu-armv8a:nsh_smp

Pass ostest

No matter big-endian or little-endian, ticket spinlock only check the
next and the owner is equal or not.

If they are equal, it means there is a task hold the lock or lock is
free.

Signed-off-by: TaiJu Wu <tjwu1217@gmail.com>

Co-authored-by: Xiang Xiao <xiaoxiang781216@gmail.com>
2023-10-07 01:38:37 +08:00
Alin Jerpelea
643b9c1abf Documentation: add NuttX-12.3.0 release notes
Add release notes for 12.3.0 release

Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2023-10-06 23:12:03 +08:00
laoniaokkk
aec0271e48 max31865:RTD-to-Digital Converter 2023-10-06 21:15:21 +08:00
fengsi
7248b728bf UART needs to be disabled before changing setup 2023-10-06 20:49:26 +08:00
Tiago Medicci Serrano
57bf9d44d2 Documentation: Fix search path for defconfig include list
Add `*` to make it being understood as a list.
2023-10-05 19:18:05 -04:00
Tiago Medicci Serrano
997b3422a3 Documentation: Update the recommended toolchain for ESP32-C3/C6/H2
Currently, this toolchain is being used for NuttX CI testing and
provide features that weren't available in the old toolchain based
on GCC 10.2.
2023-10-05 19:18:05 -04:00
Ville Juven
7901ed0fe3 riscv_addrenv_utils.c: Determine page table flags by type of vaddr
Use kernel page table flags if the mapped virtual address is in kernel
space.
2023-10-05 20:38:35 +08:00
SPRESENSE
bf6606f80c libxx: Use gnu++20 option only if using libcxx
Fix an issue that gnu++20 option is always used.
Essentially, when cxx is not used, gnu++17 should be retained.
2023-10-05 13:09:20 +08:00
Tiago Medicci Serrano
6521bdfa1f esp32s3/ble: fix saving/restoring the interrupt status flags
Whenever we enter/leave a critical section, the interrupt status is
saved and, then, restored. However, for the ESP32-S3's BLE adapter,
entering/leaving a critical section is done on separate functions
that need to be registered as a callback.

The status flag was being saved as a global variable. However,
calling nested enter_critical_section would overwrite this global
variable that was storing the previous flag and, when leaving the
last critical section, the restored status would be different from
the one expected. The proposed solution for this issue is to create
a global array to store the interrupt status flags for nested calls.
2023-10-05 11:25:43 +08:00
Tiago Medicci Serrano
a71a3258b7 esp32s3/ble: enable the BLE interrupt during a SPI flash operation
This commit sets the BLE's interrupt as a IRAM-enabled interrupt,
which enables it to run during a SPI flash operation. This enables
us to create a cache to off-load semaphores and message queues
operations and treat them when the SPI flash operation is finished.
By doing that, we avoid packet losses during a SPI flash operation.
2023-10-05 11:25:43 +08:00
Tiago Medicci Serrano
0ddb64555a esp32s3/irq: Allow IRAM ISRs to run during SPI flash operation
This commit provides an interface to register ISRs that run from
IRAM and keeps track of the non-IRAM interrupts. It enables, for
instance, to avoid disabling all the interrupts during a SPI flash
operation: IRAM-enabled ISRs are, then, able to run during these
operations.
2023-10-05 11:25:43 +08:00
Tiago Medicci Serrano
86b118854e esp32s3/irq: Fix erroneous interrupt allocation for each CPU core
When allocating a CPU interrupt, make sure to select the correct
CPU core to query for it. Simply checking for the current CPU does
not satisfy this requirement because the CPU allocation thread may
be executed by the other core: it's necessary to stick with the
intended CPU passed as an argument of the `esp32s3_setup_irq`.
2023-10-05 11:25:43 +08:00
Tiago Medicci Serrano
2e93882bcf esp32/ble: Fix task_create_wrapper CPU core ID passed as argument
The registered `task_create_wrapper` receives the `core_id`, but
the current implementation ignores this parameter while calling
`esp_task_create_pinned_to_core`. This commit fix this.
2023-10-05 00:37:55 +03:00
Eren Terzioglu
071fb18501 xtensa/esp32s2: add UART RS485 support 2023-10-04 10:18:45 +03:00
ThomasNS
2ffb72917d The character U+ff0c "," could be confused with the ASCII character U+002c ",", which is more common in source code. 2023-10-03 16:53:12 -04:00
Tiago Medicci Serrano
b8b0ae9238 esp32/irq: Fix erroneous interrupt allocation for each CPU core
When allocating a CPU interrupt, make sure to select the correct
CPU core to query for it. Simply checking for the current CPU does
not satisfy this requirement because the CPU allocation thread may
be executed by the other core: it's necessary to stick with the
intended CPU passed as an argument of the `esp32_setup_irq`.
2023-10-03 16:51:49 -04:00
raiden00pl
d889b7362d arch: auto-select ARCH_PERF_EVENTS if some debug features enabled 2023-10-03 12:53:10 +08:00