420 Commits

Author SHA1 Message Date
Tiago Medicci
d63bb6d81d interpreters/python: Do not link to standard libraries
This commit prevents Python from linking to standard libraries.
This is needed because Python's `configure` script tests for a set
of available functions that are provided by NuttX (instead of the
toolchain) and not having `-nostdlib` set may give wrong results.
2025-05-11 11:31:57 +08:00
YAMAMOTO Takashi
57365ac05d toywasm: regen for v67.0.0
```shell
REF=2e4474d1af3bf9bc5a4b571be7ee69694f4a8aef ./regen.sh
```

Signed-off-by: YAMAMOTO Takashi <yamamoto@midokura.com>
2025-04-13 11:31:36 +08:00
YAMAMOTO Takashi
1094573025 toywasm: bump to v67.0.0
see below for the included changes.
the "fix GCC warnings for the target with long uint32_t" change
is for https://github.com/apache/nuttx/pull/16022.

```shell
2e4474d1af3bf9bc5a4b571be7ee69694f4a8aef wapm.toml: bump the version
95fdefcd3ea85ce18d0fd9c41536e609f6b0d7b2 suppress ubsan complaints on function type mismatches
9e131d0b86f29f453b51390e7a57db2f12efa8af fix a type in a comment
6832384862dab5f44b5328dbfe2a09cdba35713b platform.h: add WRONG_FUNC_TYPE macro to suppress -fsanitize=function
50062832c0481f4dcc67458fcfd2e1184e423d8b fix GCC warnings for the target with long uint32_t
04861b1084cd4925d99bfc758d5ae00359360c5d explain a cryptic dyld error
569aaa9b0ab6309311f331cdf3376e8d4445b1c0 libwasi_littlefs: emulate preadv/pwritev
b3f665319efe68215d9c9f51f489ba61b03c27fb ci: bump littlefs version
fe5cd58608c0eab0e3383626988240da1971a6ba fix debug info with IPO on macOS
7ef1b8abc4e4d1558986336732f21cf54f6abc58 libwasi_littlefs: fix crashes with non-debug builds
abb5efe1141721225945087d414d348f4afd4976 libwasi_littlefs: fix a few races
125d8973b485583d3ac4a8c4a60f97334135ee53 lfs_error_to_errno: translate unknown values to EIO
f1eda35d45229d02c7e23c872d2e0faeb9b2c731 Fix compilation errors with the latest macOS 15.2 SDK
3a01d8c5a063c18c8ebc58c45a61c7dd12cd4b75 libwasi_littlefs/README.md: remove a stale section
b7f015fd933fd330ed6e4e6f9af0dfc7b280e70d CI: update actions/upload-artifact download-artifact to v4
3a90622e105a2064878d4d63fc5e4566c6d1906b comment
6cdb84116abb930e903221231dd657ec08fec9e2 cmake: add custom-page-sizes tests
a2958960f59b6b0ccf7733fc3db301236991ff0b add run-wasm3-spec-test-custom-page-sizes.sh
f1029a818e638e0a5995a7fef43988592e709740 fetch-spec-test.sh: bump wasm-spec-test
7aa3d9050abcac11f7f8abef12ced6334acf0670 prepare-spec-test.sh: use my fork of custom-page-sizes for now
c987677a10557a0f938e3c10cfd05e5d741cf51e fetch-spec-test.sh: bump wasm-spec-test
c9372193a766c145a76a7ceaf79c820ce4576ce8 test/prepare-spec-test.sh: add custom-pages-sizes tests
9a74326a8d9503151ca3868ea6ed855293cb77b1 doc
cc700465b4275cc27007950f00ecf5079f68a778 comment
1700c523acf9fa3ba20772731eb04096852902a2 add a comment
```

Signed-off-by: YAMAMOTO Takashi <yamamoto@midokura.com>
2025-04-13 11:31:36 +08:00
YAMAMOTO Takashi
036fe7668d toywasm: regen for v66.0.0
```
REF=b0e100a4ebd666f02b2bb9222d402a9f399a740b ./regen.sh
```

Signed-off-by: YAMAMOTO Takashi <yamamoto@midokura.com>
2025-02-28 10:24:51 +01:00
YAMAMOTO Takashi
322c81bd8a toywasm: bump to v66.0.0
the included changes are:

