Commit Graph

1622 Commits

Author SHA1 Message Date
Yanfeng Liu 3451330000 tools/configure.sh: support listing configs for board
This patch supports listing configs for a given board like

- `tools/configure.sh -L sama5`
- `tools/configure.sh -L rv-virt`
- `tools/configure.sh -L virt`

Signed-off-by: Yanfeng Liu <yfliu2008@qq.com>
2024-04-14 14:44:48 +08:00
vela-mib 9a4afbcb62 add drivertest test cases on sim for CI
Signed-off-by: vela-mib <vela-mib@xiaomi.com>
2024-04-11 10:33:15 -03:00
vela-mib 9847c6219d add libuv and cmocka test cases with file system on sim and qemu on CI
Signed-off-by: vela-mib <vela-mib@xiaomi.com>
2024-04-10 14:46:53 +08:00
W-M-R 0ede3fc377 kasan: Implementing global variable out of bounds detection
Extracting global variable information using scripts:
kasan_global.py:
1. Extract the global variable information provided by the -- param asan globals=1 option
2. Generate shadow regions for global variable out of bounds detection
Makefile:
1. Implement multiple links, embed the shadow area into the program, and call it by the Kasan module

Signed-off-by: W-M-R <mike_0528@163.com>
2024-04-07 23:31:13 +08:00
chao an e552a3faa5 ci/darwin: remove codechecker from install list
ERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts.
codechecker 6.23.1 requires PyYAML==6.0.1, but you have pyyaml 5.4.1 which is incompatible.

Signed-off-by: chao an <anchao@lixiang.com>
2024-04-02 15:42:32 +08:00
Yanfeng Liu c3f30d70cb tools/minidumpserver: support multiple ELF files
This adds support for multiple ELF files so that to help Kernel build
dump analysis with both nuttx and app ELF files.

Signed-off-by: Yanfeng Liu <yfliu2008@qq.com>
2024-03-28 09:33:33 +08:00
simbit18 391badcb24 tools/ci/testlist/macos.dat: fix path esp32c3-legacy
find: boards/risc-v/esp32c3/esp32c3-devkit/configs/cxx: No such file or directory
find: boards/risc-v/esp32c3/esp32c3-devkit/configs/wifi: No such file or directory
2024-03-22 13:20:02 +08:00
Xiang Xiao d680ba47c4 Move video_controls.h from include/nuttx/video to include/sys
The video_controls.h is a public header file, and it is used by
videoio.h. So it should be moved to the include/sys directory.

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2024-03-21 19:23:53 +08:00
vela-mib 8ff3b90742 add open posix test cases on qemu and sim on CI
Signed-off-by: vela-mib <vela-mib@xiaomi.com>
2024-03-21 18:42:47 +08:00
simbit18 e622e95d5b tools/ci/platforms/darwin.sh: Removed pyyaml folder
add rm -rf pyyaml
2024-03-20 16:22:26 +08:00
simbit18 21572864e7 Minor improvement for tools/ci: Fixed cmake build of bloaty and installation in darwin.sh script.
function bloaty() Add  -D CMAKE_INSTALL_PREFIX="${NUTTXTOOLS}"/bloaty.
Improves workflow execution time because it is now cached.

Changed reference file to calculate the hash for key of actions/cache@v4. Now it is darwin.sh.
2024-03-19 20:52:40 +08:00
Philippe Leduc a7389c0057 Fix: typo in the if condition. 2024-03-19 18:04:18 +08:00
wangmingrong 52a349ab13 memdump: Enhance memdump
The method of passing in parameters to memdump is modified and the
incoming address is added. After traversing the node to which the
address belongs, the memdump command will end.

Signed-off-by: wangmingrong <wangmingrong@xiaomi.com>
2024-03-15 17:46:48 +08:00
Philippe Leduc ac7433eb5a Fix export: startups files are not added at link step
Add variables that describe NuttX current build (board, arch, chip)
2024-03-15 17:40:50 +08:00
wangmingrong d4b5991589 libcxxabi: Path <cxxabi.h> not found
./helloxx_main.cxx:29:10: fatal error: cxxabi.h: No such file or directory
   29 | #include <cxxabi.h>
      |          ^~~~~~~~~~
CONFIG_LIBCXXABI is turned on, but the library include is not linked to nuttx/include, causing the compilation to fail.

