Commit Graph

1762 Commits

Author SHA1 Message Date
Lup Yuen Lee c4d754f135 CI: Split the targets in sim-01 and add sim-03
This PR splits the CI Build Job sim-01 and adds sim-03:

Before the Split: Simulator Jobs take up to 1.5 hours to complete
- sim-01 (1 hour 31 mins): adb, citest, lvgl, matter
- sim-02 (28 mins): posix_test, sqlite

After the Split: Simulator Jobs will complete within 1 hour
- sim-01 (58 mins): adb, citest
- sim-02 (35 mins): lvgl, matter
- sim-03 (28 mins): posix_test, sqlite

This will help us comply with the ASF Policy for GitHub Actions, as explained here: https://github.com/apache/nuttx/issues/14376
2024-10-22 08:55:20 +08:00
Tiago Medicci Serrano 39c7ef0a26 tools/esp32s3/Config.mk: fix "printf:`\': invalid format character"
The error was introduced by #14393, which was intended to fix this
line for MacOS. This commit makes this line dependent on the host
OS to avoid any compilation errors.
2024-10-22 08:54:15 +08:00
raiden00pl 6657f2abb7 boards/arm/stm32f7: separate nucleo-144 board into individual boards
nucleo-144 combines 3 different ST boards. This approach is inconsistent with
the support for the rest of the nucleo boards, where each board is in separate folders.
Also nucleo-144 is no longer reserved for STM32F7 chips but other families also use this format.

After this commit nucleo-144 is divided into 3 boards:

- nucleo-f746zg
- nucleo-f767zi
- nucleo-f722ze
2024-10-21 09:23:44 +08:00
Lup Yuen Lee 9c1e0d3d64 CI: Split the Build Jobs for Arm64 and x86_64
This PR creates the new CI Build Jobs `arm64-01` and `x86_64-01`. The new jobs will split and offload the Arm64 and x86_64 Build Targets from `other`. This will reduce our usage of GitHub Runners, to comply with the ASF Policy for GitHub Actions. (Recently we see more PRs for Arm64 and x86_64)

Before the Split: Simple PRs (One Arch and/or One Board) for Arm64 and x86_64 require almost 1 hour for CI Build
- `other` (57 mins): AVR, SPARC, x86, PinePhone, QEMU Arm64, QEMU x86_64

After the Split: Simple PRs for Arm64 and x86_64 will complete under 30 mins
- `other` (24 mins): AVR, SPARC, x86
- `arm64-01` (29 mins): PinePhone, QEMU Arm64
- `x86_64-01` (9 mins): QEMU x86_64

To skip more unnecessary builds: Our Build Rules `arch.yml` shall ignore the label "Area: Documentation", so that a Simple PR + Docs is still a Simple PR. Previously we experienced longer CI Build Times, just because we added docs to our Simple PR. (Now our PR shall be built exactly like a Simple PR)

The updated CI code is explained here: https://github.com/apache/nuttx/issues/13775
2024-10-20 09:49:13 +08:00
cuiziwei 9614e1fed5 Add GCCVER define to Toolchain.cmake
Since GCCVER will also be used in the toolchain, it needs to be defined in advance.

Signed-off-by: cuiziwei <cuiziwei@xiaomi.com>
2024-10-19 14:32:08 +08:00
simbit18 791d7c97d0 cmake: Renamed savedefconfig with refreshsilent
Renamed savedefconfig -> refreshsilent name more consistent with the refresh stage for cmake on github.

Added new savedefconfig to fix
https://github.com/apache/nuttx/issues/14281
2024-10-18 22:14:50 +08:00
xuxingliang 53d90c8205 tools/checkpatch: fix isort doesn't return error
Flag --diff will output the changes content.
Flag --check-only will return exit code. It can be used together with --diff.

Run isort again to format the code in place, to make the behavior same as before.

Signed-off-by: xuxingliang <xuxingliang@xiaomi.com>
2024-10-18 21:30:13 +08:00
YAMAMOTO Takashi 0d57e3dba6 tools/esp32s3/Config.mk: fix "unterminated call to function" error
this # would be parsed by make as a start of a comment.
2024-10-18 20:47:28 +08:00
Alejandro Aguirre d762427ec9 tools: fix parsetrace.py output
- Fix usage of non-existing variable `args.out`.
- Fix dump trace not writing to the output file.
- Fix path provided through `-o` getting ignored.

