Commit Graph

1575 Commits

Author SHA1 Message Date
zhanghongyu
404616d621 linux_Dockerfile: only copy gn binary into docker
Minimize the size of the docker image

Signed-off-by: zhanghongyu <zhanghongyu@xiaomi.com>
2023-12-11 10:46:47 +01:00
Xiang Xiao
69e413c678 ci/docker: Revert the change about gn to unblock ci
Revert "ci/docker: Fix " Could not find GN_EXECUTABLEXX using the following names: gn""
This reverts commit d6ac9e1aed.

Revert "tools/ci: Skip copy gn temporary files"
This reverts commit 4673fccece.
2023-12-10 06:39:30 -08:00
Xiang Xiao
d6ac9e1aed ci/docker: Fix " Could not find GN_EXECUTABLEXX using the following names: gn"
report here:
https://github.com/apache/nuttx-apps/actions/runs/7149109828/job/19470959712?pr=2225
regression by:
https://github.com/apache/nuttx/pull/11345

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2023-12-08 22:57:35 -08:00
Xiang Xiao
4673fccece tools/ci: Skip copy gn temporary files
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2023-12-08 16:10:17 +01:00
zhanghongyu
bc2dfe49f4 ci_sim: add matter build to the test list sim-01.dat and support cmake compilation
in order to maintain the completeness of the matter related functional code, the build of matter is added to testlist.

Signed-off-by: zhanghongyu <zhanghongyu@xiaomi.com>
2023-12-06 07:56:17 -08:00
ThomasNS
b0f245b33f upgrade to gcc 12 in docker 2023-12-06 07:47:34 -08:00
zhanghongyu
4087e21dea ci_sim01: install g++-multilib into docker to support libcxx
fix build break:
/usr/bin/ld: skipping incompatible /usr/lib/gcc/x86_64-linux-gnu/11/libstdc++.so when searching for -lstdc++
/usr/bin/ld: skipping incompatible /usr/lib/gcc/x86_64-linux-gnu/11/libstdc++.a when searching for -lstdc++
/usr/bin/ld: cannot find -lstdc++: No such file or directory
/usr/bin/ld: skipping incompatible /usr/lib/gcc/x86_64-linux-gnu/11/libstdc++.so when searching for -lstdc++
collect2: error: ld returned 1 exit status
ninja: build stopped: subcommand failed.

Signed-off-by: zhanghongyu <zhanghongyu@xiaomi.com>
2023-12-06 06:20:05 +01:00
zhanghongyu
c17fcb5ddd ci_sim: the version of nodejs obtained by apt install is too low
so using npm to upgrade the nodejs tool to the latest

Signed-off-by: zhanghongyu <zhanghongyu@xiaomi.com>
2023-12-04 11:25:40 -08:00
chenrun1
eee3af93ff tools/Unix.mk:Security Checks and Windows Native Compilation Enhancements
Avoid splicing paths to /include when BOARD_COMMON_DIR does not exist
and enhanced Windows native compilation

Signed-off-by: chenrun1 <chenrun1@xiaomi.com>
2023-12-04 07:07:08 -08:00
chenrun1
e4b561d51b sh:Enhanced compilation system
In this change, if board/include and board/script are not found, they will be looked for again in the upper level of common.

Signed-off-by: chenrun1 <chenrun1@xiaomi.com>
2023-12-04 07:07:08 -08:00
zhanghongyu
a18a0d20eb ci_sim: the version of gn obtained by apt install is too low
so dynamically download and install the latest gn tools

Signed-off-by: zhanghongyu <zhanghongyu@xiaomi.com>
2023-12-04 03:58:27 -08:00
zhanghongyu
e0df6dd22e ci_sim: add the tools needed at matter compile
add the tools needed for the compilation environment and docker first, then add matter compilation to cilist

Signed-off-by: zhanghongyu <zhanghongyu@xiaomi.com>
2023-12-04 00:33:54 -08:00
Michal Lenc
e852f28710 ci: add open_memestream CI test
CI test for open_memestream() stdio function was added.

Signed-off-by: Michal Lenc <michallenc@seznam.cz>
2023-11-29 02:13:19 -08:00
Xiang Xiao
a28ad5299a tools/ci: Upgrade macOS arm64 toolchain to 12.3.rel1
and enable arm64 ci build on macOS

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2023-11-26 14:10:00 +02:00
Xiang Xiao
d30daa54b0 tools/ci: Upgrade clang arm toolchain to 17.0.1
from https://github.com/ARM-software/LLVM-embedded-toolchain-for-Arm/releases/tag/release-17.0.1

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2023-11-26 12:49:55 +01:00
SPRESENSE
6ba30033b3 libm: Fix an issue that public header files are not exported
Fix an issue that math library header files are not exported by make export.
Create symbolic links of libmcs, newlib and openlibm header to nuttx/include.
2023-11-23 16:32:53 +01:00
anjiahao
749655d785 tcbinfo:remove total_num form tcbinfo.
total_num is not required
test:

make -f tools/Makefile.host
cp tools/jlink-nuttx /opt/SEGGER/JLink_V786a/libnuttxplugin.so
JLinkGDBServer -if SWD -speed 5000 -device STM32F429ZI -NoGui 1 -rtos libnuttxplugin

can run normally

Signed-off-by: anjiahao <anjiahao@xiaomi.com>
2023-11-21 21:52:24 -08:00
Masayuki Ishikawa
194af23d1b Revert "tools/ci: Skip build sabre-6quad:libcxx temporarily"
This reverts commit 65e2a68e48.

Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
2023-11-15 03:52:26 -08:00
Masayuki Ishikawa
5f15c73219 Documentation, tools: Bump xpack-riscv-none-elf-gcc to 12.3.0-2
Summary:
- Upgraded to xpack-riscv-none-elf-gcc-12.3.0-2 to resolve symbol recognition
  issues in riscv-none-elf-gdb, as reported in
  https://github.com/xpack-dev-tools/riscv-none-elf-gcc-xpack/issues/22.

Impact:
- Expected to enhance toolchain stability with no negative side effects.

Testing:
- Verified with rv-virt:netnsh and rv-virt:netnsh64 configurations

Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
2023-11-14 12:33:36 +01:00
simbit18
1bcf01e7a8 Add CONFIG_EXPERIMENTAL for configure windows native
Add CONFIG_EXPERIMENTAL for configure windows native
2023-10-31 09:03:02 +08:00
raiden00pl
5b87fdfb9d Documentation: remove all migrated READMEs 2023-10-29 21:03:54 -03:00
liqinhui
41762eb187 simwifi: host wlan0 obtains ip and set dns for wlan0 in the defwan wlan0
Signed-off-by: liqinhui <liqinhui@xiaomi.com>
2023-10-27 22:28:01 +08:00
Michal Lenc
51bae917b7 ci: add fmemopen test and merge fopencookie and fmemopen to stdio test
CI test for fmemopen() function was added. The test was merged with
fopencookie interface test and merged into single test_stdio.

Signed-off-by: Michal Lenc <michallenc@seznam.cz>
2023-10-27 08:55:24 +08:00
simbit18
9c984bbe5c tools/sethost.sh: add MSYS2 MSYS environment
add MSYS2 MSYS environment
2023-10-27 01:21:10 +08:00
xuxin19
906699e0a5 ci:enable RISC-V qemu cmake build ci
Signed-off-by: xuxin19 <xuxin19@xiaomi.com>
2023-10-26 21:01:46 +08:00
simbit18
6c4c09eb44 tools/cfgdefine.c: Resolve compile warning array subscript has type ‘char’
In file included from cfgdefine.c:26:
cfgdefine.c: In function ‘skip_space’:
cfgdefine.c:91:26: warning: array subscript has type ‘char’ [-Wchar-subscripts]
   91 |   while (*ptr && isspace(*ptr)) ptr++;
      |                          ^~~~
cfgdefine.c: In function ‘find_name_end’:
cfgdefine.c:99:27: warning: array subscript has type ‘char’ [-Wchar-subscripts]
   99 |   while (*ptr && (isalnum(*ptr) || *ptr == '_')) ptr++;
      |                           ^~~~
cfgdefine.c: In function ‘find_value_end’:
cfgdefine.c:107:27: warning: array subscript has type ‘char’ [-Wchar-subscripts]
  107 |   while (*ptr && !isspace(*ptr))
      |                           ^~~~
cfgdefine.c:116:45: warning: array subscript has type ‘char’ [-Wchar-subscripts]
  116 |           do ptr++; while (*ptr && !isspace(*ptr) && *ptr != '"');
      |
2023-10-26 00:10:57 +08:00
Michal Lenc
2d8fc9522f ci: add error status check for ostest
ostest should return OK (0) if successful.

Signed-off-by: Michal Lenc <michallenc@seznam.cz>
2023-10-19 21:39:24 +08:00
Michal Lenc
f43701c7c9 ci: fix file system CI test
File system 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 FS test.

Signed-off-by: Michal Lenc <michallenc@seznam.cz>
2023-10-19 21:39:24 +08:00
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