Commit Graph

1563 Commits

Author SHA1 Message Date
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
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