Commit Graph

1509 Commits

Author SHA1 Message Date
raiden00pl
03b058dddc boards/stm32h7: add nucleo-h745zi 2023-08-26 03:35:32 +08:00
Alan Carvalho de Assis
b435005415 tools/refresh.sh: Add option to refresh custom board
This patch modify the script to update only the boards configs
of an specific chip or only the boards of an specific architecture.

Examples:

refresh.sh add custom board verify
custom board:
$ ./tools/refresh.sh --silent ../../xxx/configs/ap
$ ./tools/refresh.sh --silent /yyy/xxx/configs/ap
$ ./tools/refresh.sh --silent yyy/xxx/configs/ap

Signed-off-by: dengwenqi <dengwenqi@xiaomi.com>
2023-08-24 02:36:04 +08:00
fangfei6
d0f84bd745 tools/ci: Update docker to ubuntu 22.04 and Update Renesas toolchain 8.3.0
Signed-off-by: fangfei6 <fangfei6@xiaomi.com>
2023-08-24 00:03:06 +08:00
Xiang Xiao
a107cc2ee0 tools/ci: Update arm toolchain to 12.3rel1
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2023-08-23 10:12:52 +08:00
raiden00pl
3fd8dab991 ci: enable cmake for nucleo-f446re/systemview 2023-08-22 23:37:08 +08:00
Xiang Xiao
e2166eca55 Revert "ci/Dockerfile: Update riscv toolchain to gcc13.2.0"
This reverts commit 7b34583996.
2023-08-22 22:33:37 +08:00
Xiang Xiao
7b34583996 ci/Dockerfile: Update riscv toolchain to gcc13.2.0
and change the default toolchain to riscv32-unknown-elf-

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2023-08-22 15:14:44 +08:00
anjiahao
9241e4a2ca minidumpserver.py:support xtensa and esp32s3 arch
Signed-off-by: anjiahao <anjiahao@xiaomi.com>
2023-08-21 18:27:05 +08:00
anjiahao
ffb391f6aa minidumpserver.py:Print the line number of logfile when the format is wrong
Signed-off-by: anjiahao <anjiahao@xiaomi.com>
2023-08-21 18:27:05 +08:00
wangbowen6
8c56354dc8 minidumpserver: add arm-a thumb arch support
The frame pointer and r11 register is different in thumb mode and
arm mode.

Signed-off-by: wangbowen6 <wangbowen6@xiaomi.com>
2023-08-21 18:27:05 +08:00
renweibo
f3208c1def tools: add type information
Additional information here:
- no code logic change, just add type hint
- make the code easy to work with
- minor python3 requirement without any complex type feature

Signed-off-by: renweibo <renweibo@xiaomi.com>
2023-08-21 18:27:05 +08:00
Xiang Xiao
cd93b8c5ab tools/ci: Don't install CodeChecker in the final docker image
since it fail to install on ubuntu 22.04:
ERROR: failed to solve: process "/bin/sh -c pip3 install CodeChecker" did not complete successfully: exit code: 1
Error: buildx failed with: ERROR: failed to solve: process "/bin/sh -c pip3 install CodeChecker" did not complete successfully: exit code: 1

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2023-08-18 15:35:59 +03:00
Xiang Xiao
c04d8560d3 tools/ci: Update the final docker image to ubuntu 22.04
g++ need update to the new version for libcxx 15.0.7

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2023-08-18 15:35:59 +03:00
raiden00pl
ec97cc8a31 ci: build arduino-nano-33ble and arduino-nano-33ble-rev2 with cmake 2023-08-14 20:42:59 +08:00
Xiang Xiao
6ba12d4b96 ci: Fix the openssl installation fail on macOS
+ brew install u-boot-tools
==> Fetching dependencies for u-boot-tools: openssl@3
==> Fetching openssl@3
==> Downloading https://ghcr.io/v2/homebrew/core/openssl/3/manifests/3.1.2-1
Already downloaded: /Users/runner/work/nuttx/nuttx/sources/tools/homebrew/downloads/d235bbcbe9c405bfbe837454515b9cb2793542891a2050e5948a94f596e2a51e--openssl@3-3.1.2-1.bottle_manifest.json
==> Downloading https://ghcr.io/v2/homebrew/core/openssl/3/blobs/sha256:2bea791e9eacc59e0a9099065f3229afaf2b68a9b7b3136ec508103985b1176c
Already downloaded: /Users/runner/work/nuttx/nuttx/sources/tools/homebrew/downloads/d082c3abe2fd32b11d857fb7111adc0fc02a0b345044c07f2e7db7160f15300e--openssl@3--3.1.2.ventura.bottle.1.tar.gz
==> Fetching u-boot-tools
==> Downloading https://ghcr.io/v2/homebrew/core/u-boot-tools/manifests/2023.07.02
Already downloaded: /Users/runner/work/nuttx/nuttx/sources/tools/homebrew/downloads/5e0a4a2e6eda6e1dc965b8523549685de4c2da7f1c68d8431bbd7c536642bfee--u-boot-tools-2023.07.02.bottle_manifest.json
==> Downloading https://ghcr.io/v2/homebrew/core/u-boot-tools/blobs/sha256:bfd54176e94ffd2ad380ab7cbd25e091afe9338b17343881cd957f5f6c30d5ed
Already downloaded: /Users/runner/work/nuttx/nuttx/sources/tools/homebrew/downloads/8ce6e97fdea98c1581ffe5f52ccd876f3cbf373da9a70f889948b5c888528402--u-boot-tools--2023.07.02.ventura.bottle.tar.gz
==> Installing dependencies for u-boot-tools: openssl@3
==> Installing u-boot-tools dependency: openssl@3
==> Pouring openssl@3--3.1.2.ventura.bottle.1.tar.gz
Error: Could not symlink bin/openssl
Target /usr/local/bin/openssl
is a symlink belonging to openssl@1.1. You can unlink it:
  brew unlink openssl@1.1

