For boards b-g431b-esc1/nsh, nucleo-g431kb/nsh and nucleo-g431rb/nsh,
the `.data` section of nuttx.elf overflows the 128 KB flash region by a
few hundred bytes on default GNU EABI builds:
arm-none-eabi-ld: nuttx section `.data' will not fit in region `flash'
arm-none-eabi-ld: region `flash' overflowed by 296 bytes
Enabling CONFIG_LTO_FULL=y in the corresponding defconfigs brings flash
usage back below the 128 KB limit (~93%).
Additionally, fix arch/arm/src/cmake/gcc.cmake so that when LTO is
enabled it always uses the gcc-ar / gcc-nm / gcc-ranlib wrappers, not
just when CONFIG_ARM_TOOLCHAIN_GNU_EABI is also set. CI tooling (via
tools/testbuild.sh) configures cmake first, then flips the toolchain
choice in .config with kconfig-tweak before running `cmake --build`.
With the previous "ARM_TOOLCHAIN_GNU_EABI && !LTO_NONE" guard the
regen step would switch to plain `ar` for the .a files, even though the
linker driver picked at configure time is still arm-none-eabi-g++ and
the object files contain GCC LTO IR. The result was a flood of
"undefined reference to `printf' / `free' / `puts' ..." link errors
when running tools/testbuild.sh -A -N -R on the *_CLANG variants.
Now that we are inside gcc.cmake the toolchain is unambiguously GCC,
so dropping the redundant CONFIG_ARM_TOOLCHAIN_GNU_EABI conjunct keeps
the LTO-aware ar wrappers in place across kconfig-tweak toolchain
switches.
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
The 32-bit system clock has a limited range (~497 days) and the
configuration knob is no longer worth the complexity given that
practically every modern target already enables it. Make 64-bit
time_t/clock_t/sclock_t/nuttx_time_t the only supported flavor.
Specifically:
- Drop the SYSTEM_TIME64 Kconfig option and its dependent
PERF_OVERFLOW_CORRECTION/HRTIMER guards in sched/Kconfig.
- Remove every #ifdef CONFIG_SYSTEM_TIME64 branch in headers
(include/{sys/types.h,limits.h,inttypes.h,nuttx/clock.h,
nuttx/fs/hostfs.h}) and core code paths
(sched/clock/clock.h, drivers/power/pm/pm_procfs.c,
drivers/rpmsg/rpmsg_ping.c, fs/procfs/fs_procfsuptime.c,
libs/libc/wqueue/work_usrthread.c,
arch/avr/src/avrdx/avrdx_timerisr_tickless_alarm.c).
- Strip CONFIG_SYSTEM_TIME64=y from every board defconfig.
- Update Documentation/guides/rust.rst accordingly.
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Long long support is now unconditional in printf/scanf and related
helpers. Remove the Kconfig option, the conditional compilation in
libvsprintf/libvscanf/ultoa_invert, the build-time #error in the
rn2xx3 driver, and clean up CONFIG_LIBC_LONG_LONG entries from all
board defconfigs.
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Add board support for the STMicro Nucleo-N657X0-Q, sufficient to boot
NSH over the on-board ST-LINK virtual COM port (USART1, 115200 8N1)
in DEV (serial) boot mode.
Two defconfigs are shipped:
- nsh: minimal NuttShell prompt.
- ostest: nsh + apps/testing/ostest for RTOS smoke testing.
Production signed XSPI flash boot is deferred to a follow-up; in DEV
mode the image is loaded directly into AXISRAM at 0x34000400 by the
host (e.g. STM32CubeProgrammer over ST-LINK), keeping the linker
script trivial — .text/.rodata/.data/.bss/.heap all in AXISRAM.
Signed-off-by: ImBonkers <samuelnlinden@pm.me>
BREAKING CHANGE: remove PWM_MULTICHAN option
PWM_MULTICHAN option is redundant, we can just set CONFIG_PWM_NCHANNELS > 1.
At default CONFIG_PWM_NCHANNELS is set to 1, so the default behavior is preserved.
Access to single channel API is now `info->channels[0].XXX` instead of `info->XXX`
This is the first step to simplify PWM implementation and make it more portable.
Signed-off-by: raiden00pl <raiden00@railab.me>
Converted USB Host CDC-ECM to a lower half driver.
Removed existing full network driver callbacks and replaced with lower
half.
Signed-off-by: daniellizewski <daniellizewski@geotab.com>
Added support for USB host to use an USB CDC-ECM device.
This class is used for usb-ethernet adapters as well as many modems.
Signed-off-by: daniellizewski <daniellizewski@geotab.com>
Added support for selecting a different USB configuration.
Certain USB devices offer different classes using different
configurations. This allows a board file to provide a callback
to select the proper configuration for a given USB device.
Signed-off-by: daniellizewski <daniellizewski@geotab.com>
Now that initialization is performed by BOARD_LATE_INITIALIZE,
app-specific initialization options are not needed.
Signed-off-by: Matteo Golin <matteo.golin@gmail.com>
NuttX uses Quadrature Encoder lower half driver to internal QE from
MCUs and also with Magnetic Rotary Encoder sensors. But when the
STM32 QE is not enabled, the board code will try to compile the
stm32_qencoder.c because Magnetic Rotary Encoders enables the
CONFIG_SENSORS_QENCODER. This patch fixes this issue.
Signed-off-by: Alan C. Assis <acassis@gmail.com>
Since `NSH_ARCHINIT` is now removed, this commit cleans the last few
references to this option in the defconfig files that were recently
modified and escaped removal in initialization simplification commit.
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>
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>
Enable USART3 support for STM32F412 and use it as the default NUCLEO-F412ZG nsh console path.
The ST-LINK virtual COM port on this board is wired to USART3 on PD8/PD9. Restore USART2 to its header-pin routing, switch the nsh defconfig to USART3, and update the board documentation to match the shipped solder-bridge configuration described in issue #17722.
Signed-off-by: aviralgarg05 <gargaviral99@gmail.com>
Add board support for on-chip bxCAN: stm32_can.c registers /dev/can0 via stm32_caninitialize() when CONFIG_STM32_CAN_CHARDRIVER is set; stm32_cansock.c calls stm32_cansockinitialize() for the socket-CAN path when CONFIG_STM32_CAN_SOCKET is set.
Signed-off-by: Alexey Matveev <tippet@yandex.ru>
Add dedicated Spresense defconfigs for ostest, coremark and\ngetprime so the board has focused test and benchmark entry\npoints for these workloads.\n\nThis keeps the change scoped to new board configurations and\nfollows the existing Spresense baseline settings for the new\ntargets.
Signed-off-by: aviralgarg05 <gargaviral99@gmail.com>
Fixed a few bugs in the initial stm32_usbdrdhost.c implementation
when using a USB hub. Fixed fault when freeing control endpoints.
Fixed crash when disconnecting devices from hubs due ot use after free.
Signed-off-by: daniellizewski <daniellizewski@geotab.com>
Added stm32_usbdrdhost.c which adds USB FS host mode support using the
embedded PHY. Added Kconfig to select Device or Host.
Example config nucleo-h563zi:usbmsc added to test functionality
Signed-off-by: daniellizewski <daniellizewski@geotab.com>