Signed-off-by: Alejandro Aguirre <alejandro.aguirre@midokura.com>
2024-10-18 10:29:48 +08:00
Xiang Xiao c6aed84638 tools: Rename apps-or-nuttx-Make.defs to Make.defs
follow the same pattern as other Make.defs files

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2024-10-17 07:55:02 +08:00
anjiahao 7c37a46f69 gdbserver:skip load symbol if use logfile as input
Signed-off-by: anjiahao <anjiahao@xiaomi.com>
2024-10-16 08:01:28 +08:00
anjiahao ddf44def10 gdbserver:fix bug when use arm-a coredump addr mismatch
Signed-off-by: anjiahao <anjiahao@xiaomi.com>
2024-10-16 08:01:28 +08:00
anjiahao a1ff878bed gdbserver:Special processing xtensa architecture
Signed-off-by: anjiahao <anjiahao@xiaomi.com>
2024-10-16 08:01:28 +08:00
Filipe Cavalcanti 5592145dc7 tools/espressif: add esptool version check to Espressif build system 2024-10-15 20:42:57 +02:00
xuxingliang 143b265d11 tools: make isort and black formatters to work together
Config multi line output to mode 3, so isort and black can agree with
each other:
```
3 - Vertical Hanging Indent

from third_party import (
    lib1,
    lib2,
    lib3,
    lib4,
)
```

Signed-off-by: xuxingliang <xuxingliang@xiaomi.com>
2024-10-15 01:08:53 +08:00
xuxingliang 01cce0c544 tools: exit with error if py needs to format
Make CI fail if format not pass.

Signed-off-by: xuxingliang <xuxingliang@xiaomi.com>
2024-10-15 01:08:53 +08:00
cuiziwei 7246533aeb Unify the definition of GCCVER and remove duplicate code.
Signed-off-by: cuiziwei <cuiziwei@xiaomi.com>
2024-10-13 11:41:22 +08:00
Marco Casaroli 83455a3fa1 ci: skip config
since this config requires bootloader, we skip it
2024-10-13 11:19:51 +08:00
Marco Casaroli 890bdcd3d3 feat(esp32s3-devkit): add qemu image option 2024-10-13 11:19:51 +08:00
wangmingrong1 c9db6e8173 CI: CI Docker adds Python package installation
1. Add Python tool 'install CI' to MSYS2 platform
2. CI Python Add Package Construction

Signed-off-by: wangmingrong1 <wangmingrong1@xiaomi.com>
2024-10-13 02:25:29 +08:00
Bowen Wang c86f4d66da tools/showsize.sh: support pass custom nuttx executable
Use showsize.sh to show custom elf file top10 size
tools/showsize.sh vela_ap.elf
tools/showsize.sh vela_audio.elf

Signed-off-by: Bowen Wang <wangbowen6@xiaomi.com>
2024-10-13 02:11:12 +08:00
ligd 90afe58ad7 tools/configure.sh: add relative path
support #include "../ap/defconfig" in defconfig

Signed-off-by: ligd <liguiding1@xiaomi.com>
2024-10-12 14:27:58 +08:00
anjiahao e5f9b42ea0 binfmt/libelf:Remove libelf implementation [2/2]
this commit is part two, all logic move to modlib, so we can remove it.
and change all use defconfig

Signed-off-by: anjiahao <anjiahao@xiaomi.com>
2024-10-12 12:29:06 +08:00
lipengfei28 9f170a36e3 white list: add cJSON
Signed-off-by: lipengfei28 <lipengfei28@xiaomi.com>
2024-10-12 09:30:06 +08:00
yinshengkai cac90afe79 Revert "sim/note: add note related configuration"
This reverts commit 154cb4a860.
2024-10-11 21:30:19 +08:00
yinshengkai 154cb4a860 sim/note: add note related configuration
Ensure that CI can cover all note code

Signed-off-by: yinshengkai <yinshengkai@xiaomi.com>
2024-10-11 11:55:17 +08:00
yinshengkai 656baa2a12 tools/Unix.mk: allow defconfig to overwrite old config
When using include command in defconfig, it is necessary to support overwriting the configuration in other files

kconfig-conf only prints warnings, but does not return errors

Signed-off-by: yinshengkai <yinshengkai@xiaomi.com>
2024-10-11 02:40:58 +08:00
yinshengkai ec691cc5e4 tools: prasetrace.py supports parsing syslog
Signed-off-by: yinshengkai <yinshengkai@xiaomi.com>
2024-10-11 01:30:11 +08:00
yinshengkai fbaa7b29f4 tools/gcov: ignore lcov error
When some coverage files cannot be parsed correctly,
skip the current error file and continue to generate coverage report

