1
0
Fork 0
forked from nuttx/nuttx-update
Commit graph

1814 commits

Author SHA1 Message Date
xuxingliang
2f8c9070c5 tools/gdb: use native thread command
For coredump, gdb-stub, the thread command is natively supported.

Signed-off-by: xuxingliang <xuxingliang@xiaomi.com>
2024-11-21 23:08:55 +08:00
anjiahao
089877c693 memleak:support use gdb to catching absolute memory leaks
Signed-off-by: anjiahao <anjiahao@xiaomi.com>
2024-11-21 23:08:55 +08:00
Peter Bee
c0f776dbc3 follow upstream change & fix minor things
Signed-off-by: Peter Bee <pbjd97@gmail.com>
2024-11-20 16:32:05 -03:00
Marco Casaroli
dac3f315a1 uf2 2024-11-20 16:32:05 -03:00
Neo Xu
edc410f26f format code to pass CI
Signed-off-by: Neo Xu <neo.xu1990@gmail.com>
2024-11-20 09:04:22 +08:00
buxiasen
96a3bc2b5c tools/gdb: fix if restore_regs failed script abort
Signed-off-by: buxiasen <buxiasen@xiaomi.com>
2024-11-20 09:04:22 +08:00
anjiahao
eded2017d4 memdump.py:Enhance the printing function of memdump
Signed-off-by: anjiahao <anjiahao@xiaomi.com>
2024-11-20 09:04:22 +08:00
anjiahao
477f7b92ee tools/gdb/memdump.py:fix mempool memory traversal missing nodes
Signed-off-by: anjiahao <anjiahao@xiaomi.com>
2024-11-20 09:04:22 +08:00
xuxingliang
8264c05c15 tools/gdb: use f string where possible
misc update.

Signed-off-by: xuxingliang <xuxingliang@xiaomi.com>
2024-11-20 09:04:22 +08:00
Gao Jiawei
06d640a677 implement ps nx shell utility for ez debugging with GDB
Signed-off-by: Gao Jiawei <gaojiawei@xiaomi.com>
2024-11-20 09:04:22 +08:00
Gao Jiawei
e31fe0fb55 add custom command and APIs for retrieving/displaying stack statistics
Signed-off-by: Gao Jiawei <gaojiawei@xiaomi.com>
2024-11-20 09:04:22 +08:00
Gao Jiawei
8edb9283ba trivial modification on the utility module
1. add get macro related inteface, for now we have't fully implemented
the way to expand and evalute macros at runtime. We just deal with some macros that can be expand and evaluate into essential constants that will be needed later.
2. rearrange utility functions in a different order
3. reimplment the get register API to make it more commonly used

Signed-off-by: Gao Jiawei <gaojiawei@xiaomi.com>
2024-11-20 09:04:22 +08:00
Gao Jiawei
76db3c8939 enable stack trace printing on excpetion
Signed-off-by: Gao Jiawei <gaojiawei@xiaomi.com>
2024-11-20 09:04:22 +08:00
anjiahao
e0bea987d1 gdb python plugin:support dump list member
Signed-off-by: anjiahao <anjiahao@xiaomi.com>
2024-11-20 09:04:22 +08:00
anjiahao
daac426f79 gdb python plugin:add hexdump command support
hexdump useful to debug

format such as:

(gdb) hexdump 0x0062fd30 500
0062fd30  73 68 6f 77 5f 76 61 72 69 61 62 6c 65 3a 20 45  show_variable: E
0062fd40  52 52 4f 52 20 56 61 72 69 61 62 6c 65 3d 25 73  RROR Variable=%s
0062fd50  20 68 61 73 20 74 68 65 20 77 72 6f 6e 67 20 76   has the wrong v
0062fd60  61 6c 75 65 0a 00 6f 73 74 65 73 74 5f 6d 61 69  alue..ostest_mai
0062fd70  6e 2e 63 00 73 68 6f 77 5f 76 61 72 69 61 62 6c  n.c.show_variabl
0062fd80  65 3a 20 45 52 52 4f 52 20 56 61 72 69 61 62 6c  e: ERROR Variabl
0062fd90  65 3d 25 73 20 68 61 73 20 61 20 76 61 6c 75 65  e=%s has a value
0062fda0  20 77 68 65 6e 20 69 74 20 73 68 6f 75 6c 64 20   when it should
0062fdb0  6e 6f 74 0a 00 73 68 6f 77 5f 76 61 72 69 61 62  not..show_variab

