Commit Graph

1547 Commits

Author SHA1 Message Date
Michal Lenc
7463052c8e ci: fix scanf CI test
Scanf CI test was not testing the correct behavior of scanf and just
checked whether program did not end with hard fault. This adds
functionality check and required configuration options to run scanf
test.

Signed-off-by: Michal Lenc <michallenc@seznam.cz>
2023-10-19 21:39:24 +08:00
Michal Lenc
6e4ffb9ea1 ci: add fopencookie test
This adds fopencookie test for simulator CI.

Signed-off-by: Michal Lenc <michallenc@seznam.cz>
2023-10-18 21:13:01 +08:00
liqinhui
d27ca03b6c wifi/simdriver: Support the sim wifi.
Add the Sim WiFi function, which can provide the wifi operating on nuttx sim emulator,
  and support two modes that simulate wifi, HWSIM and RNC(real network card).

 - In the HWSIM mode, we simulates two wlan interfaces. The wlan0 is STA and
   the wlan1 is AP. The wlan0 can connect to the wlan1 in the nuttx simulator.
 - In the RNC mode, we can use the same wlan interface name on the nuttx simulator
   to control the connection behavior of the real wireless card.

Signed-off-by: liqinhui <liqinhui@xiaomi.com>
2023-10-12 17:08:25 +08:00
TaiJu Wu
e0e6e5c2c8 fix: TreeNode has same attribute with NodeMixin
NodeMixin have attrubute called size and it is set property.
Overwrite this property by _size but it will make report incompatible.

Create a new class NuttxDictExporter to renaming _size into size.
2023-10-09 17:51:01 -04:00
anjiahao
a2c5cb729a fs:support zipfs,can mount zipfile
we can mount a zipfile in nuttx use mount command like this:

mount -t zipfs -o /data/test.zip /zip

The zipfs is a read only file system,The advantage is that it
does not occupy additional space when reading the decompressed file.

When used, reading and decompression operations are simultaneous.
The known disadvantage is that when using seek to read forward,
it will reopen and cause slow speed problems.

Signed-off-by: anjiahao <anjiahao@xiaomi.com>
2023-09-27 01:06:04 +08:00
xuxin19
ed5b3766dc tools/Unix.mk:ignore Kconfiglib menuconfig module warning
terminal character redirection will cause curselib errors.
the warning check has been completed before the menuconfig execution phase.
so lets ignored here.

Signed-off-by: xuxin19 <xuxin19@xiaomi.com>
2023-09-25 21:04:43 +08:00
Xiang Xiao
65e2a68e48 tools/ci: Skip build sabre-6quad:libcxx temporarily
since linker can't find basic_string::~basic_string() oddly:
arm-none-eabi-ld: /home/xiaoxiang/backup/os/nuttx/nuttx/staging/libxx.a(libcxx/src/locale.o): in function `__tcf_0':
/home/xiaoxiang/backup/os/nuttx/nuttx/libs/libxx/libcxx/src/locale.cpp:4941: undefined reference to `std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >::~basic_string()'

another fix is removing the follow code from _LIBCPP_STRING_V1_EXTERN_TEMPLATE_LIST and _LIBCPP_STRING_UNSTABLE_EXTERN_TEMPLATE_LIST:
_Func(_LIBCPP_FUNC_VIS basic_string<_CharType>::~basic_string()) \

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2023-09-24 08:40:10 +03:00
xinbingnan
a104fdc3a5 tools/minudumpserver: support auto start GDB and execute some commands
VELAPLATFO-16485

like
```bash
./nuttx/tools/minidumpserver.py -l log.log -e vela_ap.elf -a arm --gdb prebuilts/gcc/linux/arm/bin/arm-none-eabi-gdb -i
```

Signed-off-by: xinbingnan <xinbingnan@xiaomi.com>
2023-09-23 15:19:20 +08:00
xuxin19
8d1cb466f4 Unix.mk:replace process substitution to pipe avoid out of order
process substitution `>(..)` have different behaviors in different shells,unreliable execution order will lead to the problem of being unable to intercept errors.
pipe are used here to ensure that `kwarning` is generated before the if statement.

Signed-off-by: xuxin19 <xuxin19@xiaomi.com>
2023-09-23 15:15:22 +08:00
wangbowen6
d15a69a406 parsememdump.py: support the sequence number parse
In https://github.com/apache/nuttx/pull/9335, the sequence numbuer
is added to the memory node, the memdump log changed also, so update
the parsememdump.py script to keep in sync.

Signed-off-by: wangbowen6 <wangbowen6@xiaomi.com>
2023-09-23 15:13:00 +08:00
xuxin19
b53af5602d give a prompt when apps dir cannot be found
Signed-off-by: xuxin19 <xuxin19@xiaomi.com>
2023-09-22 21:37:30 +08:00
xinbingnan
524cb33729 tools/minudumpserver: support auto parse log file feature
VELAPLATFO-16476