Signed-off-by: yinshengkai <yinshengkai@xiaomi.com>
2024-10-10 22:55:46 +08:00
yinshengkai 7516da1650 tools: gcov.sh supports generating device-side code coverage
Signed-off-by: yinshengkai <yinshengkai@xiaomi.com>
2024-10-10 22:55:46 +08:00
Lup Yuen Lee 80d03cb296 CI: Split the RISC-V Build Jobs into smaller jobs
To speed up the CI Workflow, this PR splits the CI Build Jobs for RISC-V into smaller jobs. Each job will now complete within 1 hour.

Before the PR: There are 2 jobs for RISC-V, each requiring more than 1.5 hours
- `risc-v-01` (1 hour 42 mins): BL602, Ox64, ESP32-C3 / C6 / H2
- `risc-v-02` (1 hour 41 mins): K230, Icicle, QEMU, RV32M1-Vega

After the PR: The build is spread across 6 jobs for RISC-V, each job completes within 1 hour
- `risc-v-01` (19 mins): BL602, Ox64
- `risc-v-02` (44 mins): ESP32-C3
- `risc-v-03` (45 mins): ESP32-C6, ESP32-H2
- `risc-v-04` (31 mins): K230, Icicle
- `risc-v-05` (41 mins): QEMU CITest
- `risc-v-06` (38 mins): Rest of QEMU, RV32M1-Vega

Following the same convention as the Arm32 Build Jobs, the above jobs are sorted by Target Name. Performance of the RISC-V Build Jobs is discussed in https://github.com/apache/nuttx/issues/13775
2024-10-10 08:44:02 +08:00
yinshengkai 034af29aab arch: adjust gcov configuration name
Signed-off-by: yinshengkai <yinshengkai@xiaomi.com>
2024-10-09 21:27:47 +08:00
anjiahao fa59adde40 Simplify BOARD_MEMORY_RANGE initialization logic
Signed-off-by: anjiahao <anjiahao@xiaomi.com>
2024-10-09 15:41:48 +08:00
xuxin19 2cfd0783bc tools/mkdeps.c:add options for gen full path object target
Check g_altpath. If only the CURRENT path is included,
the obj target use its own full path, otherwise just use the filename.

add default value current path for obj-path.

Signed-off-by: xuxin19 <xuxin19@xiaomi.com>
2024-10-09 14:21:47 +08:00
xuxin19 a27655a5a6 checkpatch.sh:Fix checking for wrong cmake files
patches ending with cmake should be checked.
Currently, any non-cmake files containing cmake keywords will be checked.

Signed-off-by: xuxin19 <xuxin19@xiaomi.com>
2024-10-09 14:17:14 +08:00
Lup Yuen Lee c74206a982 CI: Split the Build Job arm-05 into multiple smaller jobs
CI Build Job `arm-05` (runtime 2 hours) has become the Performance Bottleneck for CI Workflow. That's because `arm-05` builds too many targets for nRF, RP2040, SAM 3, SAM A and SAM D. This PR splits `arm-05` into multiple smaller jobs, to reduce the CI Build Duration.

Before the PR: `arm-05` is overloaded, build requires 2 hours
- `arm-05` (2 hours): nRF, RP2040, SAM 3, SAM A, SAM D
- `arm-06` (56 mins): STM32 [a-m]*

After the PR: `arm-05` is offloaded (to `arm-06` and `arm-07`), completes within 1 hour
- `arm-05` (47 mins): nRF
- `arm-06` (1 hour): Reserve for RP2040 exclusively
- `arm-07` (1 hour 15 mins): SAM 3, SAM A, SAM D, STM32 [a-m]*

Build Jobs are sorted by Target Name. So we cascade the changes and rename the Build Jobs: `arm-07` becomes `arm-08`, `arm-08` becomes `arm-09` etc. Then `arm-13` becomes a new job `arm-14`. (Which we added to `build.yml`)

Performance of `arm-05` is discussed in https://github.com/apache/nuttx/issues/13775 and https://github.com/apache/nuttx/issues/12773
2024-10-09 13:45:26 +08:00
anjiahao fb176c02ca gdb/thread.py:Remove dependence on g_current_regs
Signed-off-by: anjiahao <anjiahao@xiaomi.com>
2024-10-08 23:55:59 +08:00
Xu Xingliang 4ed506d6ab board/coredump: add option to use base64 stream
Signed-off-by: Xu Xingliang <xuxingliang@xiaomi.com>
2024-10-08 22:33:19 +08:00
xuxingliang 18d5ae20f5 drivers/segger: add heap data plot
Add heap current used to note.
Plot it in segger sysview data plot.

