Commit Graph

89 Commits

Author SHA1 Message Date
simbit18
d0e030ff00 fix nxstyle
fix Relative file path does not match actual file.
2024-05-15 23:53:05 +08:00
Yanfeng Liu
5a0be0fe8c tools/mkimport.sh: enrich help message
This enrichs the help message for `tools/mkimport.sh`

Signed-off-by: Yanfeng Liu <yfliu2008@qq.com>
2024-05-09 17:29:39 +08:00
simbit18
7e30c0e4c9 Fix Kconfig style
Remove spaces from Kconfig files
Add TABs
Add comments
2024-04-09 08:16:40 +02:00
Huang Qi
c138651300 tools: New CMake based Wasm build system
Introduce a new CMake based build system for Wasm.
And target the Wasm ABI to wasm32-wasi, it should
be a more commnly used and standard ABI for Wasm.

Signed-off-by: Huang Qi <huangqi3@xiaomi.com>
2024-03-15 11:15:25 -03:00
YAMAMOTO Takashi
8930743831 Wasm.mk: disable by default
Fixes partly: https://github.com/apache/nuttx-apps/issues/2046

Also, this fixes warnings like:
```
spacetanuki% ./tools/configure.sh -E sim:wamr
  Copy files
  Select CONFIG_HOST_MACOS=y
  Refreshing...
/usr/local/bin/bash: line 1: /bin/clang: No such file or directory
/usr/local/bin/bash: line 1: /bin/clang: No such file or directory              /usr/local/bin/bash: line 1: /bin/clang: No such file or directory
/usr/local/bin/bash: line 1: /bin/clang: No such file or directory
/usr/local/bin/bash: line 1: /bin/clang: No such file or directory
/usr/local/bin/bash: line 1: /bin/clang: No such file or directory
/usr/local/bin/bash: line 1: /bin/clang: No such file or directory
/usr/local/bin/bash: line 1: /bin/clang: No such file or directory
/usr/local/bin/bash: line 1: /bin/clang: No such file or directory
CP: arch/dummy/Kconfig to /Users/yamamoto/git/nuttx/nuttx/arch/dummy/dummy_kconf
ig
CP: boards/dummy/Kconfig to /Users/yamamoto/git/nuttx/nuttx/boards/dummy/dummy_k
config
/usr/local/bin/bash: line 1: /bin/clang: No such file or directory
/usr/local/bin/bash: line 1: /bin/clang: No such file or directory
/usr/local/bin/bash: line 1: /bin/clang: No such file or directory
/usr/local/bin/bash: line 1: /bin/clang: No such file or directory
/usr/local/bin/bash: line 1: /bin/clang: No such file or directory
/usr/local/bin/bash: line 1: /bin/clang: No such file or directory

```
2024-01-13 02:16:16 -08:00
Yanfeng Liu
cf27f085f5 add const for romfs_img_len
this makes both declarations read-only as they are corelated.

Signed-off-by: Yanfeng Liu <yfliu2008@qq.com>
2024-01-04 09:12:48 -08:00
Yanfeng Liu
4d9f2e3692 optional argument for generated ROMFS file path.
existing headerfile path is used when argument is missing.

Signed-off-by: Yanfeng Liu <yfliu2008@qq.com>
2023-12-28 05:36:18 -08:00
Huang Qi
afa282ca4f WASI-SDK.defs: Simplify CFLAGS filters
Signed-off-by: Huang Qi <huangqi3@xiaomi.com>
2023-12-20 21:24:20 -08:00
Huang Qi
f57cd2cf0c tools: Move final wasm module to bin/wasm as elf
And leave all intermediate file in apps/wasm,
such as .map file, entry object etc used in
wasm module build.

Signed-off-by: Huang Qi <huangqi3@xiaomi.com>
2023-12-06 08:29:00 -08:00
Huang Qi
3c624d38cd tools: Allow customize ld flags for each wasm module
Signed-off-by: Huang Qi <huangqi3@xiaomi.com>
2023-12-06 08:29:00 -08:00
Huang Qi
bd159e103c tools: Split origin Wasm.mk into Wasm.mk and WASI-SDK.defs
Try to follow current NuttX's toolchain parttern:
Wasm.mk: Provide target rule for building wasm module
WASI-SDK.defs: Provide compile flags for building

Signed-off-by: Huang Qi <huangqi3@xiaomi.com>
2023-12-06 08:29:00 -08:00
Huang Qi
3129b7a465 tools: Emit map file for wasm module
Emit map file like NuttX's `System.map` for more
debug information.

Signed-off-by: Huang Qi <huangqi3@xiaomi.com>
2023-12-06 08:29:00 -08:00
Huang Qi
1cf9640bb6 Wasm.mk: Allow application defined linker flags
Signed-off-by: Huang Qi <huangqi3@xiaomi.com>
2023-11-17 18:46:51 -08:00
raiden00pl
24338bb477 remove tools/README.md. Migrated to Documentation/applications/tools 2023-10-30 10:00:01 +08:00
Huang Qi
a22aeb00ed tools: Lock wasm archive during ar rcs
Fix issues with multi thread compilation.