```shell
spacetanuki% git log --pretty=oneline v65.0.0..v66.0.0
b0e100a4ebd666f02b2bb9222d402a9f399a740b (tag: v66.0.0) wapm.toml: bump the version
7604b9b896d7f48c46e484f560bbc679a87b0241 LICENSE: new year
c674c030025aab4cac94962328ae69590c5f1367 test/spectest.wat: update to match the spec harness
a5cf6bda2b2e022775d4d2d54aa11afc2e1295c2 test/fetch-spec-test.sh: update wasm-spec-test
c97f2d8e9e19d586d46b5db48a0582f374796d12 test/prepare-spec-test.sh: bump https://github.com/WebAssembly/multi-memory
b5f75600df812c421855ab7008b13113658af1c4 test/prepare-spec-test.sh: bump https://github.com/WebAssembly/spec version
1bfdc750dc18d085ac739a629b8b12b7ed9d9f6b escape.c: fix an integer overflow issue, especially on 32-bit archs
e15be49961d32e1878bfea399fd9cd609ff94045 escape.c: fix a comment
spacetanuki%
```

for nuttx-apps, only the escape.c fix is important.

Signed-off-by: YAMAMOTO Takashi <yamamoto@midokura.com>
2025-02-28 10:24:51 +01:00
simbit18
d05ecafc4b interpreters/quickjs/CMakeLists.txt: Sync of build Cmake with build Make
Setting the right version 2024-02-14

To avoid future breakage, used the URL with last commit ID

Signed-off-by: simbit18 <simbit18@gmail.com>
2025-02-22 13:48:26 +08:00
simbit18
71ff60753c interpreters/quickjs/Makefile: fix the build with Make
QUICKJS_URL_BASE in Cmakefile and Makefile was not the same.
Updated the correct url in Makefile.

fix https://github.com/apache/nuttx/issues/15712

To avoid future breakage, used the URL with last commit ID

Current version 2024-02-14 as found in the VERSION file https://github.com/bellard/quickjs/blob/master/VERSION

Signed-off-by: simbit18 <simbit18@gmail.com>
2025-02-21 10:52:29 -03:00
Tiago Medicci
db8542d2b1 interpreters/python: fix patch to set _PyRuntime attribute
This commit also adds the check for the `__NuttX__` macro to the
patch file that allows setting an attribute to the `_PyRuntime`
structure. The `__NuttX__` macro is guaranteed to be present when
building any application for NuttX.
2025-02-14 20:53:07 +08:00
Tiago Medicci
43439a6b16 interpreters/python: set ROMFS-generated data to const char
This allows the data to be placed in the .rodata section, which can
be allocated in the flash or other read-only storage, freeing the
internal memory.
2025-02-01 23:34:24 +01:00
Tiago Medicci
87f4eb8021 interpreters/python: add wrapper to initialize Python
This wrapper application checks if the Python's modules are already
mounted (and mounts them, if not), sets the necessary environment
variables and, then, runs the Python interpreter.
2025-02-01 23:34:24 +01:00
Tiago Medicci
4c6a6c7b16 interpreters/python: create Python's config files dynamically
The `Setup.local` and the `config.site` files are used by Python's
build system to, respectively, enable or disable Python's modules
and set/unset available functions in the target system. These files
are now set according to NuttX's configs, enabling or disabling
Python's features according to the configs set on NuttX.
2025-02-01 23:34:24 +01:00
Tiago Medicci
5a7661a928 interpreters/python: add patch to set _PyRuntime section
By setting a specific region for the `_PyRuntime` structure, it is
possible to move it to the external memory, for instance, freeing
the internal memory (this structure occupies around 140KiB).
2025-02-01 23:34:24 +01:00
Huang Qi
6669372415 wamr: Map armv7a/thumbv7a to armv7/thumbv7 for wamrc
Summary:
- Added explicit mapping of thumbv7a architecture to thumbv7 in the WAMR toolchain definitions
- WAMR's AOT compiler uses armv7/thumbv7 as the target architecture for all ARMv7-A processors
- This includes Cortex-A series processors like Cortex-A9 which use the armv7a/thumbv7a ISA

Impact:
- Fixes AOT compilation for ARM Cortex-A processors using thumbv7a architecture
- Maintains compatibility with WAMR's expected target architecture naming
- Ensures consistent architecture targeting across all ARMv7-A processors
- No impact on other architectures or build configurations