Signed-off-by: xuxingliang <xuxingliang@xiaomi.com>
Signed-off-by: Neo Xu <neo.xu1990@gmail.com>
2024-10-07 17:34:59 +08:00
simbit18 b3107a1f1b tools/testbuild.sh: Improved speed in the skipping phase 2024-10-03 08:59:04 +08:00
Neo Xu 94a114b19a tools/btdecode.sh: add optional elf file parameter
Example: ./nuttx/tools/btdecode.sh aarch64-none-elf-addr2line crash.log build/nuttx
Signed-off-by: Neo Xu <neo.xu1990@gmail.com>
2024-09-30 08:44:18 +08:00
ligd 7cf5e7cb34 ci: corrent the error judgement on mq testcase
Signed-off-by: ligd <liguiding1@xiaomi.com>
2024-09-29 18:18:01 +08:00
Huang Qi 6edbde25e5 nxstyle: Add NativeSymbol to white list
Add the new symbol `NativeSymbol` to the white list,
and update the comments about the symbols that are
from WAMR project.

Signed-off-by: Huang Qi <huangqi3@xiaomi.com>
2024-09-28 19:33:05 +08:00
liaobin1 0e8cf3837a tools/nxstyle: Add RuntimeInitArgs to the white content list
`RuntimeInitArgs` is used by WAMR, a popular WebAssembly runtime,
it used in nuttx-apps side.

Signed-off-by: liaobin1 <liaobin1@xiaomi.com>
2024-09-27 21:42:06 +08:00
YAMAMOTO Takashi 1bf778020a tools/btdecode.sh: make grep overridable
This script seems to assume GNU grep, which is not commonly
available as "grep" on some platforms.  For examples, it's
more common to have it named "ggrep" on BSD-based systems
including macOS.

Ideally, I suppose we should avoid GNU dependencies like this
in general.  But I'm not motivated enough to rewrite this script
in a portable way today.

cf. https://www.gnu.org/software/grep/manual/grep.html#grep-Programs-1
2024-09-26 23:59:50 +08:00
simbit18 2fbe02afec ci/platforms/darwin.sh: switch Wget to cURL tool
Switch wget to cURL tool for:

arm_gcc_toolchain()
arm64_gcc_toolchain()
gperf()
riscv_gcc_toolchain()
sparc_gcc_toolchain()
xtensa_esp32_gcc_toolchain()
wasi_sdk()

Used git clone --depth 1 a shallow clone with a history truncated to reduce the clone size for:

kconfig_frontends()

added ninja installation
2024-09-26 10:54:16 -03:00
simbit18 715a3d8446 ci/platforms: linux.sh ubuntu.sh switch Wget to cURL tool
Switch wget to cURL tool for:
arm_gcc_toolchain()
arm64_gcc_toolchain()
riscv_gcc_toolchain()
sparc_gcc_toolchain()
xtensa_esp32_gcc_toolchain()
xtensa_esp32s2_gcc_toolchain()
xtensa_esp32s3_gcc_toolchain()
wasi_sdk()

Used git clone --depth 1 a shallow clone with a history truncated to reduce the clone size for:
kconfig_frontends()
2024-09-26 10:53:58 -03:00
simbit18 45a8d99755 ci/platforms/msys2.sh: update esptool version and switch Wget to cURL tool
Bumps esptool from 4.7.0 to 4.8.0.

Switch wget to cURL tool
arm_gcc_toolchain()
arm64_gcc_toolchain()
riscv_gcc_toolchain()
sparc_gcc_toolchain()
xtensa_esp32_gcc_toolchain()
xtensa_esp32s2_gcc_toolchain()
xtensa_esp32s3_gcc_toolchain()

Create a shallow clone with a history truncated of
gen_romfs()
kconfig_frontends()
2024-09-25 23:52:45 +08:00
Alin Jerpelea 9fa35a774f tools/doreleasenotes
Simple tool to generate the NuttX release notes

tested on Python-3.8.9

Requirements
pip install PyGithub
pip install PyInquirer
pip install tqdm

The following arguments are required for generating a release: release_version, gh_token

Inspired by https://github.com/btashton/nxutils

Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2024-09-25 01:38:04 +08:00
Tiago Medicci Serrano 27858f913b tools: Add generic tool to decode the backtrace dump
The script can decode the backtrace dump, considering the syntax
of the backtrace format (properly handle the dump when SMP is
enabled, for instance) based on chip name or the toolchains's
addr2line tool.
2024-09-23 20:40:58 +08:00