Signed-off-by: Huang Qi <huangqi3@xiaomi.com>
2023-09-19 11:10:13 +08:00
xuxin19
4765cc3411 Application.mk:define main entry MAINNAME relatively
when a program has multiple MAINSRC for incremental compilation,
the PROGNAME of the compiled file may generate errors
-------------------- compile definition error ---------------------
cc -c -g CFLAGS INCLUDEDIR -Dmain=funA_main funB.c -o funB.c.path.o
                             ^^^^  ^^^^^^    ^^^^
-------------------------------------------------------------------
use the MAINOBJ:PROGNAME mapping variable to define the main entry name

Signed-off-by: xuxin19 <xuxin19@xiaomi.com>
2023-08-24 23:36:30 +08:00
Huang Qi
712d008f66 tools: Using math.h from NuttX for wasm build
wasm clang can't find math.h if using libm from toolchain.

It's OK to using math.h from NuttX since only declaration is needed for wasm build.

Signed-off-by: Huang Qi <huangqi3@xiaomi.com>
2023-08-10 12:14:03 +08:00
cuiziwei
53cb2a947d apps/tools:fix build warning.
Signed-off-by: cuiziwei <cuiziwei@xiaomi.com>
2023-08-09 13:52:22 +08:00
Huang Qi
74db485277 tools: Raise error if wasm module build failed
Signed-off-by: Huang Qi <huangqi3@xiaomi.com>
2023-07-31 07:14:59 -07:00
Huang Qi
3d5183f404 tools: Merge WASM_BUILD and WASM_BUILD_ONLY
By make WASM_BUILD as a three state variable: y , n or both.

Signed-off-by: Huang Qi <huangqi3@xiaomi.com>
2023-07-17 23:14:47 +08:00
Stuart Ianna
3e8f7e33fc tools/mkimport: Add system map to mkimport script.
The `make export` target from the Nuttx repository correctly packs the
System.map file. This change ensure that ./tools/mkimport.sh extracts
this file correctly into the `import`correctly.
2023-06-30 16:18:44 +08:00
Lucas Saavedra Vaz
7bfd623616 system/nxdiag: Add Espressif's HAL version
Adds the currently used ESP HAL version to NXdiag's output.
2023-06-29 00:57:53 +08:00
Lucas Saavedra Vaz
890524c86f system/nxdiag: Fix issues introduced by #1776
Fix compilation issue by properly providing the defconfig name
2023-06-03 02:26:33 +08:00
Huang Qi
e1fdbd7936 tools/Wasm.mk: Link compiler-rt into wasm module
Link `libgcc.a` like compiler intrinsics library into wasm module.

Signed-off-by: Huang Qi <huangqi3@xiaomi.com>
2023-06-01 23:50:12 +08:00
Huang Qi
a06e53b1f9 tools/Wasm.mk: Generate object file name with full path
For example, before this patch, object file is like:
```
apps/examples/hello/hello_main.wo
```
With this patch, it will be:
```
apps/examples/hello/hello_main.c.home.huang.Work.nx.apps.examples.hello.wo
'''
Follow the native build:
'''
apps/examples/hello/hello_main.c.home.huang.Work.nx.apps.examples.hello.o
```

Signed-off-by: Huang Qi <huangqi3@xiaomi.com>
2023-05-31 10:04:28 +08:00
Lucas Saavedra Vaz
9cc710e954 testing/nxdiag: Move to "system" and improve info generated
Move the application to the "System" category. Improve host OS info by using platform.uname() and get current config file using CONFIG_BASE_DEFCONFIG
2023-05-27 13:48:32 +08:00
Lucas Saavedra Vaz
eb36c15171 testing: Add application to gather debug information (nxdiag)
This commit aims to add an application to gather debug information about the host and target systems. It can also perform some diagnostic checks on the host and target systems.
This will facilitate the process of users seeking assistance for solving some problem.

Current capabilities:
- Get host OS version;
- Get host python modules;
- Get host system packages;
- Get host PATH;
- Get host compilation flags for the target;
- Get target NuttX configuration;
- Get target OS version, hostname, build and architecture;
- Capable of adding custom, vendor specific, information. Currently gathering only Espressif related info:
  - Get the bootloader version of detected image files;
  - Get the version of different toolchains used by Espressif chips;
  - Get Esptool version.
2023-05-25 11:04:39 -03:00
Huang Qi
dec2cd9635 tools/Wasm: Decouple the wasm compilation and runtime specific AOT compilation
Signed-off-by: Huang Qi <huangqi3@xiaomi.com>
2023-05-13 10:15:40 -03:00
Xiang Xiao
0d2ef47192 nshlib: Rename CONFIG_SYSTEM_NSH_SYMTAB to CONFIG_NSH_SYMTAB
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-10-18 22:18:38 +02:00
Xiang Xiao
893387b2c5 Fix the minor style issue
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-10-16 19:07:16 +02:00
Nathan Hartman
c2fdd8e99d tools/README.md: Fix typo and reflow paragraph 2022-09-09 01:08:33 +08:00
liuhaitao
dbb19c9e5a tools: add git pre-commit hook for apps
VELAPLATFO-1028