1. support to extract log and list all possible dumps from a full log file

Signed-off-by: xinbingnan <xinbingnan@xiaomi.com>
2023-09-22 08:47:47 +08:00
Bowen Wang
320b73818b tools/gdb/memdump.py: fix the wrap line output indentation
1. always output the wrap line when dump main heap memory node;
2. format the memdump.py;

Signed-off-by: Bowen Wang <wangbowen6@xiaomi.com>
2023-09-21 13:49:43 +08:00
xinbingnan
4c75318778 tools/minidumpserver: refactor codes
VELAPLATFO-16411

1. refactor code style and simplify parse method
2. change mem find algorythm to bi-search

Signed-off-by: xinbingnan <xinbingnan@xiaomi.com>
2023-09-21 00:38:41 +08:00
Neale Ferguson
5d7f2fdf16 Fix loading of ET_DYN type of shared objects
* build-globals.sh
  - Only look in the nuttx for external symbols used when loading
    dynamic shared objects

* include/elf64.h
  - Correct the type of fields in the Elf64_Phdr structure

* libs/libc/dlfcn/lib_dlclose.c
  - Distinguish between ET_DYN and other objects as the former
    has both text and data in a single allocation to reserve
    GOT offsets

* libs/libc/dlfcn/lib_dlopen.c
  - Code formatting

* libs/libc/modlib/modlib_bind.c
  - Distinguish between relocation entry sizes by section type
  - Handle RELA style relocations

* libs/libc/modlib/modlib_globals.S
  - Formatting fixes
  - Symbols should not be weak - they exist or they don't

* include/nuttx/lib/modlib.h
  - Add an inidcator to module_s to distinguish between ET_DYN and other

* libs/libc/modlib/modlib_load.c
  - ET_DYN objects need to keep the relative displacement between the text
    and data sections due to GOT references from the former to the latter.
    This also implies that linking may require modification from the default
    for the shared objects being produced. For example, default alignment may
    mean nearly 64K of wasted space.

* libs/libc/modlib/modlib_unload.c
  sched/module/mod_rmmod.c
  - Distingusih between freeing of ET_DYN storage and other as the former
    is a single allocation.

* libs/libc/modlib/mod_insmod.c
  - Cater for ET_DYN objects having init and preinit sections
2023-09-20 09:35:28 -04:00
xinbingnan
75e591ae4f tools/minidumpserver: don't stop while gdb client is stopping
VELAPLATFO-16411

Signed-off-by: xinbingnan <xinbingnan@xiaomi.com>
2023-09-20 00:40:14 +08:00
Xiang Xiao
f6681218f4 ci: Update aarch64 gcc toolchain to 12.3.rel1
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2023-09-19 22:37:54 +08:00
Huang Qi
7d3f11af1f cibuild.sh: Using GCC from xPack for riscv
Signed-off-by: Huang Qi <huangqi3@xiaomi.com>
2023-09-19 12:59:48 +03:00
Huang Qi
89e409a194 tools: Switch riscv GCC to 12.3
GCC13 have compatibility issue with libcxx (need libcxx 17+).

Please refer to: https://github.com/llvm/llvm-project/issues/62396

Signed-off-by: Huang Qi <huangqi3@xiaomi.com>
2023-09-19 11:42:51 +08:00
chenxiaoyi
917764857a gdb/thread.py: fix typo
Signed-off-by: chenxiaoyi <chenxiaoyi@xiaomi.com>
2023-09-19 09:35:55 +08:00
chao an
5026a96cfa nxstyle: cleanup UTF-8 Unicode to ASCII
Signed-off-by: chao an <anchao@xiaomi.com>
2023-09-18 11:54:17 -04:00
Huang Qi
43610f75f1 tools: Use GCC 13.2 from xPack for risc-v 2023-09-18 21:25:13 +08:00
SPRESENSE
1226f3ffef tools: Remove archive lock file in make distclean
Remove temporary archive lock file (xxx.a.lock) by make distclean
because the file may be generated by archive with flock command.
2023-09-14 18:18:09 +08:00
Xiang Xiao
43af86bdfe tools/ci: Fix "flock: Command not found" on macOS
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2023-09-14 15:19:59 +08:00
Xiang Xiao
5217dd36f0 tools/ci: Unify the version print: command xxx --version
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2023-09-14 15:19:59 +08:00
yinshengkai
a0cc455922 tools: add support for merge_config
Usage example:
./tools/merge_config.py -o defconfig .config1 .config2

Signed-off-by: yinshengkai <yinshengkai@xiaomi.com>
2023-09-14 14:33:30 +08:00
yinshengkai
d0ca0d422e tools: defconfig supports the include command
We support search directory structure as follows:
Current directory
stm32/configs/common
stm32/common/configs