Signed-off-by: wangmingrong <wangmingrong@xiaomi.com>
2024-03-14 22:47:55 +08:00
Alan Carvalho de Assis 73576e0d02 Fix cmake-format wrong execution order 2024-03-12 20:03:15 +08:00
Marco Casaroli 9af8299af5 arch/esp32 add config for qemu-openeth 2024-03-12 08:31:06 -03:00
Yanfeng Liu 836715a2d6 tools/minidumpserver.py: support quit with gdb
This patch supports quiting of minidumpserver along with gdb so that
to reduce usage efforts.

Signed-off-by: Yanfeng Liu <yfliu2008@qq.com>
2024-03-11 20:59:07 +08:00
Yanfeng Liu 2f4e90b1e9 tools/minidumpserver.py: add support for rv64
This patch adds rv64 targets support and checked with gdb-multiarch
on Ubuntu. It also marks `-arch` parameter optional as it often can
be learnt from ELF file.

Signed-off-by: Yanfeng Liu <yfliu2008@qq.com>
2024-03-10 21:25:00 +08:00
Philippe Leduc 8de922186e Exported CMake toolchain file is broken when the target is linked against NuttX and another library that shall also be linked against NuttX too.
Fix: ensure that NuttX libraries are linked at the end as they are the root of linkage dependency tree.
2024-03-04 20:38:37 +08:00
simbit18 1cd8413d19 tools/ci/platforms/darwin.sh: fix mkdir: wamrc: File exists
mkdir wamrc -> mkdir -p wamrc
2024-03-03 02:30:54 +08:00
Marco Casaroli 4c27036ea8 Add apps-or-nuttx-Make.defs
This is a wrapper for apps/Make.defs or nuttx/Make.defs

Since apps/Make.defs include nuttx/Make.defs, we check if it the
apps dir is available and include it, otherwise we just include
nuttx/Make.defs and keep the old behavior.

This allows EXTRA_LIBS and some other system-wide tweaks be
applied in any apps and make it work with the nuttx Makefiles.
2024-03-01 12:59:16 -03:00
simbit18 fd86cf70cc tools/ci: Modify cibuild.sh to adapt to new platforms.
cibuild.sh -> modify scripts
platforms -> new folder +scripts
add header

tools/ci/platforms: Set the execute permissions on the updated files.

tools/ci/platforms/linux.sh: fix header

Corrected Apache Foundation copyright header.

tools/ci: Modify cibuild.sh to adapt to new platforms.

cibuild.sh -> modify scripts
platforms -> new folder +scripts
add header

tools/ci/platforms: Set the execute permissions on the updated files.

tools/ci: Modify cibuild.sh to adapt to new platforms.

cibuild.sh -> modify scripts
platforms -> new folder +scripts
add header

tools/ci/platforms: Set the execute permissions on the updated files.

tools/ci: Kept the common code in cibuild.sh.

Kept the common code in cibuild.sh.

tools/ci: Storing all Environment Variables in env.sh script.

Added in cibuild.sh this command "source "${CIWORKSPACE}"/tools/env.sh" to activate installed tools.

tools/ci: shared the tools path in cibuild.sh

Added in cibuild.sh enviroment variable "NUTTXTOOLS" for installed tools.

Removed bashisms from scripts darwin.sh, linux.sh, msys2.sh and ubuntu.sh.

tools/ci: Fixed build problems with macOS

Fix Error: /Users/runner/work/nuttx/nuttx/sources/tools/bloaty-src/build is not a directory
2024-03-01 21:30:03 +08:00
chao an 09aede87ee tools/nxstyle: add infineon prefix into ignore list
add infineon prefix into ignore list to avoid nxstyle warning

Signed-off-by: chao an <anchao@lixiang.com>
2024-02-21 21:39:19 -08:00
chao an e11c793b33 toolchain/tasking: add dependencies rules for tasking compiler
Tasking compiler uses customized compilation options for generating dependencies files

Signed-off-by: chao an <anchao@lixiang.com>
2024-02-19 03:36:43 -08:00
Petro Karashchenko 9feac3b644 Revert "citest/sim01: disable sim:libcxxtest on macOS"
This reverts commit 1ecd78f5cc.
2024-02-16 10:42:23 -08:00
Yanfeng Liu 1ecd78f5cc citest/sim01: disable sim:libcxxtest on macOS
There have been errors like below on macOS for sim:libcxxtest

```
Error: /Applications/Xcode.../include/mach/vm_page_size.h:59:44:
error: expected ';' after top level declarator
```
This patch tries to disable that check on macOS.