Signed-off-by: anjiahao <anjiahao@xiaomi.com>
2024-11-20 09:04:22 +08:00
anjiahao
635e324e9a gdb/thread.py:simplify the logic of nxsetregs
Signed-off-by: anjiahao <anjiahao@xiaomi.com>
2024-11-20 09:04:22 +08:00
wangmingrong
8eb1047595 gdb python tools: fix command "info thread" echo error
Signed-off-by: wangmingrong <wangmingrong@xiaomi.com>
2024-11-20 09:04:22 +08:00
anjiahao
eccd26a162 gdb/thread.py:Print colorful
Signed-off-by: anjiahao <anjiahao@xiaomi.com>
2024-11-20 09:04:22 +08:00
anjiahao
5aaa31337a gdb/thread.py:fix a bug when use 'up' then use 'thread'
Python Exception <class 'gdb.error'>: Attempt to assign to an unmodifiable value.
Python Exception <class 'gdb.error'>: Error occurred in Python: Attempt to assign to an unmodifiable value.
Error occurred in Python: Error occurred in Python: Attempt to assign to an unmodifiable value.

Signed-off-by: anjiahao <anjiahao@xiaomi.com>
2024-11-20 09:04:22 +08:00
anjiahao
2292a36983 gdb/thread.py:change show gdb index/tid/pid format
Signed-off-by: anjiahao <anjiahao@xiaomi.com>
2024-11-20 09:04:22 +08:00
anjiahao
852e683fa3 python/gdb:fix use thread command on running task bug
Signed-off-by: anjiahao <anjiahao@xiaomi.com>
2024-11-20 09:04:22 +08:00
ligd
5c939d8140 gdb: devide tid & pid, add holder logout when waiting mutex
Signed-off-by: ligd <liguiding1@xiaomi.com>
2024-11-20 09:04:22 +08:00
raiden00pl
7e42ca2538 boards/stm32: split nucleo-f4x1re into separate boards
Split nucleo-f4x1re into nucleo-f401re and nucleo-f411re.
These are separate boards and should be in separate directories as it's
done for all other nucleo boards in NuttX
2024-11-19 13:28:42 +01:00
hujun5
19b4911d7f arch: remove up_current_regs in common code
reason:

When entering an exception or interrupt, there are two sets of registers:
one is the "running regs", which we need to save,
and the other is the "ready to running regs", which we may soon use.
For consistency in logic, we can always store the "running regs" in the regs field of g_running_tasks,
otherwise it may lead to errors in the storage location of the "running regs."

When we need to access the "running regs," we should uniformly retrieve them from the regs field of g_running_tasks.

As the next step, we will rename the set_current_regs/up_current_regs functions
for each architecture to more appropriate names, solely for the purpose of identifying interrupts.

Signed-off-by: hujun5 <hujun5@xiaomi.com>
2024-11-15 18:25:35 +08:00
wangmingrong1
17ce9b86c1 gcov: Correct existing gcov configuration
1. add CONFIG_COVERAGE_ALL to replace CONFIG_SCHED_GCOV_ALL
2. Correct all SCHED_GCOV, SCHED_GCOV_ALL

Signed-off-by: wangmingrong1 <wangmingrong1@xiaomi.com>
2024-11-15 01:05:16 +08:00
xuxin19
d2a7e454bb build(qemu):add a qemu compilation configuration with application
enable various types of common applications and libraries, and enable CMake CI checks.
To avoid regression issues in the build system

Signed-off-by: xuxin19 <xuxin19@xiaomi.com>
2024-11-14 22:50:49 +08:00
anjiahao
6554ed4d66 get g_tcbinfo just use elf memory
g_tcbinfo is const data, thus elf memmory is more reliable than other
method in case of corruption etc.

Signed-off-by: anjiahao <anjiahao@xiaomi.com>
2024-11-14 13:30:34 +08:00
xuxingliang
c5276f4244 gdbserver.py: add arm64 support
Use struct.unpack_from to eliminate the need to specify data size.