tools/pre-commit should be copied to .git/hooks/pre-commit to take
effect.

Signed-off-by: liuhaitao <liuhaitao@xiaomi.com>
2022-08-14 14:06:10 +03:00
YAMAMOTO Takashi
6a25898568 Revert "tools/mksymtab.sh: Disable the mismatch warning of builtin declaration"
This reverts commit a6773a8412.

Unnecessary after "Use -fno-builtin for SYMTABOBJ"
2022-05-12 23:12:39 +08:00
Xiang Xiao
a6773a8412 tools/mksymtab.sh: Disable the mismatch warning of builtin declaration
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-02-18 09:04:57 +01:00
Masayuki Ishikawa
eeed03b174 tools: mkimport.sh: Add support relative file path
Summary:
- mkimport.sh only accepted absolute file path
- This commit adds support relative file path

Impact:
- None

Testing:
- Build (mkimport, make import) with sama5d4-ek:knsh

Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
2022-01-30 17:20:10 +01:00
Petro Karashchenko
2498be1f40 romfsimg: add attribute to set minimum 4 bytes aignment for romfs image data
Signed-off-by: Petro Karashchenko <petro.karashchenko@gmail.com>
2022-01-28 00:02:45 +08:00
baggio63446333
562239ecb2 tools/mksymtab.sh: Fix issue to generate symtab_apps.c for MSYS
The file permission is used to get the execlist, but the file permission
cannot be changed for MSYS environment. As a result, symtab_apps.c cannot
be generated correctly. This commit removes the permission match.
2021-10-05 06:23:29 -07:00
Alin Jerpelea
54f47f3168 tools: update licenses to Apache
Gregory Nutt is has submitted the SGA

Michal Lyszczek has submitted the ICLA

as a result we can migrate the licenses to Apache.

Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2021-06-10 08:49:24 -05:00
John Bampton
db0b595b4b Remove unneeded semicolons and parentheses from Python files 2020-12-12 19:20:38 +01:00
SPRESENSE
381b83ea90 tools/check-hash.sh: Add shasum to use checking hash
In macOS, sha*sum tools not found, but shasum can be use instead of them.
2020-07-29 15:22:20 +02:00
Maciej Wójcik
21049ece6e Rewritten READMEs to Markdown 2020-07-25 01:01:51 -07:00
Maciej Wójcik
51e6645f71 Rename README and README.txt to README.md 2020-07-25 01:01:51 -07:00
chao.an
c723283340 make/import: support import zip use relative path
mkimport.sh failure if using relative path:

$ ./tools/mkimport.sh -x ../incubator-nuttx/nuttx-export-9.1.0.zip
unzip:  cannot find or open ../incubator-nuttx/nuttx-export-9.1.0.zip, ../incubator-nuttx/nuttx-export-9.1.0.zip.zip or ../incubator-nuttx/nuttx-export-9.1.0.zip.ZIP.
ERROR: unzip ../incubator-nuttx/nuttx-export-9.1.0.zip failed

Change-Id: Ifc93c5e4dac95ec79a4e909b22ef646fbfe4484d
Signed-off-by: chao.an <anchao@xiaomi.com>
2020-07-03 23:48:00 -05:00
chao.an
a5bae8b8ee make/import: copy the exported buildin registers
copy the exported buildin registers to avoid symbols dropping on import build

Change-Id: Ibf184d5d67906b41a2c813b96f61f047e60bacea
Signed-off-by: chao.an <anchao@xiaomi.com>
2020-07-03 23:48:00 -05:00
liuhaitao
68c89e8485 tools/mksymtab.sh: remove the quotes in varlist entry coming from *-thunk.S
Signed-off-by: liuhaitao <liuhaitao@xiaomi.com>
2020-06-10 21:31:51 +08:00
Xiang Xiao
d03ff1bde6 build: Remove the duplicated mksymtab.sh
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-05-24 08:26:55 -06:00
liuhaitao
994af95576 tools/mksymtab.sh: suppress 'find apps/bin' No such file or directory error msg
Suppress apache nightly build find error msg as below:
find: '/home/jenkins/jenkins-slave/workspace/NuttX-Nightly-Build/apps/bin': No such file or directory

Signed-off-by: liuhaitao <liuhaitao@xiaomi.com>
2020-05-15 07:29:37 -06:00
Xiang Xiao
f074d7f376 Makefile: let install depend on the target binary
to ensure the binary get built and install once
2020-03-22 22:42:13 +00:00
Xiang Xiao
41d88f06e7 Run codespell -w with the latest dictonary again 2020-02-23 07:10:14 -06:00
Xiang Xiao
e0dcfa0c55 Remove extra whitespace from files (#43)
* Remove multiple newlines at the end of file
* Remove the white space from the end of line
2020-01-31 08:29:24 -06:00