Signed-off-by: Yanfeng Liu <yfliu2008@qq.com>
2024-02-15 06:15:24 -08:00
SPRESENSE 3ff9432975 tools/cxd56: Update to output bss-only section to spk file
In creating spk image, the section which filesz is 0 is ignored,
so change to check memsz instead of filesz.
2024-02-05 05:53:51 -08:00
Theo 26f0a52059 Add a cmake variable so external project can detect nuttx is used. 2024-01-29 06:29:37 -08:00
yangjian11 b3b8ec35a6 tools/nxstyle: can use ',' in the string when declaring it
Signed-off-by: yangjian11 <yangjian11@xiaomi.com>
2024-01-26 06:12:48 -08:00
Almir Okato f8b0b06b97 esp32c3-generic: add simple boot support
The Simple Boot feature for Espressif chips is a method of booting
that doesn't depend on a 2nd stage bootloader. Its not the
intention to replace a 2nd stage bootloader such as MCUboot and
ESP-IDF bootloader, but to have a minimal and straight-forward way
of booting, and also simplify the building.

This commit also makes this bootloader configuration as default
for esp32c3-generic target and removes the need for running
'make bootloader' command for it.

Signed-off-by: Almir Okato <almir.okato@espressif.com>
2024-01-23 04:09:25 -08:00
Yanfeng Liu 4c41d84d21 tools/export: add hello_zig support in kernel mode for linux host
Signed-off-by: Yanfeng Liu <yfliu2008@qq.com>
2024-01-19 01:09:46 -08:00
zhanghongyu b3dcebce07 linux/Dockerfile: Add the python3 coloredlogs package for the matter build
Depend on this package when we compile using the build_examples.py script that comes with matter.

Signed-off-by: zhanghongyu <zhanghongyu@xiaomi.com>
2024-01-10 09:47:54 -08:00
fangxinyong f2bcb0d2d8 tools/ci: revert tmp change
for apache/nuttx#11498 to pass ci, need revert after all commits are merged

Signed-off-by: fangxinyong <fangxinyong@xiaomi.com>
2024-01-10 01:58:53 -08:00
fangxinyong c479ccb8aa sched: move etc romfs mount from nsh to sched/init
Usually the startup script is placed under /etc. The contents of the etc directory
are compiled and linked with Nuttx binary in the form of romfs. After startup,
it will be  mounted by Nsh.

etc is generated by the different boards, that use genromfs and xxd tools to generate
and compile it into the Nuttx, for example: boards/arm/at32/at32f437-mini/tool/mkromfs.sh
The more common method is etc image generated from the content in the corresponding
board/arch/board/board/src/etc directory, and added by Makefile for example:
boards/sim/sim/sim/src/etc.

But in kernel/protected mode, Nuttx kernel and apps are run in different privileged/
non-privileged mode or the isolated binarys, so as that nsh should use syscall to
access Nuttx kernel by exported API. In this scenario, nsh can not mount the etc image
content, because that is generated in board and as a part of Nuttx kernel.

changes:

- move etc romfs mount from nsh to Nuttx, but keep the script to parse and execute.
- move and rename the related CONFIG, move customized nsh_romfsimg.h to etc_romfs.c
  in boards, and no need declaration for romfs_img/romfs_img_len.

This commit changes and updates all configurations in Nuttx arch/board as much as possible,
but if any missing, please refer to the following simple guide:

- rename CONFIG_NSH_ROMFSETC to CONFIG_ETC_ROMFS, and delete CONFIG_NSH_ARCHROMFS in defconfig
- rename the etc romfs mount configs, for example CONFIG_NSH_FATDEVNO to CONFIG_ETC_FATDEVNO
- move customized nsh_romfsimg.h to etc_romfs.c in board/arch/board/board/src and no need
  declaration for romfs_img/romfs_img_len.
- delete default nsh_romfsimg.h, if ROMFSETC is enabled, should generate and compile etc_romfs.c
  in board/arch/board/board/src.

Signed-off-by: fangxinyong <fangxinyong@xiaomi.com>
2024-01-09 21:29:46 -03:00
simbit18 eaf1d07809 tools/ci: add initial support for MSYS2
removed uname from msys2 job
2024-01-09 05:50:09 -08:00
simbit18 8b0bc64903 tools/link.sh: fix an incorrect variable
fix ${desg} ->  ${dest}
2024-01-08 19:46:59 -03:00
yinshengkai 97096bed83 libs: fix the problem that the address obtained in thumb mode cannot be executed.
The lowest bit of the thumb instruction is 1 by default, which is used to distinguish arm instructions and thumb instructions.
Fixed the problem of misalignment of symbol table when performing binary search

