Commit graph

59187 commits

Author SHA1 Message Date
wangchengdong
34ca49b6f5 tasking/cmake: Provide better .hex and .srec gen for tasking compiler
Provide better hex and srec generation for tasking compiler, without relying
on freeware tricore-elf-objcopy.

Signed-off-by: Chengdong Wang <wangchengdong@lixiang.com>
2025-09-17 14:01:16 +08:00
wangchengdong
7f407476f9 nuttx/cmake: improve board specific Toolchain.cmake
remove limitation that only custom board can have
     board specific Toolchain.cmake

Signed-off-by: Chengdong Wang <wangchengdong@lixiang.com>
2025-09-17 08:55:12 +08:00
simbit18
4a391c4e7f Kconfig: Fix Kconfig style
Remove spaces from Kconfig
Add TABs

Signed-off-by: simbit18 <simbit18@gmail.com>
2025-09-17 08:54:58 +08:00
simbit18
6e247670f6 drivers/input: Fix Kconfig style
Remove spaces from Kconfig
Add TABs

Signed-off-by: simbit18 <simbit18@gmail.com>
2025-09-17 08:54:58 +08:00
simbit18
e061b1063a board: Fix Kconfig style
Remove spaces from Kconfig
Add TAB

Signed-off-by: simbit18 <simbit18@gmail.com>
2025-09-17 08:54:58 +08:00
wangchengdong
5d80cf7b83 arch/tricore: remove magic number in tricore_checkstack.c
before:
  |   start = (alloc + 3) & ~3;
  |   end   = (alloc + size) & ~3;
  after:
  |   start = STACK_ALIGN_UP((uintptr_t)alloc);
  |   end   = STACK_ALIGN_DOWN((uintptr_t)alloc + size);

Signed-off-by: Chengdong Wang <wangchengdong@lixiang.com>
2025-09-16 09:18:30 -03:00
michal matias
12486d21dc boards/arm/samv7/samv71-xult: Add support for the OA-TC6 10BASE-T1x MAC-PHYs
Add support for the OA-TC6 10BASE-T1x driver to the SAMV71 Xplained ultra board.

Signed-off-by: michal matias <mich4l.matias@gmail.com>
2025-09-16 15:47:26 +08:00
wangchengdong
d4efae2494 arch/Kconfig: Add condition checking in Kconfig source statement
Add condition checking in Kconfig source statement, for example:

    source "arch/arm/Kconfig" is updated to:

    if ARCH_ARM
    source "arch/arm/Kconfig"
    endif

Signed-off-by: Chengdong Wang <wangchengdong@lixiang.com>
2025-09-16 09:34:56 +02:00
Philippe Leduc
1daa2d54e3 Documentation/guides: Update CMake C++ guide
Use the exported CMake toolchain file instead of a  custom and broken one.
Slightly modify the C++ example code to introduce modern tools like auto keyword and shared_ptr

Signed-off-by: Philippe Leduc <philippe.leduc@mailfence.com>
2025-09-15 15:30:15 -03:00
wangchengdong
3eb1c21807 nuttx/cmake: add cmake disassembly support for GHS compiler
add cmake disassembly support for GHS compiler

Signed-off-by: Chengdong Wang <wangchengdong@lixiang.com>
2025-09-16 02:01:36 +08:00
Jukka Laitinen
36168dd244 arch/risc-v/mpfs: Add ARCH_HAVE_ELF_EXECUTABLE for MPFS
This enables compiling fully linked apps for mpfs in CONFIG_BUILD_KERNEL

Signed-off-by: Jukka Laitinen <jukka.laitinen@tii.ae>
2025-09-15 11:29:01 -04:00
Jukka Laitinen
724c44b1e9 arch/arm64/imx9: Add ARCH_HAVE_ELF_EXECUTABLE for IMX9
This enables compiling fully linked apps for imx9 in CONFIG_BUILD_KERNEL

