This provides a capable bootloader that may be run from OCRAM.
The OCRAM contains regions that are always zero, so the linker
file avoids those with best effort.
iMX9 infrastructure expects:
- 0x20480000 (Start of OCRAM, AHAB)
- 0x2049a000 (NuttX or SPL)
- 0x204e0000 (ARM Trustzone, not used)
When started from SD-card, the offsets are:
- 0x1f000 with AHAB
- 0xa000 without AHAB
Signed-off-by: Eero Nurkkala <eero.nurkkala@offcode.fi>
fix CI compilation errors:
github/workspace/sources/apps/database/sqlite/sqlite/configure: line 5204: /usr/bin/file: No such file or directory
/github/workspace/sources/apps/database/sqlite/sqlite/configure: line 10376: tclsh: command not found
/github/workspace/sources/apps/database/sqlite/sqlite/configure: line 10812: tclsh: command not found
/github/workspace/sources/apps/database/sqlite/sqlite/configure: line 10826: tclsh: command not found
configure: WARNING: Can't find Tcl configuration definitions
configure: WARNING: *** Without Tcl the regression tests cannot be executed ***
configure: WARNING: *** Consider using --with-tcl=... to define location of Tcl ***
make[4]: warning: -j0 forced in submake: resetting jobserver mode.
/github/workspace/sources/apps/database/sqlite/sqlite/tool/cktclsh.sh: 5: tclsh: not found
make[4]: *** [Makefile:793: has_tclsh84] Error 1
make[4]: Target 'sqlite3.c' not remade because of errors.
make[3]: *** [Makefile:52: context] Error 2
make[2]: *** [Makefile:53: /github/workspace/sources/apps/database/sqlite_context] Error 2
make[2]: Target 'context_all' not remade because of errors.
make[1]: *** [Makefile:175: context] Error 2
make: *** [tools/Unix.mk:452: /github/workspace/sources/apps/.context] Error 2
Signed-off-by: yinshengkai <yinshengkai@xiaomi.com>
This patch fixes the issue reported by PR #12345 where the file
path existent in the second line of each source file on NuttX.
Sometimes the path could be too long and could raise a nxstyle
issue during the CI test.
Signed-off-by: Alan C. Assis <acassis@gmail.com>
* Extends tools/configure.sh default appdir search paths.
* Search for apps in ../nuttx-apps and ../nuttx-apps.git locations.
* This allows -a parameter skip when nuttx-apps or nuttx-apps.git is used.
Signed-off-by Tomasz 'CeDeROM' CEDRO <tomek@cedro.info>
This fixes names of program entry and linker script files so that to
support building kernel mode apps using CMake and export package.
flat and protected mode should be the same as before.
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 removes deprecated code and makes this bootloader
configuration as default for esp32s3 targets and removes the need
for running 'make bootloader' command for it.
Other related fix, but not directly to Simple Boot:
- Instrumentation is required to run from IRAM to support it during
initialization. `is_eco0` function also needs to run from IRAM.
- `rtc.data` section placement was fixed.
- Provide arch-defined interfaces for efuses, in order to decouple
board config level from arch-defined values.
Signed-off-by: Almir Okato <almir.okato@espressif.com>
This disables the leading spaces removal for block comments to
avoid changing well-formatted blocks.
Based on test with uncrusity 0.72.0+dfsg1-2 on Ubuntu 22.04, the
leading spaces of block comment lines are unexpectedly removed by
current version w/o this patch.
Signed-off-by: Yanfeng Liu <yfliu2008@qq.com>
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>
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>
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>
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>
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
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>
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.
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>
./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>
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>
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.
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
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 != '"');
|
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>
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>
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>
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.
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>
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>
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>
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>