Signed-off-by: Huang Qi <huangqi3@xiaomi.com>
2025-01-17 23:31:49 +08:00
Tiago Medicci
a61fd58f8e interpreters/python: Enable Python's socket module
Enables the Python's socket module. This allows applications to be
built to interact with POSIX-compatible sockets, which is supported
by NuttX.
2025-01-07 05:51:02 +08:00
YAMAMOTO Takashi
7a36a70e06 toywasm: regen
```
REF=e972e94fa427c3371fb21ad4bb9f238a1cca7795 ./regen.sh
```
2024-12-29 20:40:22 +08:00
YAMAMOTO Takashi
9b6bb67f9e interpreters/toywasm/tmpl/license.in: Add SPDX identifier 2024-12-29 20:40:22 +08:00
YAMAMOTO Takashi
c2b6c75cdc toywasm/tmpl: Revert "interpreters: migrate to SPDX identifier"
Note that these files are templates used by regen.sh script.
2024-12-29 20:40:22 +08:00
YAMAMOTO Takashi
c7a694ecc8 toywasm: bump to v65.0.0 2024-12-29 20:40:22 +08:00
Alin Jerpelea
d3102f0dce interpreters: migrate to SPDX identifier
Most tools used for compliance and SBOM generation use SPDX identifiers
This change brings us a step closer to an easy SBOM generation.

Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2024-12-21 13:53:10 +08:00
YAMAMOTO Takashi
d8faa9b18e interpreters/luamodules/luv: use "depends on" instead of "select" 2024-12-18 20:04:12 +08:00
YAMAMOTO Takashi
53db7817d9 Remove all references to CONFIG_SCHED_ATEXIT
It has been removed a few years ago.
https://github.com/apache/nuttx/pull/6197
2024-12-18 17:42:24 +08:00
Tiago Medicci
d7ed69200f interpreters/python: Avoid warnings that could be treated as errors
This commit disables some warnings when building CPython to avoid
CI failing when `EXTRAFLAGS="-Wno-cpp -Werror"` is set.
2024-12-12 02:12:25 +08:00
Tiago Medicci
efc1bf710c interpreters/python: Add Python's port to NuttX
This is the NuttX's port of Python (cpython)!

Initial support of Python includes building the Python's static
library and the `python` (Programs/python.c) application. Python's
modules are stored in `pyc` (byte-code file) and loaded as needed
from flash.
2024-12-06 19:42:09 -03:00
xuxin19
fee82bd3d3 cmake(build):add missing basic and nxlooper cmake script
Signed-off-by: xuxin19 <xuxin19@xiaomi.com>
2024-11-18 13:52:45 +08:00
Xiang Xiao
c7530f5e45 quickjs: fix mp_mul multiple definition
in function `mp_mul':
apps/interpreters/quickjs/quickjs/libbf.c:1179: multiple definition of `mp_mul';
nuttx/staging/libapps.a:apps/math/libtommath/libtommath/bn_mp_mul.c:8: first defined here

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2024-11-16 21:34:11 +01:00
wenlingyun1
4a1c40aa96 update quickjs patch for cmake compilation
Signed-off-by: wenlingyun1 <wenlingyun1@xiaomi.com>
2024-11-11 17:17:22 +08:00
wenlingyun1
1adfefd88d add CMakeLists.txt for quickjs
Signed-off-by: wenlingyun1 <wenlingyun1@xiaomi.com>
2024-11-11 17:17:22 +08:00
Huang Qi
3799e0922d wamr: add iwasm include directory to nuttx target
This patch allow from other module that outside
WAMR directory include `wasm_export.h` to use WAMR as library.

Signed-off-by: Huang Qi <huangqi3@xiaomi.com>
2024-11-04 02:27:50 +08:00
yinshengkai
427b107dac quickjs: fix mp_mul multiple definition
in function `mp_mul':
apps/interpreters/quickjs/quickjs/libbf.c:1179: multiple definition of `mp_mul';
nuttx/staging/libapps.a:apps/math/libtommath/libtommath/bn_mp_mul.c:8: first defined here

Signed-off-by: yinshengkai <yinshengkai@xiaomi.com>
2024-10-13 10:34:43 +08:00
xuxingliang
cb812cb2da luasyslog: add cmake support
nsh>
nsh> lua
Lua 5.4.0  Copyright (C) 1994-2020 Lua.org, PUC-Rio
> for k,v in pairs(lsyslog)
>> do
>> print(k,v)
>> end
open    function: 0x402d49c0
FACILITY_LOCAL4 0.0
FACILITY_AUTH   0.0
_COPYRIGHT      Copyright (C) 1994-2021 Nicolas Casalini (DarkGod)
FACILITY_DAEMON 0.0
FACILITY_LOCAL1 0.0
LOG_WARNING     4.0
close   function: 0x402d4990
FACILITY_AUTHPRIV       0.0
LOG_ALERT       1.0
_DESCRIPTION    LuaSyslog allows to use log to an unix Syslog daemon, direct or via LuaLogging
FACILITY_CRON   0.0
FACILITY_FTP    0.0
LOG_DEBUG       7.0
FACILITY_LOCAL0 0.0
LOG_NOTICE      5.0
FACILITY_LOCAL5 0.0
LOG_EMERG       0.0
FACILITY_LPR    0.0
_VERSION        LuaSyslog 2.0.1
FACILITY_LOCAL7 0.0
FACILITY_KERN   0.0
log     function: 0x402d4944
FACILITY_LOCAL2 0.0
LOG_INFO        6.0
FACILITY_NEWS   0.0
FACILITY_LOCAL6 0.0
FACILITY_SYSLOG 0.0
FACILITY_USER   0.0
FACILITY_LOCAL3 0.0
FACILITY_UUCP   0.0
LOG_ERR 3.0
FACILITY_MAIL   0.0
LOG_CRIT        2.0
> lsyslog.log(lsyslog.LOG_EMERG, "Hello")
Hello
>