Signed-off-by: xuxingliang <xuxingliang@xiaomi.com>
2024-11-14 13:30:34 +08:00
xuxingliang
3bfeddcbdd gdbserver.py: add back 64bit support
Original code from https://github.com/apache/nuttx/pull/12469

Accidently removed during merge.

Signed-off-by: xuxingliang <xuxingliang@xiaomi.com>
2024-11-14 13:30:34 +08:00
Davi Diogo
d6a73a46e8 riscv/espressif/bootloader/mcuboot: Sign image with MCUBoot version
Add version signature to MCUBoot compatible image on espressif RISC-V architecture

Signed-off-by: Davi Diogo  <eng.davidiogo@gmail.com>
2024-11-13 20:28:17 +01:00
wangmingrong1
1d1ef52d1a arm/mps: Add a gcov functional testing configuration for mps-clang
Signed-off-by: wangmingrong1 <wangmingrong1@xiaomi.com>
2024-11-13 05:33:00 +08:00
wangmingrong1
e3917e2f09 libbuitin/compiler_rt: Supports separate builtin rt.builtins or rt.profile
Signed-off-by: wangmingrong1 <wangmingrong1@xiaomi.com>
2024-11-12 16:12:53 +08:00
f566c1a940 sim: Build quickjs with CMake 2024-11-12 12:10:42 +08:00
simbit18
2464b3207d [darwin] CI macos-14 : updated toolchains for macOS Apple Silicon
added shell script darwin_arm64.sh  for macOS Apple Silicon

updated toolchains for macOS on Apple Silicon
- arm64
- aarch64
- xpack-riscv
- xtensa-esp32
2024-11-12 00:08:38 +08:00
wangjianyu3
f41b0d00fd tools/rp2040: Building picotool if necessary
Improved
  1. The pre-installed "picotool" should not depend on `PICO_SDK_PATH`

  2. Perhaps we should compile "picotool" from `PICO_SDK_PATH` if it was not found in $PATH

Tests
  1. The "picotool" is pre-installed or built from `PICO_SDK_PATH`

     LD: nuttx
     Generating: nuttx.uf2
     Done.

  2. `PICO_SDK_PATH` is specified but "picotool" is not installed

     LD: nuttx
     Building: picotool
     Generating: nuttx.uf2
     Done.

  3. Neither "picotool" nor `PICO_SDK_PATH` are installed/specified

     LD: nuttx
     PICO_SDK_PATH/picotool must be specified/installed for flash boot

Signed-off-by: wangjianyu3 <wangjianyu3@xiaomi.com>
2024-11-11 10:38:58 +08:00
wangmingrong1
f59edf8645 libbuiltin/Makefile: Modify the libbuiltin makefile to standard
1. bin and kbin folders are dynamically generated
2. Context comes before depend, so the bin and kbin folders are created in the context construction phase. When the depend process comes, each library is downloaded, and a relative bin/xxx and kbin/xxx directory is created for each library to place files. This is to prevent duplicate file names.

Signed-off-by: wangmingrong1 <wangmingrong1@xiaomi.com>
2024-11-10 10:19:58 +08:00
wangmingrong1
6dd313939f makefile/build: Delete unnecessary bin and kbin folders
1. Calling CLEAN on these folders did not have any effect
2. bin,kbin will be created during the context construction process

Signed-off-by: wangmingrong1 <wangmingrong1@xiaomi.com>
2024-11-10 01:18:26 +08:00
simbit18
5080ab7818 tools/ci/platforms/darwin.sh: Port NuttX CI Job to macOS-14
also  runs old CI Job macOS-13
2024-11-08 01:45:46 +08:00
simbit18
9bdc776b30 msys2: fix make[3]: warning: jobserver unavailable: using -j1.
fixed this error for msys2

====================================================================================
Configuration/Tool: nucleo-l152re/nsh,CONFIG_ARM_TOOLCHAIN_GNU_EABI
2024-11-05 06:12:26
------------------------------------------------------------------------------------
  Cleaning...
  Configuring...