Signed-off-by: Jukka Laitinen <jukka.laitinen@tii.ae>
2025-09-15 11:29:01 -04:00
wangchengdong
71f558765c arch/tricore: add tasking compiler support to gen raw/hex binary
tasking compiler toolset does not provide binary generate tool,
  but the open source gcc compiler is able to do this, this patch will
  use tricore-elf-objcopy to generate raw binary and hex file when using
  tasking compiler to do the compiling and linking.

Signed-off-by: Chengdong Wang <wangchengdong@lixiang.com>
2025-09-15 01:44:39 +08:00
wangchengdong
474835eabe drivers/syslog: let syslog_write() return the maximum bytes writen
In current implementation, when doing syslog_write(), there may
 be more than one channel, the syslog will iterate each channel,
 but only return the bytes writen through the last channel, the
 better way should be returning the maximum bytes writen
 through one channel.

Signed-off-by: Chengdong Wang <wangchengdong@lixiang.com>
2025-09-14 11:08:35 -04:00
trns1997
918505e13d build/export: Fix missing gnu-elf.ld copy and toolchain script.
Fix missing `gnu-elf.ld` file copy during export generation
and update `toolchain.cmake` script to ensure proper toolchain
detection and configuration.
* Prevents build failures when exporting projects.
* Improves reproducibility of generated exports.

Signed-off-by: trns1997 <trns1997@gmail.com>
2025-09-14 10:44:51 +08:00
Filipe Cavalcanti
662c1e0bbb boards/xtensa: update board and defconfigs for Wi-Fi on ESP32|S2|S3
Updates the defconfigs and board source to support driver refactor.

Signed-off-by: Filipe Cavalcanti <filipe.cavalcanti@espressif.com>
2025-09-14 10:41:15 +08:00
Filipe Cavalcanti
20ff68bd65 arch/xtensa: refactor Wi-Fi driver for ESP32|S2|S3
Fixes low and inconsistent bandwidth issues.
Adds new configuration options for buffer management.
Moves code around to make the implementation cleaner and easier to debug.

Signed-off-by: Filipe Cavalcanti <filipe.cavalcanti@espressif.com>
2025-09-14 10:41:15 +08:00
Matteo Golin
903b6b168e bcm2711/i2c: Implement I2C support for all user-accessible interfaces
Initial I2C implementation such that I2C sending and receiving now
works well enough to use the BMP280 driver for a BMP280 device connected
to any of I2C0-I2C6 on the default pins. I2CTOOL also works for these
interfaces.

Functionality for "no stop" and "no start" options is not present.
Implementing that is not clear from the peripheral datasheet and will be
a challenge.

Signed-off-by: Matteo Golin <matteo.golin@gmail.com>
2025-09-14 10:40:36 +08:00
wangchengdong
778f3fa39c arch/tricore: allow user defined compiler path
prefix compiler with ${TOOLCHAIN_PREFIX}

Signed-off-by: Chengdong Wang <wangchengdong@lixiang.com>
2025-09-12 10:08:45 +02:00
Matteo Golin
ba5dd64b64 docs/rx65n-rsk2mb: Migrate README.txt to rst format
Migrated the legacy README.txt format to rst format.

Signed-off-by: Matteo Golin <matteo.golin@gmail.com>
2025-09-12 07:20:04 +02:00
Matteo Golin
4312e1a4f4 docs/rx65n-grrose: Migrate legacy README.txt to rst
Migrated the legacy README.txt file to rst format.

Signed-off-by: Matteo Golin <matteo.golin@gmail.com>
2025-09-12 07:20:04 +02:00
Matteo Golin
387b0e4115 docs/skp16c26: Migrated legacy README.txt to rst format
Migrated the legacy README.txt file to rst.

Signed-off-by: Matteo Golin <matteo.golin@gmail.com>
2025-09-12 07:20:04 +02:00
Matteo Golin
1638c1bc98 docs/us7032evb1: Migrate README.txt to RST format.
Migrated the legacy README.txt to RST format. I removed some information
which no longer applies since 2008 when this documentation was written.