Signed-off-by: xuxingliang <xuxingliang@xiaomi.com>
2024-09-30 15:27:03 +08:00
Huang Qi
9320597c00 wamr: Add external module registration mechanism
This patch adds module registration mechanism for WAMR runtime.

To register a module, these steps are required:
1. Include Module.mk in your module's Makefile
2. Define WAMR_MODULE_NAME as the module name
3. Implement bool wamr_module_WAMR_MODULE_NAME_register(void) function in your module's source file
4. Enable INTERPRETERS_WAMR_EXTERNAL_MODULE_REGISTRY in menuconfig

Signed-off-by: Huang Qi <huangqi3@xiaomi.com>
2024-09-28 15:47:40 +08:00
YAMAMOTO Takashi
c03e3d0b9e toywasm: regen
```
REF=d7bb4aaef08be2d7821891f17bd9ef82ac1ba358 ./regen.sh
```
2024-09-27 01:15:04 +08:00
YAMAMOTO Takashi
9656e44c9e toywasm: bump to v63.0.0 2024-09-27 01:15:04 +08:00
xuxin19
b4d794cbd5 Makefile:complete missing DEPPATH
Signed-off-by: xuxin19 <xuxin19@xiaomi.com>
2024-09-23 08:41:29 +08:00
xuxin19
3d8dc5dce5 cmake:implement CMake build for NuttX Lua interpreter
add CMake module for register lua mod
nsh> lua
Lua 5.4.0  Copyright (C) 1994-2020 Lua.org, PUC-Rio
> hello.say_hello()
Hello World!
> io.write("abs is =",math.abs(-10),"\n")
abs is =10
> os.exit()
nsh>

Signed-off-by: xuxin19 <xuxin19@xiaomi.com>
2024-09-13 12:31:10 +08:00
Daniel Jasinski
1fdf13478f build: Missing CMakeLists.txt for bas
This correctly enables BASIC interpreter in CMake based
build for at least sim:bas board configuration.

Signed-off-by: Daniel Jasinski <jasinskidaniel95szcz@gmail.com>
2024-08-11 10:22:34 +08:00
YAMAMOTO Takashi
9a375abc08 toywasm: regen
```
REF=4db87d399cc871845237557020dae595cd6384dc ./regen.sh
```
2024-07-28 15:52:36 +08:00
YAMAMOTO Takashi
7570eae2ce toywasm: bump to v57.0.0 2024-07-28 15:52:36 +08:00
YAMAMOTO Takashi
2ef3eb25c0 wamr: add a few missing options to match the wamr repo counterpart 2024-07-18 23:02:20 +08:00
YAMAMOTO Takashi
437cf845fa wamr: bump the default version
There is little reason to prefer the ancient version from 2021.
2024-07-15 09:39:26 +08:00
YAMAMOTO Takashi
a0d98f1951 wamr: add an option for exception-handling 2024-07-12 12:08:05 +08:00
YAMAMOTO Takashi
9715b813d3 toywasm: regen for v54.0.0
```
REF=034952e424600381b45d9d400735bfeb96fd5848 ./regen.sh
```
2024-07-12 12:07:44 +08:00
YAMAMOTO Takashi
a9e7b84c81 toywasm: bump to v54.0.0 2024-07-12 12:07:44 +08:00
YAMAMOTO Takashi
72150f5035 toywasm: regen
```
REF=b43dd5312988a6dbc2b165c5956697d7f1d16000 ./regen.sh
```
2024-06-19 13:22:04 +08:00
YAMAMOTO Takashi
1b48e80955 toywasm: bump to v48.0.0 2024-06-19 13:22:04 +08:00
YAMAMOTO Takashi
364f8cd411 toywasm: regen
```
REF=7c60b048825b821a9398529d3af55514a62a3b7c ./regen.sh
```
2024-06-10 14:26:53 +08:00
YAMAMOTO Takashi
9ce5ebb611 toywasm: Bump to v46.0.0 2024-06-10 14:26:53 +08:00
YAMAMOTO Takashi
90a745b520 toywasm: regen for v45.0.0
```
REF=9f77f3519f84e9bb0074d855a04d731a5f56ce84 ./regen.sh
```
2024-05-26 00:41:12 +08:00
YAMAMOTO Takashi
edb8138e04 toywasm: enable TOYWASM_ENABLE_WASM_CUSTOM_PAGE_SIZES 2024-05-26 00:41:12 +08:00
YAMAMOTO Takashi
dd03701494 toywasm: bump to v45.0.0 2024-05-26 00:41:12 +08:00