make[3]: warning: jobserver unavailable: using -j1.  Add '+' to parent make rule.
make[3]: warning: jobserver unavailable: using -j1.  Add '+' to parent make rule.
make[3]: warning: jobserver unavailable: using -j1.  Add '+' to parent make rule.
make[3]: warning: jobserver unavailable: using -j1.  Add '+' to parent make rule.
make[3]: warning: jobserver unavailable: using -j1.  Add '+' to parent make rule.
make[3]: warning: jobserver unavailable: using -j1.  Add '+' to parent make rule.
make[3]: warning: jobserver unavailable: using -j1.  Add '+' to parent make rule.
make[3]: warning: jobserver unavailable: using -j1.  Add '+' to parent make rule.
make[3]: warning: jobserver unavailable: using -j1.  Add '+' to parent make rule.
2024-11-06 02:00:32 +08:00
xuxin19
480471f46c sim:support sim elf and dynamic libs package in post build
use the dynamic library .so of the binding compilation environment,
and then modify the dynamic loader of elf at runtime to run sim elf across system versions

1.add post-build for sim build
2.collect dynamic .so and dynamic interpreter
3.add execution script for the entire package sim elf

change text-segment to 0x50000000
because patchelf will modify the .dynamic section in elf,
the upward alignment of elf will be less than 0x3fffffff,
which will cause asan shadow memory overlap error

Signed-off-by: xuxin19 <xuxin19@xiaomi.com>
2024-11-06 01:56:44 +08:00
simbit18
3c4053a385 macos : fix “sed: -I or -i may not be used with stdin”
tools/Unix.mk
added $(call DELFILE, .config.backup)

tools/process-config.sh
sed-i -> sed -i.backup
2024-11-04 22:40:29 +08:00
xuxin19
1fb8a64299 cmake:add cmake host tool mkdeps incdir
Signed-off-by: xuxin19 <xuxin19@xiaomi.com>
2024-10-31 17:55:13 +08:00
haopengxiang
417f5f425b tools/mkdeps: increase MAX_BUFFER from 16384 to 65536
Signed-off-by: haopengxiang <haopengxiang@xiaomi.com>
2024-10-31 08:55:07 +08:00
xuxin19
92dddcda8a tools/refresh.sh:skip config check on debug configs
Signed-off-by: xuxin19 <xuxin19@xiaomi.com>
2024-10-30 22:14:40 +08:00
xuxin19
4595f9388f tools/Unix.mk:make incdir precedence over other targets
Make.defs need incdir at the very beginning.
fix error such as `make menuconfig` `make oldconfig` etc.

Signed-off-by: xuxin19 <xuxin19@xiaomi.com>
2024-10-30 22:14:40 +08:00
wangmingrong1
8461f0ea54 clang: Support compiling rt.profile library
1. Since the implementation of gcov has changed since clang17, versions before clang17 need to use the libunwind.a file

Signed-off-by: wangmingrong1 <wangmingrong1@xiaomi.com>
2024-10-30 17:10:23 +08:00
wangmingrong1
e3d7d23618 gcov: Fix typographical errors
1. CONFIG_ARCH_COVERAGE has been replaced by CONFIG_SCHED_GCOV
2. Delete the SIM-specific GCOV_ALL configuration and change it to a universal configuration for all architectures

Signed-off-by: wangmingrong1 <wangmingrong1@xiaomi.com>
2024-10-30 14:45:23 +08:00
yezhonghui
27685aa179 Fix config repeat define in include deconfig mode
Signed-off-by: yezhonghui <yezhonghui@xiaomi.com>
2024-10-30 12:29:56 +08:00
anjiahao
2dcd300a3c coredump.py:bug fix python file not have rename
tmpfile.rename(args.output)
    ^^^^^^^^^^^^^^
AttributeError: '_io.BufferedRandom' object has no attribute 'rename'. Did you mean: 'name'?

Signed-off-by: anjiahao <anjiahao@xiaomi.com>
2024-10-30 12:29:22 +08:00
wangmingrong1
240dc3d5e1 mps/clang: Add a defconfig for mps to support clang compilation
1. Enable compiler_rt library builtin function

Signed-off-by: wangmingrong1 <wangmingrong1@xiaomi.com>
2024-10-28 22:19:58 +08:00