Signed-off-by: Matteo Golin <matteo.golin@gmail.com>
2025-09-12 07:20:04 +02:00
chao an
3c4b099189 arch/arm/armv8-m: stack pointer should be 8-byte aligned in signal context
Since the alignment of the signal context is affected by XCPTCONTEXT_SIZE in
different Kconfig,  sometimes the stack pointer is not aligned to 8 bytes, this
is not what the software and compiler expect, for example,  if va_list() obtains
wide data of type long long, the offset will be wrong, So in this commit, we set
stack-aligned the base offset so that the correct offset will be set during context
restoration.

1. test code:
|            void signal_handler(int signo, siginfo_t *info, void *context) {
|                long long ttt = 1024000;
|                printf("%lld\n", ttt);
|            }
|
|            struct itimerspec its = {   .it_value.tv_sec  = 1,
|                .it_value.tv_nsec = 0,
|                .it_interval.tv_sec  = 1,
|                .it_interval.tv_nsec = 0
|            };
|
|            int main(int argc, FAR char *argv[])
|            {
|                struct sigevent evp;
|                timer_t timer_id;
|
|                memset(&evp, 0, sizeof(evp));
|                evp.sigev_notify          = SIGEV_SIGNAL | SIGEV_THREAD_ID;
|                evp.sigev_signo           = SIGALRM;
|                evp.sigev_notify_thread_id = gettid();
|
|                timer_create(CLOCK_REALTIME, &evp, &timer_id);
|
|
|                struct sigaction sa;
|                memset(&sa, 0, sizeof(sa));
|                sa.sa_sigaction = signal_handler;
|                sa.sa_flags = SA_SIGINFO;
|                sigemptyset(&sa.sa_mask);
|
|                sigaction(SIGALRM, &sa, NULL);
|
|                timer_settime(timer_id, 0, &its, NULL);
|
|                while (1)
|                    sleep(1);
|
|                return 0;
|            }

2. before this change:

|            NuttShell (NSH) NuttX-12.10.0
|            nsh> hello
|            4398046527890440
|            4398046527890472
|            4398046527890504
|            4398046527890536

3. after this change:

|            NuttShell (NSH) NuttX-12.10.0
|            nsh> hello
|            1024000
|            1024000
|            1024000
|            1024000

Signed-off-by: chao an <anchao.archer@bytedance.com>
2025-09-11 11:21:30 -03:00
nuttxs
a5b810bdb1 Kconfig: Add configurable Stack Canaries protection levels.
Introduce a configurable stack-protection level for the existing
CONFIG_STACK_CANARIES, instead of hard-coding -fstack-protector-all.
Add Kconfig choice STACK_CANARIES_LEVEL four selectable levels:

 -fstack-protector
 -fstack-protector-strong
 -fstack-protector-all (default)
 -fstack-protector-explicit

Signed-off-by: nuttxs <zhaoqing.zhang@sony.com>
2025-09-11 19:56:42 +08:00
Eren Terzioglu
092d7eac73 boards/risc-v/esp32c6: Add RTC GPIO board support for esp32c6
Add RTC GPIO board support for esp32c6

Signed-off-by: Eren Terzioglu <eren.terzioglu@espressif.com>
2025-09-11 10:57:18 +02:00
Eren Terzioglu
e148048ac2 arch/risc-v/esp32c6: Add RTC GPIO support for esp32c6
Add RTC GPIO support for esp32c6

Signed-off-by: Eren Terzioglu <eren.terzioglu@espressif.com>
2025-09-11 10:57:18 +02:00
Eren Terzioglu
eaaeed2236 Docs/risc-v/esp32c6: Add lpcore docs
Add lpcore board docs for esp32c6

Signed-off-by: Eren Terzioglu <eren.terzioglu@espressif.com>
2025-09-11 10:57:18 +02:00
Eren Terzioglu
4c03284a7d boards/risc-v/esp32c6: Add lpcore support
Add lpcore board support for esp32c6

Signed-off-by: Eren Terzioglu <eren.terzioglu@espressif.com>
2025-09-11 10:57:18 +02:00
Eren Terzioglu
70dc59a5e6 arch/risc-v/esp32c6: Add lpcore support
Add lpcore support for esp32c6

