From Polarfire SoC TRM:
6.5.8 Interrupt Completion
To signal the completion of executing an interrupt handler, the processor core writes the received interrupt ID to the
Claim/Complete register. The PLIC does not check whether the completion ID is the same as the last claim ID for that
target. If the completion ID does not match an interrupt source that is currently enabled for the target, the completion
is ignored.
The last paragraph clearly states that IRQ completion does not work for
sources that have been disabled -> must ACK the completion before disable.
Signed-off-by: Ville Juven <ville.juven@unikie.com>
This is required to meet the communication requirements as per the
LSM6DSO32 datasheet. It doesn't cause issues on some MCUs (RP2040), but
prevents successful reads on others (STM32).
Signed-off-by: Matteo Golin <matteo.golin@gmail.com>
If SPI dependency is not set, the following warning will be generated during compilation:
[109/1450] Building C object drivers/CMakeFiles/drivers.dir/rpmsg/rpmsg_port_spi.c.o
/data/code/nuttxspace/nuttx/drivers/rpmsg/rpmsg_port_spi.c: In function ‘rpmsg_port_spi_exchange’:
/data/code/nuttxspace/nuttx/drivers/rpmsg/rpmsg_port_spi.c:233:3: warning: implicit declaration of function ‘SPI_EXCHANGE’ [-Wimplicit-function-declaration]
233 | SPI_EXCHANGE(rpspi->spi, txhdr, rpspi->rxhdr,
| ^~~~~~~~~~~~
[1450/1450] Pac SIM with dynamic libs in nuttx.tgz
Signed-off-by: lijing.ly <lijing.ly@bytedance.com>
This commit allows placing .bss data into the external PSRAM.
Previously, the PSRAM was fully allocated to the heap memory only
and now part of it can be used to allocate .bss data freeing the
internal memory.
Based on configuration of usb_device.
Quick start:
./tools/configure.sh -l esp32s3-devkit:fastboot
make flash -j ESPTOOL_PORT=/dev/ttyACMx
(Optional) You can get full defconfig by executing following commands after SAVING your stages if necessary:
./tools/configure.sh -l esp32s3-devkit:fastboot
make savedefconfig
cat defconfig
Signed-off-by: wangjianyu3 <wangjianyu3@xiaomi.com>
on ESP32, cpuint was allocated when register wdt handler, but not
deallocated when unregister, which cause debug assert when checking
`DEBUGASSERT((*freeints & bitmask) == 0)`, so set cpuint to initial value
after deallocate.
The same issue on ESP32s3 has been fixed by PR#15433
The NuttX GDB python plugin has been moved to tools/pynuttx/nxgdb.
Update all documentation including this path.
Signed-off-by: Neo Xu <neo.xu1990@gmail.com>
1. Add method to check if an object has specified field.
2. Fix Array iterator that walrus expression should store result of the
function, instead of the compare result.
Note that walrus operation has lowest priority except ','.
Signed-off-by: xuxingliang <xuxingliang@xiaomi.com>
Update the wireless symbols from ESP32S3_* to ESPRESSIF_* for using common layer.
Remove ESP32S3 specific WiFi files and edit build system to use common layer.
boards/nucleo-f302r8/cansock: enable SocketCAN utils, so user can easly use CAN tools.
This board has only 64KB of FLASH which requires some additional optimization to fit CAN tools on it.
Signed-off-by: raiden00pl <raiden00@railab.me>
This adds initial bootable PROTECTED mode config `qemu-armv7r:pnsh`,
more tests are still needed. Flat mode config qemu-armv7r:nsh still
works.
- The nuttx.ld is for building nuttx ELF
- The nuttx_user.ld is for building nuttx_user ELF
They both include the memory.ld with preprocessing.
To run, use the QEMU mentioned in PR:
```sh
$ qemu-system-arm -M virt -semihosting -nographic -cpu cortex-r5f \
-device loader,file=nuttx_user -device loader,file=nuttx
```
Signed-off-by: Yanfeng Liu <p-liuyanfeng9@xiaomi.com>
This aligns linker script file name with built program name so that
nuttx.ld helps to build nuttx ELF
Signed-off-by: Yanfeng Liu <p-liuyanfeng9@xiaomi.com>
Spliting `THERMAL_NORMAL` to `THERMAL_ACTIVE` and `THERMAL_PASSIVE`,
to support different update intervals for thermal zone.
Active/Passive from [kernel.org](https://www.kernel.org/doc/Documentation/devicetree/bindings/thermal/thermal.txt):
* Cooling device nodes
Cooling devices are nodes providing control on power dissipation. There
are essentially two ways to provide control on power dissipation. First
is by means of regulating device performance, which is known as passive
cooling. A typical passive cooling is a CPU that has dynamic voltage and
frequency scaling (DVFS), and uses lower frequencies as cooling states.
Second is by means of activating devices in order to remove
the dissipated heat, which is known as active cooling, e.g. regulating
fan speeds. In both cases, cooling devices shall have a way to determine
the state of cooling in which the device is.
Signed-off-by: wangjianyu3 <wangjianyu3@xiaomi.com>
Instead of enabling an interrupt on the calling hart, enable it on every
hart. This should balance the interrupt load some, especially in cases
where the interrupt source is enabled only once (which will almost
certainly happen on CPU 0 only).
Signed-off-by: Ville Juven <ville.juven@unikie.com>
When the l1entry first add to shm, mssing l1entry add.
shm mmu flags should use udata flags.
l1entry record in shm[] and should not use ~SECTION_MASK
Signed-off-by: buxiasen <buxiasen@xiaomi.com>
chip/sam_1wire.c:921:7: warning: implicit declaration of function 'sam_usart0_enableclk' [-Wimplicit-function-declaration]
921 | sam_usart0_enableclk();
The same warning applied for other uart/usart peripherals configured
as 1 wire.
Signed-off-by: Michal Lenc <michallenc@seznam.cz>
Unfortunately new contributors used to submit code with many coding
issues. And in fact it is our guilt: our codign style documentation
doesn't say to them how to use the checkpatch to find the issues.
Signed-off-by: Alan C. Assis <acassis@gmail.com>
This commit adds support to TIOCGICOUNT for STM32, this way a
userspace application can collect information about UART errors.
Signed-off-by: Alan C. Assis <acassis@gmail.com>
This commit add support to the serial_icounter_s struct used with
TIOCGICOUNT to report U[S]ART errors such as frame, parity, overrun,
etc.
Signed-off-by: Alan C. Assis <acassis@gmail.com>
Summary:
- Added a section on editor integration for Rust development in NuttX, focusing on VS Code and rust-analyzer
- Provides steps to configure `.vscode/settings.json` to recognize Rust project structure and optional settings for custom target specifications
Impact:
- Enhances developer productivity by providing better IDE support for Rust in NuttX
- No impact on existing functionality; the guide is purely informational and configuration-based
Signed-off-by: Huang Qi <huangqi3@xiaomi.com>
The valid addresses should be 0x6a and 0x6b, not 0x6c. Now the device
can be registered with the correct addresses without failing the
assertion.
Signed-off-by: Matteo Golin <matteo.golin@gmail.com>
boards/nucleo-g431rb: fix CAN bit timings, calculated with https://phryniszak.github.io/stm32g-fdcan/
also update bit rate to 250000 so it's the same as for other stm32 boards
Signed-off-by: raiden00pl <raiden00@railab.me>