To force the link and overwrite all conflicting files:
  brew link --overwrite openssl@3

To list all files that would be deleted:
  brew link --overwrite --dry-run openssl@3

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2023-08-08 22:39:33 +03:00
raiden00pl
4cba6630fb cmake: enable more stm32 builds in ci 2023-08-07 05:44:52 -07:00
Lucas Saavedra Vaz
d1b5558c8b arch/espressif: Add MCUboot support for ESP32-C3
Add MCUboot support for ESP32-C3 when using the Espressif HAL
2023-08-04 10:30:57 -07:00
anjiahao
dea3346d0b add prefix addr2line to parsememdump.py
Signed-off-by: anjiahao <anjiahao@xiaomi.com>
2023-08-03 00:14:57 -07:00
Petro Karashchenko
e26b015644 Revert "tools/ci/testrun: increase ostest timeout on CI"
This reverts commit eab86b72c4.
2023-08-02 19:48:24 -07:00
Tiago Medicci Serrano
1197a80741 esp32s3: Enhance protected build linker scripts and memory layout
Instead of setting kernel/user space instruction and data ROM as
hard-coded values on linker, set them according to the max size
of the kernel image set by CONFIG_ESP32S3_KERNEL_IMAGE_SIZE. This
is done by making KIROM, UIROM, KDROM and UDROM dependent on the
kernel size value. Also, override CONFIG_NUTTX_USERSPACE config
according to CONFIG_ESP32S3_KERNEL_IMAGE_SIZE by using a custom
PREBUILD definition.
2023-08-02 21:38:44 +02:00
Tiago Medicci Serrano
ea2ec888b8 Build system: Add PREBUILD definition
Add PREBUILD definition and `prebuild` recipe to call it before
the `mkconfig` tool, at the beginning of the build process. This
`prebuild` step enables running CPU/board-specific operations
before building the firmware, like tweaking or overriding configs
that need to be set after the board configuration.
2023-08-02 06:10:57 -07:00
Petro Karashchenko
eab86b72c4 tools/ci/testrun: increase ostest timeout on CI
Signed-off-by: Petro Karashchenko <petro.karashchenko@gmail.com>
2023-07-31 18:58:48 -07:00
raiden00pl
e48d730273 cmake: enable more cmake builds 2023-07-25 06:18:22 -07:00
chao an
06af0d47aa tools/ci: add rpproxy/rpserver into cmake build
Signed-off-by: chao an <anchao@xiaomi.com>
2023-07-25 15:00:10 +02:00
raiden00pl
44b5eb3751 cmake: update docker cmake to 3.26.0 2023-07-24 09:53:22 -07:00
zhangyuan21
9792211b96 sched/tcbinfo: add stack info to tcbinfo
Signed-off-by: zhangyuan21 <zhangyuan21@xiaomi.com>
2023-07-24 09:47:12 -07:00
anjiahao
d63a36e0f3 toos/gdb/thread:Support thread command on nuttx
support arch:
  sim x86
  sim x86_64
  arm32 all series

  If we need to support more architectures in the future,
  just add the 'g_tcbinfo' of the corresponding architecture

