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>
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>
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>
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>
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>
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.
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>
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>
Avoid splicing paths to /include when BOARD_COMMON_DIR does not exist
and enhanced Windows native compilation
Signed-off-by: chenrun1 <chenrun1@xiaomi.com>
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>
add the tools needed for the compilation environment and docker first, then add matter compilation to cilist
Signed-off-by: zhanghongyu <zhanghongyu@xiaomi.com>
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.
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>
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>
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 != '"');
|