Signed-off-by: yinshengkai <yinshengkai@xiaomi.com>
2023-09-14 14:33:30 +08:00
chao an
9f10ddc9b0 nuttx/build: Restore ARLOCK to improve compile speed in incremental case
To solve the issue of carrying object files from previous builds,
Matias changed the archiving process to re-archive libapps.a on every compilation,
if libapps.a carries more object files, incremental compilation will waste too
many time in re-archiving, compared with the previous implement, this is a degradation
of the build system.  Referring to mature engineering projects such as cmake, if there
is configuration or source file changed, the best solution should be to reconfigure
the environment.

Revert this PR to ensure the compilation speed during incremental compilation.

|  commit 34b34e2d45 (tag: nuttx-20200914-172150)
|  Author: Matias N <matias@protobits.dev>
|  Date:   Fri Sep 11 22:31:38 2020 -0300
|
|      Fix: ensure archive files do not carry object files from prior builds
|
|      In some cases, when NuttX configuration changes and this makes the
|      object list used to build one of the .a libraries change as well,
|      since the command used to build it is "ar crs" and this simply appends
|      the list of object files, the library could still include object
|      files from prior builds. This commit modifies the ARCHIVE macro to
|      erase the .a file if it already exists.
|
|      Since in some cases this behavior was actually expected (object
|      files from a subdirectory were appended to a library created one
|      level above) I added a ARCHIVE_ADD which works as ARCHIVE did.
|
|      This change should greatly improve behavior of building after
|      configuration changes.

Testing:

sim:nsh
-------------------------------
|   Patched    |  Current
-------------------------------
|$ time make   |  $ time make
|real 0m1.270s |  real 0m1.728s
|user 0m0.971s |  user 0m1.276s
|sys  0m0.363s |  sys  0m0.530s
-------------------------------

Private project (20+ 3rd library needs archive to libapps.a)
-------------------------------
|   Patched     |  Current
-------------------------------
|$ time make    |  $ time make
|real 0m21.181s |  real 0m39.721s
|user 0m14.638s |  user 0m24.837s
|sys  0m6.919s  |  sys  0m14.394s
-------------------------------

Signed-off-by: chao an <anchao@xiaomi.com>
2023-09-12 21:55:23 +08:00
xuxin19
225bd13381 change Mac sim archive operate from replace to quick insertion
'rcS' will case files that has duplicate name been replaced.
so on the Mac platform we use 'q' instead of 'r' to achieve an
effect similar to '-P'

Signed-off-by: xuxin19 <xuxin19@xiaomi.com>
2023-09-12 16:15:19 +03:00
yinshengkai
573317cada tools: checkpach supports python files
Signed-off-by: yinshengkai <yinshengkai@xiaomi.com>
2023-09-12 16:25:45 +08:00
pengyiqiang
76c214bd00 tools/showstack: add configurable rank parameters
Signed-off-by: pengyiqiang <pengyiqiang@xiaomi.com>
2023-09-12 16:23:20 +08:00
Philippe Leduc
a7d0b6c120 Do not let CMake check the compiler with en executable as the entry point is not always main() 2023-09-12 01:17:30 +08:00
haopengxiang
ef3f807f89 tools/mkdeps: increase MAX_BUFFER/MAX_EXPAND/MAX_SHQUOTE to 16384
solve CFLAG is too long when building in deep path

Signed-off-by: haopengxiang <haopengxiang@xiaomi.com>
2023-09-09 00:47:59 +08:00
chao an
42873065a6 tools/mkexport: copy full library directly if library without path
copy full library directly if library without path

Signed-off-by: chao an <anchao@xiaomi.com>
2023-09-08 22:52:35 +08:00
yinshengkai
176668938e tools/prasetrace: remvoe function name filter
Some function names in C++ may fail to parse, and no filtering is required here.
(anonymous namespace)::pool::free(void*) [clone .constprop.0]


Signed-off-by: yinshengkai <yinshengkai@xiaomi.com>
2023-09-08 15:37:55 +03:00
chao an
664927c86e mm/alloc: remove all unnecessary cast for alloc
Fix the minor style issue and remove unnecessary cast

Signed-off-by: chao an <anchao@xiaomi.com>
2023-08-30 14:34:20 +08:00
Petro Karashchenko
03614d60ee tools/ci: ensure removing python and openssl related commands
Signed-off-by: Petro Karashchenko <petro.karashchenko@gmail.com>
2023-08-29 22:19:59 +08:00
Philippe Leduc
5dbffd01b2 Export build variables to a CMake file so that it can be imported in a generic CMake toolchain file
Add a toolchain file for CMake that can be used in the exported NuttX archive.
2023-08-29 17:35:13 +08:00
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