support thread command:
  1. thread <id>
    switch thread
  2. info thread
    list all thread info
  3. thread apply [all | id list] command
    like this:
      thread apply all bt
      thread apply all bt full
      thread apply 1 2 4 bt
      thread apply all info r
  4. nxsetregs
      Set registers to the specified values.
      Usage: nxsetregs [regs]

      Etc: nxsetregs
           nxsetregs g_current_regs[0]
           nxsetregs tcb->xcp.regs
           Nxsetregs g_pidhash[0].tcb->xcp.regs

      Default regs is g_current_regs[0],if regs is NULL,
      it will not set registers.

    Because NuttX enters exception_common during a crash,
    this assembly function manipulates the stack pointer (sp),
    causing GDB to be unable to trace back to the first context of the crash.
    Instead, it shows the context of the interrupt stack. By using nxsetregs,
    it is possible to forcefully set the first context to
    the one before the interrupt occurred.

Notice:
  Switching threads is achieved by setting registers,
  so registers need to be restored before continue,
  please use 'c' to continue instead of 'continue'

Signed-off-by: anjiahao <anjiahao@xiaomi.com>
2023-07-23 21:59:35 -07:00
raiden00pl
26dda05cdf tools/ci: migrate some ci build configurations to CMake 2023-07-22 00:59:44 +08:00
Roy Feng
3fa86f83b7 Some follow-up changes for ESP32s3 32M flash support
Fix the link and flash parameters error of ESP32s3 32M flash
enabled.
2023-07-21 20:44:04 +08:00
chao an
df9f700c28 tools/ci: print cmake warning message only once
1. print cmake warning message only once
2. Touch Dockerfile to update the ci-docker

Signed-off-by: chao an <anchao@xiaomi.com>
2023-07-20 21:40:34 +08:00
chao an
99c29bda70 tools/testbuild: restore the original toolchain configuration before refresh
Signed-off-by: chao an <anchao@xiaomi.com>
2023-07-20 09:09:32 +02:00
YAMAMOTO Takashi
d524403c4c cibuild.sh: drop pip --force-reinstall for now
according to https://github.com/apache/nuttx/pull/7903
it was to fix "the macOS runners occasionally failing".

cython issue workaround seems more important because it always fails.
2023-07-19 13:40:20 +08:00
YAMAMOTO Takashi
8ff9ca064e CI: workaround Cython issue 2023-07-19 13:40:20 +08:00
chao an
7eff229838 tools/ci/checkpatch: add cmake style check into ci-check
Signed-off-by: chao an <anchao@xiaomi.com>
2023-07-18 10:09:48 -03:00
xiajizhong
7160849f63 new feature on trace dump support segger-rtt
Signed-off-by: xiajizhong <xiajizhong@xiaomi.com>
2023-07-16 14:37:21 +03:00
chao an
dc6f1406d1 tools/ci: migrate some ci build configurations to CMake
Signed-off-by: chao an <anchao@xiaomi.com>
2023-07-15 23:32:36 +08:00
Lucas Saavedra Vaz
22e777cf08 tools: Fix BASE_DEFCONFIG generation 2023-07-10 19:54:06 +08:00
chao an
6ee9ec7656 build: add initial cmake build system
1. Update all CMakeLists.txt to adapt to new layout
2. Fix cmake build break
3. Update all new file license
4. Fully compatible with current compilation environment(use configure.sh or cmake as you choose)

------------------

How to test

From within nuttx/. Configure:

cmake -B build -DBOARD_CONFIG=sim/nsh -GNinja
cmake -B build -DBOARD_CONFIG=sim:nsh -GNinja
cmake -B build -DBOARD_CONFIG=sabre-6quad/smp -GNinja
cmake -B build -DBOARD_CONFIG=lm3s6965-ek/qemu-flat -GNinja

(or full path in custom board) :
cmake -B build -DBOARD_CONFIG=$PWD/boards/sim/sim/sim/configs/nsh -GNinja

This uses ninja generator (install with sudo apt install ninja-build). To build:

$ cmake --build build

menuconfig:

$ cmake --build build -t menuconfig

--------------------------

2. cmake/build: reformat the cmake style by cmake-format

https://github.com/cheshirekow/cmake_format

$ pip install cmakelang

$ for i in `find -name CMakeLists.txt`;do cmake-format $i -o $i;done
$ for i in `find -name *\.cmake`;do cmake-format $i -o $i;done