Signed-off-by: Eren Terzioglu <eren.terzioglu@espressif.com>
2025-09-11 10:57:18 +02:00
Matteo Golin
71c05b3a2b docs/calib_udelay: Added documentation for the calib_udelay example.
This commit adds documentation to the almost empty `calib_udelay` page
as part of #11081. It provides reasoning for the example, an explanation
of what it does and why `CONFIG_BOARD_LOOPSPERMSEC` is necessary, and
also shows some example console output of the program.

Signed-off-by: Matteo Golin <matteo.golin@gmail.com>
2025-09-10 17:52:38 -04:00
Matteo Golin
aba41c9d23 docs/applications/bmp280: Documentation for the BMP280 application.
This commit provides documentation for using the `bmp280` application to
read pressure and temperature from the device. It provides a brief
explanation of how the program works and the console output it
generates. Part of #11081.

Signed-off-by: Matteo Golin <matteo.golin@gmail.com>
2025-09-10 12:48:00 -03:00
nuttxs
d09b6a9f51 boards/xtensa: fix the issue of undefined symbol reference errors
occurring during compilation and linking phase when the configuration
(CONFIG_ESP32S3_APP_FORMAT_LEGACY=y) is enabled.

---
undefined reference to _esp_system_init_fn_array_start
undefined reference to _esp_system_init_fn_array_end
undefined reference to __init_array_start
undefined reference to __init_array_end
---

Signed-off-by: nuttxs <zhaoqing.zhang@sony.com>
2025-09-10 10:56:16 -03:00
wangjianyu3
23e5e1b86e mtd/nvs: Save events if not waited
This patch will report events in the following scenarios:

1. Events that have changed but not been waited for before being added to
   the interest list.
2. Events that occur after `epoll_wait()` returns and before it is called
   again.

Signed-off-by: wangjianyu3 <wangjianyu3@xiaomi.com>
2025-09-10 10:54:39 -03:00
wangchengdong
abf7a74e6a arch/tricore: fix tasking compiler linking error
Add "add_link_options(--no-default-libraries)" ToolchainTasking.cmake
  Add "LDFLAGS += --no-default-libraries" in ToolchainTasking.defs

Signed-off-by: Chengdong Wang <wangchengdong@lixiang.com>
2025-09-10 12:18:53 +08:00
Lars Kruse
4db757c9a6 arch/arm/rp2040: merge conflicting definitions of hw_* functions
The functions `hw_write_masked` and `hw_xor_bits` (as defined in
pico-sdk) were defined in NuttX twice.
Additionally these definitions were in conflict (one lacked the
`volatile` modifier).

Now these functions and their dependencies are defined in a new header
file.
Its name is based on the filename of the original definition in
pico-sdk:

  src/rp2_common/hardware_base/include/hardware/address_mapped.h

This change should fix the potential issue of GPIO operations failing
due to compiler optimizations caused by the absence of `volatile`.

Signed-off-by: Lars Kruse <devel@sumpfralle.de>
2025-09-10 09:46:04 +08:00
Jukka Laitinen
c9776bf8a6 libc/fclose: Validate the user provided stream pointer
Check that the provided stream pointer is really opened for the group before
closing & freeing it.

Signed-off-by: Jukka Laitinen <jukka.laitinen@tii.ae>
2025-09-09 23:51:35 +08:00
wangchengdong
e272181007 arm/armv8-r: remove redundant and misleading pointer in arm_syscall()
replace **running_task with *running_task, and updated several other places
 accordingly

Signed-off-by: Chengdong Wang <wangchengdong@lixiang.com>
2025-09-09 23:49:17 +08:00
wangchengdong
fc09640b28 sched/event: add nxevent_getmask api
In certain cases, when the event-wait thread is awakened,
  it needs to know the specific mask bit that triggered it,
  so that it can branch to different paths accordingly.
  This patch introduces the nxevent_getmask function to address this requirement.