In arm, the lowest bit of the instruction is 1, which is a thumb instruction, and 0, which is an arm instruction.
The nm command was used in mkallsym.sh before, and the result it will return will set the lowest bit of the thumb instruction to 0. There will be a one-byte deviation during binary search, so mkallsyms.py will also set the lowest bit to 0 according to the previous format.
```sh
arm-none-eabi-nm -Cn nuttx | grep hello
0801c384 T hello_main
arm-none-eabi-objdump nuttx -t |grep hello
0801c384 g F .text 0000004c hello_main
arm-none-eabi-readelf nuttx -s |grep hello
4558: 0801c385 76 FUNC GLOBAL DEFAULT 1 hello_main
```

However, in the following case, when you need to find the function address according to the symbol name and execute the corresponding function, the lowest address obtained is 0. It will follow the arm instruction, causing an exception.
```c
void sym_test(void)
{
   printf("call sym_test\n");
}

int main(int argc, FAR char *argv[])
{
   FAR void *addr = sym_test;
   printf("sym_test:%p %pS\n",addr, addr);
   printf("sym_test - 1: %pS\n", (char *)addr - 1);
   printf("sym_test + 1: %pS\n", (char *)addr + 1);

   size_t size;
   void (*func)(void);
   const struct symtab_s *sym = allsyms_findbyname("sym_test", &size);
   printf("sym_test:%p %pS\n",sym, sym);
   func = sym->sym_value;
   func();

   return 0;
}
```

Therefore, you need to change mkallsyms.py back to the correct result and correct the binary search.

Signed-off-by: yinshengkai <yinshengkai@xiaomi.com>
2024-01-04 09:22:57 -08:00
yinshengkai 9d436b624b tools: support sorting symbol tables by name
Signed-off-by: yinshengkai <yinshengkai@xiaomi.com>
2024-01-04 09:22:57 -08:00
xuxin19 1768e7868b tools/Unix.mk:change `incdir` to a Make target
after the CI environment is upgraded to Ubuntu 22 and GNU make is upgraded to 4.3,
`warning: jobserver unavailable: using -j1.  Add '+' to parent make rule.` warning appears.
this because when executing a shell in Make, the new shell created will not inherit the parallel environment of the parent shell(jobserver).

in our case:
```
$ make olddefconfig

this execute into Unix.mk twice,
because it will call make clean_context in its target

olddefconfig:
	$(Q) $(MAKE) clean_context
```
We replace the shell call with the target of the Makefile

Signed-off-by: xuxin19 <xuxin19@xiaomi.com>
2023-12-28 10:56:01 -08:00
xuxin19 7207e5d1e9 tools/ci:enable arm64 CMake ci build
Signed-off-by: xuxin19 <xuxin19@xiaomi.com>
2023-12-27 07:27:17 -08:00
xuxin19 274bff234a tool/Config.mk:use bash with or without verbosity enabled
Signed-off-by: xuxin19 <xuxin19@xiaomi.com>
2023-12-21 03:45:52 -08:00
xuxin19 1c9fab65d8 Revert "testlist: Disable sim:matter ci temporarily"
restart sim:matter ci

This reverts commit 17458c7dba.
2023-12-18 20:38:10 -08:00
Xiang Xiao b68aa89e56 tools/ci: Upgrade riscv toolchain to v13.2.0
from https://github.com/xpack-dev-tools/riscv-none-elf-gcc-xpack/releases/tag/v13.2.0-2

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2023-12-17 18:25:24 +01:00
Xiang Xiao dc1a2135de tools/ci: Upgrade arm/arm64 toolchain to 13.2.Rel1
from https://developer.arm.com/downloads/-/arm-gnu-toolchain-downloads

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2023-12-17 17:33:08 +01:00
Xiang Xiao 17458c7dba testlist: Disable sim:matter ci temporarily
utils cmake build file can work with libcxx 17.0.6

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2023-12-17 03:39:26 -08:00
simbit18 c494ce4a96 Update kconfig2html.c
Fix nuttx coding style
2023-12-14 20:02:52 -08:00
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