Co-authored-by: Matias N <matias@protobits.dev>
Signed-off-by: chao an <anchao@xiaomi.com>
2023-07-08 13:50:48 +08:00
Petro Karashchenko
cb2849b4ab Revert "tools: Fix CONFIG_BASE_DEFCONFIG generation"
This reverts commit bc4266fa48.
2023-07-03 19:18:32 -03:00
Petro Karashchenko
d7af2f4c0a tools/ci: remove 'brew update' needed for AVR toolchain installation on OSX
Remove 'brew update' introduced by https://github.com/apache/nuttx-testing/pull/88
as it seems to be not longer needed

Signed-off-by: Petro Karashchenko <petro.karashchenko@gmail.com>
2023-07-03 19:16:19 -03:00
Stuart Ianna
b9fa045427 tools/syscall: Resolve compile time warning on address validation.
The following warning is emitted when building with GCC 12.2.0:

"the comparison will always evaluate as ‘true’ for the address of ‘g_parm’ will never be NULL [-Waddress]"

As g_param is an array of char[]. each member should have an actual address, so the validation in each if statement is not required.
2023-06-28 08:47:07 +08:00
Stuart Ianna
160e1a965d mkexport: Allow boards to supply custom gnu-elf.ld.
Allows boards to supply their own gnu-elf linker script, used when building Nuttx applications and CONFIG_BUILD_KERNEL.

This is useful when building fully-linked applications (see #9395).
2023-06-28 08:46:10 +08:00
SPRESENSE
31a2c22112 tools: Add script to parse callstack
Add 'callstack.py' script for parsing stack dump log to callstack.
2023-06-27 10:10:12 -03:00
chao an
df6d799577 tools/ci: Update GNU Arm Embedded Toolchain to Version 12.2-2022.12.22
x86_64 Linux hosted cross toolchains
AArch32 bare-metal target (arm-none-eabi)

arm-gnu-toolchain-12.2.rel1-x86_64-arm-none-eabi.tar.xz

Remove toolchain workaround which already fixed by ARM:
https://developer.arm.com/downloads/-/arm-gnu-toolchain-downloads
https://community.arm.com/support-forums/f/compilers-and-libraries-forum/53470/arm-gnu-toolchain-11-3-rel1-x86_64-arm-none-eabi-wrong-newlib-version-strings-error-when-stdlib-h-is-included

Signed-off-by: chao an <anchao@xiaomi.com>
2023-06-26 20:03:38 +08:00
anjiahao
adc5c8b5ac Debug:support python script auto debug nuttx kernel
This patch add an example and pyhton base modules:
1.add memdump.py is an example to analyze memory
usage by python script.
2.add The most basic data structure analysis, like list, etc.

future ideas:
Maybe we can add modules related to "sched, drivers, arch, fs.." to
automatically analyze scripts to debug some problems

References:
linux kernel (https://github.com/torvalds/linux/tree/master/scripts/gdb)
The official manual of gdb (https://sourceware.org/gdb/onlinedocs/gdb/Python-API.html)

Change-Id: Ib9025a0a141cb89f3813526f7c55dcb28de31ed9
Signed-off-by: anjiahao <anjiahao@xiaomi.com>
2023-06-25 18:17:30 +08:00
Lucas Saavedra Vaz
bc4266fa48 tools: Fix CONFIG_BASE_DEFCONFIG generation
Modify sed command to avoid appending multiple "-dirty" at the end of the configuration name
2023-06-19 23:07:42 +08:00
zhangyuan21
514e77b75e semaphore: Optimize priority inheritance with only one holder
This PR is a modification that optimizes priority inheritance
for only one holder. After the above modifications are completed,
the mutex lock->unlock process that supports priority inheritance
can be optimized by 200 cycles.

Before modify: 2000 cycle
After modify: 1742 cycle

Signed-off-by: zhangyuan21 <zhangyuan21@xiaomi.com>
2023-06-17 08:26:46 +03:00
Huang Qi
4c9e11d559 tools: Support string upper/lower case in make
Implement UPPER_CASE/LOWER_CASE function in pure make, usage:
```
UPPER = $(call UPPER_CASE,$(xxx))
```

Signed-off-by: Huang Qi <huangqi3@xiaomi.com>
2023-06-02 11:12:12 -03:00
Lucas Saavedra Vaz
6a220a08ba tools: Add way to get current defconfig name on runtime
This commit aims to provide a way to get the current applied defconfig on runtime by providing CONFIG_BASE_DEFCONFIG that is updated when the configure and build scripts are run.
2023-06-02 09:17:58 -03:00
chao an
fb9b41221d semantic/parser: fix compile warning found by sparse
Reference:
https://linux.die.net/man/1/sparse

Signed-off-by: chao an <anchao@xiaomi.com>
2023-05-30 23:00:00 +08:00