Signed-off-by: Chengdong Wang <wangchengdong@lixiang.com>
2025-09-09 11:07:49 -03:00
wangchengdong
c0d7269840 sched/event: fix event bug after csection was removed
Change:
    Replace list_delete_init() with list_delete() in nxevent_post.
  Reason:
    PR 16933 removed list_delete() in nxevent_wait() and  allow other task
    to preempt event-wait thread after list_add_tail() option,  the even-post thread
    can preempt it at this time and do  list_delete_init().

    The problem is that list_delete_init() will make  list_in_list() return true, so
    DEBUGASSERT(!list_in_list(&(wait->node))); will fail in nxevent_wait() after the event-wait thread
    returns.

Signed-off-by: Chengdong Wang <wangchengdong@lixiang.com>
2025-09-09 15:45:48 +08:00
wangchengdong
e7ecf19a68 boards/a2g-tc397-5v-tft: Enable events by default
Enable event module by default in the a2g-tc397-5v-tft defconfig

Signed-off-by: Chengdong Wang <wangchengdong@lixiang.com>
2025-09-09 15:45:42 +08:00
dependabot[bot]
149a4ed99e build(deps): bump actions/setup-python from 5 to 6
Bumps [actions/setup-python](https://github.com/actions/setup-python) from 5 to 6.
- [Release notes](https://github.com/actions/setup-python/releases)
- [Commits](https://github.com/actions/setup-python/compare/v5...v6)

---
updated-dependencies:
- dependency-name: actions/setup-python
  dependency-version: '6'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-09-08 21:48:08 +08:00
dependabot[bot]
e8a74c927d build(deps): bump actions/github-script from 7 to 8
Bumps [actions/github-script](https://github.com/actions/github-script) from 7 to 8.
- [Release notes](https://github.com/actions/github-script/releases)
- [Commits](https://github.com/actions/github-script/compare/v7...v8)

---
updated-dependencies:
- dependency-name: actions/github-script
  dependency-version: '8'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-09-08 21:48:03 +08:00
raiden00pl
40690a9951 arch/sim/sim_canchar.c: fix CAN flags decoding for message
fix CAN flags decoding for SIM CAN

Signed-off-by: raiden00pl <raiden00@railab.me>
2025-09-08 21:47:48 +08:00
simbit18
77f427ae5e boards/arm/imxrt: CMake added teensy-4.x board
Added CMake build for teensy-4.x board

Signed-off-by: simbit18 <simbit18@gmail.com>
2025-09-08 21:47:08 +08:00
raiden00pl
67eb2bfd29 arch/sim/can: add loopback support for CAN character dev
add loopback support for sim CAN character dev

Signed-off-by: raiden00pl <raiden00@railab.me>
2025-09-08 21:41:18 +08:00
wangchengdong
cac1cc896a sched/event: add nxevent_clear api
Add nxevent_clear to clear event mask to an event object.

Signed-off-by: Chengdong Wang <wangchengdong@lixiang.com>
2025-09-08 19:48:35 +08:00
wangchengdong
df9b525174 arch/tricore: remove duplicated local variable in tricore_doirq()
remove duplicated tcb loval variable in tricore_doirq()

Signed-off-by: Chengdong Wang <wangchengdong@lixiang.com>
2025-09-08 19:36:16 +08:00
Matteo Golin
b5ab71d775 docs/pr-template: Update the testing section of the PR template
This commit updates the pull request template that is auto-populated
when GitHub PRs are made. The testing section now includes more detail
on what is considered an acceptable level of testing information and a
warning that PRs with insufficient testing information will not be
accepted.

Signed-off-by: Matteo Golin <matteo.golin@gmail.com>
2025-09-08 08:09:57 -03:00
wangchengdong
627729635b arch/tricore: remove redundant and misleading pointer usage in tricore_doirq()
'struct tcb_s **running_task = &g_running_tasks[this_cpu()];'
  was updated to
 'struct tcb_s *running_task = g_running_tasks[this_cpu()];'

  'if (*running_task != NULL)
    {
     ( *running_task)->xcp.regs = regs;
    }'

    was updated to

  'if (running_task != NULL)
    {
      running_task->xcp.regs = regs;
    }'

Signed-off-by: Chengdong Wang <wangchengdong@lixiang.com>
2025-09-07 13:17:57 -04:00