Logic provided by board_app_initialize is removed due to the removal of
BOARDIOC_INIT boardctl command. Logic inside board_late_initialize is to
be used and is identical.
Signed-off-by: Matteo Golin <matteo.golin@gmail.com>
BREAKING: In an effort to simplify NuttX initialization, NSH_ARCHINIT is
removed. board_app_initialize is also removed. BOARD_LATE_INITIALIZE now
performs all board initialization logic, and is by default enabled. All
references to these symbols are removed. BOARDIOC_INIT remains, but will
result in -ENOTTY when called. It is to be removed in a later commit.
Quick fix: Boards relying on NSH_ARCHINIT should now enable
CONFIG_BOARD_LATE_INITIALIZE instead. If the application needs
fine-grained control over board initialization from userspace, the logic
performed by BOARDIOC_INIT may be copied to the board_finalinitialize
function and used instead via BOARDIOC_FINALINIT. All
board_app_initialize logic provided by NuttX is now moved to
board_late_initialize, and the same should be done for out-of-tree
boards.
Signed-off-by: Matteo Golin <matteo.golin@gmail.com>
The register index layout for D16-D31 and FPU_CONTEXT_REGS was guarded
by CONFIG_ARM_HAVE_DPFPU32 (hardware capability) in three header files,
but all save/restore code in the corresponding .S files gates on
CONFIG_ARM_DPFPU32 (software enable).
These two macros are distinct:
CONFIG_ARM_HAVE_DPFPU32 - set by chip via 'select'; means hardware
has D16-D31 registers
CONFIG_ARM_DPFPU32 - user-selectable; means software has chosen
to use D16-D31 (requires hardware support)
When ARM_HAVE_DPFPU32=y and ARM_DPFPU32=n, the header defined
REG_FPSCR at offset 64 and FPU_CONTEXT_REGS=65, while the assembly
only saved S0-S31+FPSCR (33 words), placing FPSCR at offset 32.
This mismatch causes incorrect register access and wrong xcptcontext
sizing.
Signed-off-by: yaojiaqi <yaojiaqi@lixiang.com>
Add dedicated ostest and coremark defconfigs for nucleo-f412zg.
The ostest config keeps the existing NSH-oriented board setup and
adds the runtime self-test application, while the coremark config
boots directly into the benchmark with an -O3 build profile.
Both configurations were verified with GNU Make and CMake/Ninja
using Arm GNU Toolchain 15.2.Rel1 on macOS arm64.
Signed-off-by: aviralgarg05 <gargaviral99@gmail.com>
In esp_espnow_pktradio.c, after ESP-NOW is successfully initialized in espnow_ifup, call netdev_carrier_on(dev).
In espnow_ifdown, call netdev_carrier_off(dev).
Signed-off-by: Filipe Cavalcanti <filipe.cavalcanti@espressif.com>
Create a bidirectional dshot lower-half driver, using the flexio block.
This driver enables use of DShot protocol for Electronic Speed Controllers
(ESCs) typically used in drone motor control.
Eight channels of DShot per flexio block are supported in:
- Normal mode in all DShot speeds, with telemetry request (uart response
needs to be handled outside of this driver)
- Bidirectional mode in all DShot speeds, with telemetry request & response
- Configurable to use either independent TX timers for each channel, or to
use a common TX timer for all channels to synchronize the output
- For bidirectional RX, each channel always uses an own timer.
In normal mode, the driver operates without any interrupts.
In bidirectional mode, the driver reconfigures the FlexIO timers (as needed)
and shifters from TX to RX in the interrupt handler, and reads out the
raw response packet.
Signed-off-by: Jukka Laitinen <jukka.laitinen@tii.ae>
DShot is a packet based serial protocol, used for controlling motor controllers
(ESCs), typically for drones.
This adds an upper-half driver for dshot protocol, along with common
configuration options and definitions definitions.
Signed-off-by: Jukka Laitinen <jukka.laitinen@tii.ae>
This modify just modify the function to let the user that the function
failed to initialize the VGA mode.
Signed-off-by: Alan C. Assis <acassis@gmail.com>
DLASTSGA needs to be offest for TCM backdoor address.
Cleanup as well using inline helper for calculuation.
Signed-off-by: Peter van der Perk <peter.vanderperk@nxp.com>
Update the NAT documentation to make the validation flow easier to
follow.
The existing document already contains useful details, but the test setup
is hard to read for beginners.
- In particular, the NuttX-side commands and Linux host commands can
be confused
- Some commands are redundant
- Some required steps are missing
- The Internet access example is not necessary for NAT behavior itself
Simplify the validation case to use a local topology with Linux network
namespaces. Add an ICMP test case and the required explanations around the
NuttX iptables command and interface roles.
Remove the IPv6 validation case from this doc, since the NAT66 flow
follows the same structure as the NAT44 case.
Signed-off-by: Shunchao Hu <ankohuu@gmail.com>
Setting the current time in RTC may be a blocking operation (driver
needs to wait for oscillator stabilization after reset and so on).
This may cause the unwanted effect of clock_settime blocking the
code execution for a considerable amount of time.
The solution is to plan a low priority work that takes care
of setting the time in RTC and let clock_settime continue. We don't
have to check if the work is available, just cancel it if there
is a new time set request.
This is used only if CONFIG_SCHED_LPWORK is enabled.
Signed-off-by: Michal Lenc <michallenc@seznam.cz>
Always allocate per-file can_reader on open so write-only descriptors get msgalign / ioctl state; free that context on close when it was never linked into cd_readers (fixes leak).
Cap each drain loop (20×500 ms) so close() cannot block forever when bxCAN retries without ACK or dev_txempty never clears.
Fix stm32can_vputreg debug log to print the written value (correct parameter name).
Signed-off-by: Alexey Matveev <tippet@yandex.ru>
When CONFIG_FS_BACKTRACE is enabled, collecting a stack trace for every
new file descriptor adds overhead to fast path operations like open(),
dup(), and socket().
This patch adds a new configuration option CONFIG_FS_BACKTRACE_DEFAULT.
When enabled (default behavior), the GROUP_FLAG_FD_BACKTRACE flag is
automatically set during group allocation, causing backtrace to be
captured for all tasks globally, preserving the original diagnostic
capability.
When disabled, backtrace capture is zero-cost by default and must be
explicitly enabled per task group using GROUP_FLAG_FD_BACKTRACE.
Signed-off-by: zhanxiaoqi <zhanxiaoqi@bytedance.com>
Allow to close the lock even the dying task is in
signal handler context. Also the file type check can
be ignored as they are already validated in create phase.
Signed-off-by: Jari Nippula <jari.nippula@tii.ae>
Make nat_port_select() return an error code and report the selected
external port through an output parameter.
This separates selection failure from the valid ICMP echo identifier
value zero, so outbound NAT entry creation no longer rejects ICMP echo
requests that use id zero.
Signed-off-by: Shunchao Hu <ankohuu@gmail.com>