Commit Graph

1752 Commits

Author SHA1 Message Date
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
wangmingrong1 b5c5e4b850 gdb plugin: Encapsulate the gdb native command gcore as nxgcore
Modify elf with nxgcore and call gcore:
(gdb) nxgcore --help
usage: [-h] [-o OUTPUT] [-t OBJCOPY] [-r MEMRANGE]

options:
  -h, --help            show this help message and exit
  -o OUTPUT, --output OUTPUT
                        Gcore output file
  -t OBJCOPY, --objcopy OBJCOPY
                        Select the appropriate architecture for the objcopy
                        tool
  -r MEMRANGE, --memrange MEMRANGE

examples:
	(gdb) nxgcore -t arm-none-eabi-objcopy -r 0x40200000,0x48000000,0x07

Signed-off-by: wangmingrong1 <wangmingrong1@xiaomi.com>
2024-09-20 22:07:29 +08:00
wangmingrong1 469418f3c9 mm/kasan: Kasan global support setting alignment length
1. Similar to asan, supports single byte out of bounds detection
2. Fix the script to address the issue of not supporting the big end

Signed-off-by: wangmingrong1 <wangmingrong1@xiaomi.com>
2024-09-20 21:47:23 +08:00
wangmingrong1 0d8b6de03a mm/kasan: Map the generated shadow area to the fixed segment
Since the size of the shadow area will change during the script merging of global variables, it will lead to unpredictable number of links. After fixing, only three links are required.

Signed-off-by: wangmingrong1 <wangmingrong1@xiaomi.com>
2024-09-20 21:47:23 +08:00
wangmingrong1 5c511443fe mm/kasan: Using arrays instead of linked lists
1. Modify the Kasan global variable script to support array storage of region addresses
2. Due to the lack of formatting in the previous attempt, a formatting script was created

Signed-off-by: wangmingrong1 <wangmingrong1@xiaomi.com>
2024-09-20 21:47:23 +08:00
simbit18 6a0c0722e2 CI: Improvement to speed up compilation and reduce download errors.
The simple improvement is designed to speed up compilation and reduce download errors on github and local.

Added a folder nxtmpdir for storing third-party packages

nuttxworkspace
|
|- nuttx
|- apps
|- nxtmpdir

tools/Unix.mk:
added export NXTMPDIR := $(WSDIR)/nxtmpdir

tools/configure.sh:
added option -S creates the nxtmpdir folder for third-party packages.

tools/Config.mk:
added macro
CLONE - Git clone repository.
CHECK_COMMITSHA - Check if the branch contains the commit SHA-1.

tools/testbuild.sh:
added option -S

For now I added in the folder this package

ESP_HAL_3RDPARTY_URL = https://github.com/espressif/esp-hal-3rdparty.git

ARCH
arch/xtensa/src/esp32/Make.defs
arch/xtensa/src/esp32s2/Make.defs
arch/xtensa/src/esp32s3/Make.defs
arch/risc-v/src/common/espressif/Make.defs
arch/risc-v/src/esp32c3-legacy/Make.defs

but you can also add other packages (maybe also of apps)
2024-09-20 11:26:01 +08:00
xuxin19 1d3dd328dd modify BUILD_LOADABLE to MODULES which backwards-compatible Kernel
maintains the same semantics as Kernel’s module build
and compatible with Kconfiglib implementation.

The problem of kconfiglib not being able to use tri-states is this:
linux is here torvalds/linux@6dd85ff
The module option is extracted from one of the triate three states into a MODULE keyword.
Kconfiglib supports the default implementation of module to be MODULE for compatibility with the linux kernel, and triate degenerates into bool two states
Refer to this code: 061e71f7d7/kconfiglib.py (L4274-L4284)

Signed-off-by: xuxin19 <xuxin19@xiaomi.com>
2024-09-19 08:32:03 +08:00
wangmingrong1 30652291b5 nxstyle.c: Eliminate case issues with compiler-generated functions
Signed-off-by: wangmingrong1 <wangmingrong1@xiaomi.com>
2024-09-19 03:15:29 +08:00
Masayuki Ishikawa df298c186f Revert "build depend:Revert Make.dep intermediate ddc file"
This reverts commit ddc3119c4e.
2024-09-15 19:29:47 +08:00
xuxin19 ddc3119c4e build depend:Revert Make.dep intermediate ddc file
Revert "Parallelize depend file generation"
This reverts commit d5b6ec450f.

parallel depend ddc does not significantly speed up compilation,
intermediately generated .ddc files can cause problems if compilation is interrupted unexpectedly

Signed-off-by: xuxin19 <xuxin19@xiaomi.com>
2024-09-15 10:01:58 +08:00
Alin Jerpelea c9eef2d697 tools: migrate to SPDX identifier
Most tools used for compliance and SBOM generation use SPDX identifiers
This change brings us a step closer to an easy SBOM generation.

Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2024-09-10 23:11:11 +08:00