chao an
b01b93cb54
sim/wamr: add example of WAMR(WebAssembly Micro Runtime)
...
Added compilation rules to support the construction of WebAssembly(WASM/WAMR):
1. Compile Toolchain
1> Download WASI sdk and export the WASI_SDK_PATH path:
$ wget https://github.com/WebAssembly/wasi-sdk/releases/download/wasi-sdk-19/wasi-sdk-19.0-linux.tar.gz
$ tar xf wasi-sdk-19.0-linux.tar.gz
Put wasi-sdk-19.0 to your host WASI_SDK_PATH environment variable, like:
$ export WASI_SDK_PATH=`pwd`/wasi-sdk-19.0
2> Download Wamr "wamrc" AOT compiler and export to the PATH:
$ mkdir wamrc
$ wget https://github.com/bytecodealliance/wasm-micro-runtime/releases/download/WAMR-1.1.2/wamrc-1.1.2-x86_64-ubuntu-20.04.tar.gz
$ tar xf wamrc-1.1.2-x86_64-ubuntu-20.04.tar.gz
$ export PATH=$PATH:$PWD
2. Configuring and running
1> Configuring sim/wamr and compile:
nuttx$ ./tools/configure.sh sim/wamr
nuttx$ make
...
Wamrc Generate AoT: /home/archer/code/nuttx/n5/apps/wasm/hello.aot
Wamrc Generate AoT: /home/archer/code/nuttx/n5/apps/wasm/coremark.aot
LD: nuttx
2> Copy the generated wasm file(Interpreter/AoT)
nuttx$ cp ../apps/wasm/hello.aot .
nuttx$ cp ../apps/wasm/hello.wasm .
nuttx$ cp ../apps/wasm/coremark.wasm .
3> Run iwasm
nuttx$ ./nuttx
NuttShell (NSH) NuttX-10.4.0
nsh> iwasm /data/hello.wasm
Hello, World!!
nsh> iwasm /data/hello.aot
Hello, World!!
nsh> iwasm /data/coremark.wasm
2K performance run parameters for coremark.
CoreMark Size : 666
Total ticks : 12000
Total time (secs): 12.000000
Iterations/Sec : 5.000000
Iterations : 60
Compiler version : Clang 15.0.7
Compiler flags : Using NuttX compilation options
Memory location : Defined by the NuttX configuration
seedcrc : 0xe9f5
[0]crclist : 0xe714
[0]crcmatrix : 0x1fd7
[0]crcstate : 0x8e3a
[0]crcfinal : 0xa14c
Correct operation validated. See README.md for run and reporting rules.
CoreMark 1.0 : 5.000000 / Clang 15.0.7 Using NuttX compilation options / Defined by the NuttX configuration
Signed-off-by: chao an <anchao@xiaomi.com>
2023-03-02 09:56:35 +01:00
SPRESENSE
a3cce487ca
tools/Unix.mk: Add VERSION_ARG to argument of version.sh
...
Allow version arguments to be changed externally.
2023-03-01 13:32:01 +08:00
SPRESENSE
d71562c794
tools/cxd56: Fix nxstyle
2023-03-01 12:26:32 +08:00
SPRESENSE
fc1c8a4d74
tools/cxd56: Fix typo in mkspk tool
...
Fix typo in mkspk tool.
2023-03-01 12:26:32 +08:00
Xiang Xiao
2c5f653bfd
Remove the tail spaces from all files except Documentation
...
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2023-02-26 13:24:24 -08:00
zhangyuan21
3c162b1e14
tools/ci: add libusb1.0 package
...
Signed-off-by: zhangyuan21 <zhangyuan21@xiaomi.com>
2023-02-26 22:39:57 +08:00
Takeyoshi Kikuchi
b901837f52
tools: nxstyle: add "NimMain" to whitelists.
...
Signed-off-by: Takeyoshi Kikuchi <kikuchi@centurysys.co.jp>
2023-02-26 19:11:53 +08:00
Xiang Xiao
0f20888a0e
tools/parsememdump.py: Restore the execution permission bit
...
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2023-02-25 12:21:13 -03:00
Xiang Xiao
8b4ecac6c2
libc: Move math library from libs/libc/math to libs/libm/libm
...
to prepare the support of other implementation e.g.:
https://github.com/JuliaMath/openlibm
https://gitlab.com/gtd-gmbh/libmcs
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2023-02-23 10:40:07 +02:00
yinshengkai
6b10d8ed19
tools: make the symbol table generated by mkallsyms.py two-byte aligned
...
When using stm32, the starting address of the function parsed by mkallsyms.py is an odd number, one large than the actual address
Signed-off-by: yinshengkai <yinshengkai@xiaomi.com>
2023-02-23 00:57:32 +08:00
chao an
b8ef55d201
Revert "tools/ci: Update GNU Arm Embedded Toolchain to Version 12.2-2022.12.22"
...
This reverts commit 809252e3fd
.
Wrong warning array subscript [0] is outside array bounds:
| chip/lpc43_usb0dev.c: In function 'lpc43_getframe':
| arch/arm/src/common/arm_internal.h:134:25: warning: array subscript 0 is outside array bounds of 'volatile uint32_t[0]' {aka 'volatile long unsigned int[]'} [-Warray-bounds]
| 134 | #define getreg32(a) (*(volatile uint32_t *)(a))
| | ~^~~~~~~~~~~~~~~~~~~~~~~~~~
| chip/lpc43_usb0dev.c:347:33: note: in expansion of macro 'getreg32'
| 347 | # define lpc43_getreg(addr) getreg32(addr)
| | ^~~~~~~~
| chip/lpc43_usb0dev.c:2605:15: note: in expansion of macro 'lpc43_getreg'
| 2605 | return (int)lpc43_getreg(LPC43_USBDEV_FRINDEX_OFFSET);
| |
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105523
Signed-off-by: chao an <anchao@xiaomi.com>
2023-02-20 20:05:13 +08:00
chao an
809252e3fd
tools/ci: Update GNU Arm Embedded Toolchain to Version 12.2-2022.12.22
...
x86_64 Linux hosted cross toolchains
AArch32 bare-metal target (arm-none-eabi)
arm-gnu-toolchain-12.2.rel1-x86_64-arm-none-eabi.tar.xz
Remove toolchain workaround which already fixed by ARM:
https://developer.arm.com/downloads/-/arm-gnu-toolchain-downloads
https://community.arm.com/support-forums/f/compilers-and-libraries-forum/53470/arm-gnu-toolchain-11-3-rel1-x86_64-arm-none-eabi-wrong-newlib-version-strings-error-when-stdlib-h-is-included
Signed-off-by: chao an <anchao@xiaomi.com>
2023-02-20 16:20:39 +08:00
chao an
f0825c2402
tools/unix: use anonymous pipes to avoid menuconfig break
...
Signed-off-by: chao an <anchao@xiaomi.com>
2023-02-20 13:31:02 +08:00
Tomasz 'CeDeROM' CEDRO
833f7a5a3e
Updated python scripts interpreter invocation in tools/
.
...
* Using call to portable `#!/usr/bin/env python3` syntax.
* Updated python interpreter call in `tools/ci/testrun` (please verify).
Signed-off-by: Tomasz 'CeDeROM' CEDRO <tomek@cedro.info>
2023-02-19 14:15:27 +08:00
wangbowen6
0f5b66c335
nxstyle: add "CMUnitTest" to nxstyle white list
...
https://github.com/apache/nuttx-apps/pull/1575 need this
Signed-off-by: wangbowen6 <wangbowen6@xiaomi.com>
2023-02-17 22:57:58 +08:00
chao an
fff0e58860
tools/kconfiglib: purge warning print of kconfiglib
...
Purge warning:
Kconfig:249: warning: the 'modules' option is not supported.
Let me know if this is a problem for you, as it wouldn't be that
hard to implement. Note that modules are supported -- Kconfiglib
just assumes the symbol name MODULES, like older versions of the
C implementation did when 'option modules' wasn't used.
Signed-off-by: chao an <anchao@xiaomi.com>
2023-02-17 16:01:52 +08:00
Xiang Xiao
e334786f81
tools/Unix.mk: Make sed compatible with macOS
...
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Co-authored-by: chao an <anchao@xiaomi.com>
2023-02-17 16:01:52 +08:00
Xiang Xiao
d5b510e023
tools/ci: Install genromfs instead building it from source code
...
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2023-02-17 16:01:52 +08:00
Xiang Xiao
0582930e4b
tools/ci: Install python kconfiglib
...
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2023-02-17 16:01:52 +08:00
yinshengkai
abdb16aea2
tools: add trace parse script
...
Extract a valid trace line and resolve the address to a function name
Signed-off-by: yinshengkai <yinshengkai@xiaomi.com>
2023-02-17 02:06:38 +08:00
chenwen@espressif.com
cfc9029c5d
risc-v/esp32c6: Add ESP32-C6 basic support
...
1. Bring up OS kernel.
2. Add interrupt support.
3. Add system timer support.
4. Add the ESP32-C6 devkit board.
5. Add basic UART support for console.
6. Add clock configuration.
7. Add board reset support.
2023-02-10 17:38:41 -03:00
chao an
807d59632c
tools/kconfig: add kconfiglib support
...
Reference:
https://github.com/ulfalizer/Kconfiglib
Setup:
pip install kconfiglib
Signed-off-by: chao an <anchao@xiaomi.com>
2023-02-10 20:29:22 +08:00
chao an
74ce3b81d3
build/Kconfig: add BINDIR/APPSBINDIR to support out of tree build
...
First decoupling changes related to CMAKE
BINDIR/APPSBINDIR:
Output path of Kconfig which dynamically generated by NuttX Kernel/Apps
This option is consistent with the TOPDIR/APPSDIR by default, and will
be changed when out-of-tree compilation is supported
Signed-off-by: chao an <anchao@xiaomi.com>
2023-02-09 20:13:04 +08:00
Xiang Xiao
916fa4d759
boards/sim: Enable CONFIG_SIM_M32 in nimble
...
please reference this pr:
https://github.com/apache/mynewt-nimble/pull/1125
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2023-02-09 14:36:05 +08:00
chao an
dad6b105ca
tools/Config: silent print of archive objects
...
Signed-off-by: chao an <anchao@xiaomi.com>
2023-02-06 16:22:28 -03:00
chao an
5e623da2dd
tools/Config: stack usage(.su) file should be removed on clean phase
...
Signed-off-by: chao an <anchao@xiaomi.com>
2023-02-07 00:30:49 +08:00
Masayuki Ishikawa
79704620f8
tools: ci: Fix testrun/utins/common.py for sabrelite (QEMU)
...
Summary:
- I noticed that nuttx crashes if DEBUG_ASSERTIONS=y
- This commit fixes this issue by changing QEMU options
Impact:
- None
Testing:
- Tested with QEMU
Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
2023-02-06 18:26:05 +08:00
Masayuki Ishikawa
6097f12765
tools: Fix Config.mk
...
Summary:
- I noticed that the following build error happened on my machine.
make -C sched libsched.a EXTRAFLAGS="-D__KERNEL__ "
make[1]: Entering directory '/mnt/m2ssd/opensource/RTOS/tmp/nuttx/sched'
/bin/sh: 1: echoCC: clock/clock_initialize.c : not found
- This commit fixes this issue
Impact:
- Should be none
Testing:
- Build on ubuntu 18.04 x86_64
Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
2023-02-04 01:05:39 +02:00
yinshengkai
c57a0e90a0
tools: use relative paths when reverting to compile
...
Using the full path will make __FILE__ longer, which will lead to a larger flash footprint
revert 9c6c9fb0cd
&& e14309a92d
Signed-off-by: yinshengkai <yinshengkai@xiaomi.com>
2023-02-03 18:28:33 +08:00
anjiahao
984208f6a2
tools: parsememdump.py support show total pid memory
...
Signed-off-by: anjiahao <anjiahao@xiaomi.com>
2023-02-02 22:47:03 +08:00
chao an
03b164f59c
tools/makefile: silent all compile output
...
In order to make compilation warnings and errors easier to be found out,
this commit will disable the printing of the compilation process as much
as possible, and also if you want to restore the log information of the
compilation process, please enable verbose build on command line:
$ make V=0
OR
$ make V=1
| V=0: Exit silent mode
| V=1,2: Enable echo of commands
| V=2: Enable bug/verbose options in tools and scripts
Signed-off-by: chao an <anchao@xiaomi.com>
2023-02-02 17:40:19 +08:00
Xiang Xiao
bf5c7b6e5d
tools/checkpatch.sh: Check the source code doesn't set executable bit
...
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2023-02-02 00:14:55 +02:00
Xiang Xiao
0a66cbdcdd
tools/checkpatch: Should check the spell and encoding for rust file too
...
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2023-02-02 00:14:55 +02:00
Gustavo Henrique Nihei
e6b204f438
nuttx: Use MIN/MAX definitions from "sys/param.h"
...
Signed-off-by: Gustavo Henrique Nihei <gustavo.nihei@espressif.com>
2023-02-01 23:47:44 +08:00
Fotis Panagiotopoulos
290a9157eb
checkpatch: Added encoding check with cvt2utf
2023-02-01 20:42:35 +08:00
yinshengkai
e14309a92d
tools: ARCHIVE uses the full path
...
Signed-off-by: yinshengkai <yinshengkai@xiaomi.com>
2023-02-01 20:39:52 +08:00
qiaohaijiao1
869d3bfb32
tools/ci/docker/linux/Dockerfile: add libmp3lame-dev:i386
...
Signed-off-by: qiaohaijiao1 <qiaohaijiao1@xiaomi.com>
2023-02-01 13:29:01 +08:00
yinshengkai
9c6c9fb0cd
tools/Config.mk: compile with full file path
...
Signed-off-by: yinshengkai <yinshengkai@xiaomi.com>
2023-01-31 18:15:59 +08:00
chao an
c3ddb1507b
tools/unix.mk: Pass APPDIR to arch's Makefile
...
make link custom library from apps/staging working
Signed-off-by: chao an <anchao@xiaomi.com>
2023-01-31 16:53:33 +08:00
yinshengkai
3f97a87162
tools: add separate flags parameter for COMPILE/COMPILEXX
...
Signed-off-by: yinshengkai <yinshengkai@xiaomi.com>
2023-01-31 13:42:33 +08:00
chao an
d96189ce26
tools/version: generate dummy version without breakout
...
Signed-off-by: chao an <anchao@xiaomi.com>
2023-01-28 12:10:15 -03:00
haopengxiang
fc81bb8b36
nuttx: increase MAX_BUFFER to 10240 for CI build
...
01:28:16 ERROR: CFLAG string is too long [8194/8192]: '-nostdinc++' '-fno-exceptions' '-fcheck-new' '-std=c++17' '-pipe' '-Os' '-fno-strict-aliasing' '-fomit-frame-pointer' '-fstack-protector-all' '-mthumb' '-Wa,-mthumb' '-Wa,-mimplicit-it=always' '-fno-common' '-Wall' '-Wshadow' '-Wundef' '-ffunction-sections' '-fdata-sections' '-g' '-mlittle-endian' '-march=armv8-m.main+dsp' '-mtune=cortex-m33' '-mfpu=fpv5-sp-d16' '-mfloat-abi=hard' '-isystem' '/home/work/ssd1/workspace/MiRTOS-Dev-Daily-Build/out/86v1/ap_test/.unionfs/nuttx/include/libcxx' '-isystem' '/home/work/ssd1/workspace/MiRTOS-Dev-Daily-Build/out/86v1/ap_test/.unionfs/nuttx/include' '-D__NuttX__' '-D__KERNEL__' '-Wno-cpp' '-I' '/home/work/ssd1/workspace/MiRTOS-Dev-Daily-Build/out/86v1/ap_test/.unionfs/apps/crypto' '-I' '/home/work/ssd1/workspace/MiRTOS-Dev-Daily-Build/out/86v1/ap_test/.unionfs/apps/crypto/mbedtls/mbedtls/include' '-I' '/home/work/ssd1/workspace/MiRTOS-Dev-Daily-Build/out/86v1/ap_test/.unionfs/apps/system/uorb/' '-I' '/home/work/ssd1/workspace/MiRTOS-Dev-Daily-Build/out/86v1/ap_test/.unionfs/apps/system/libuv/libuv/include' '-I'
Signed-off-by: haopengxiang <haopengxiang@xiaomi.com>
2023-01-28 09:05:06 +02:00
nietingting
5d45ec6d03
update MAX_SHQUOTE to 4096
...
Signed-off-by: nietingting <nietingting@xiaomi.com>
2023-01-28 09:05:06 +02:00
anjiahao
ed89d7252b
minidumpserver: add arm-a support
...
Signed-off-by: anjiahao <anjiahao@xiaomi.com>
2023-01-28 09:00:59 +02:00
Xiang Xiao
d3525ec637
tools/ci: Enable stm32u5, stm32wb and stm32wl5
...
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2023-01-24 08:40:50 +09:00
Xiang Xiao
931677a86e
tools: Add showstack.sh to parse *.su files
...
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2023-01-19 10:35:20 -03:00
ligd
8bd0d441ae
minidumpserver: replace stackdump to stack_dump
...
Signed-off-by: ligd <liguiding1@xiaomi.com>
2023-01-17 11:01:11 +08:00
chao an
613bfd0fde
mm/tlsf: fix compile error/warning on tlsf
...
1.
make[1]: Entering directory '/home/archer/code/nuttx/n2/incubator-nuttx/mm'
/bin/sh: 1: Syntax error: "(" unexpected
2.
tools/Unix.mk:681: warning: overriding recipe for target 'mm_clean'
tools/Unix.mk:681: warning: ignoring old recipe for target 'mm_clean'
tools/Unix.mk:700: warning: overriding recipe for target 'mm_distclean'
tools/Unix.mk:700: warning: ignoring old recipe for target 'mm_distclean'
Signed-off-by: chao an <anchao@xiaomi.com>
2023-01-16 16:14:13 +08:00
Xiang Xiao
a6428f4c27
mm: Integrate TLSF manager
...
can be enabled by CONFIG_MM_TLSF_MANAGER=y
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Signed-off-by: anjiahao <anjiahao@xiaomi.com>
2023-01-15 03:43:37 +08:00
Zhe Weng
8fb98bc9d1
script: support IPv6 in simhostroute.sh
...
1. Change IP address format to addr/prefix, to be compatible with both IPv4/IPv6.
- When adding address in CIDR type, netmask/route will be automatically added.
2. Since route of whole subnet is added automatically, not specifying NuttX's IP any more.
- Multiple NuttX simulators (with IP 10.0.1.x) attached to same bridge can surf the net at same time.
3. NAT66 is used to make sure it works even if host has only one IPv6 address.
Signed-off-by: Zhe Weng <wengzhe@xiaomi.com>
2023-01-05 23:36:43 +08:00