Commit graph

414 commits

Author SHA1 Message Date
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
YAMAMOTO Takashi
a9ab5ec8a6 wamr: rename a few recently-added nuttx options
from:
ARCH_TEXT_HEAP_SEPARATE_DATA_ADDRESS
ARCH_TEXT_HEAP_WORD_ALIGNED_READ

to:
ARCH_HAVE_TEXT_HEAP_SEPARATE_DATA_ADDRESS
ARCH_HAVE_TEXT_HEAP_WORD_ALIGNED_READ
2024-05-21 08:52:46 +08:00
yinshengkai
13cc85c055 toywasm: ignore compile warnings
Will cause compilation warning if NDEBUG is defined We can't modify the code of the external library, so let's ignore it

Signed-off-by: yinshengkai <yinshengkai@xiaomi.com>
2024-05-17 13:41:31 +09:00
YAMAMOTO Takashi
bc68ce993b wamr: tweak the defaults according to the new ARCH kconfig options 2024-05-15 18:41:43 -03:00
YAMAMOTO Takashi
385e2f0904 wamr: remove esp32s3 dependencies from a few options
While they are esp32s3 specific right now,
we can make them more generic later.
2024-05-14 22:07:45 +08:00
YAMAMOTO Takashi
f50fbe78aa wamr: Add a few options for esp32s3
The corresponding WAMR change:
https://github.com/bytecodealliance/wasm-micro-runtime/pull/2348
2024-05-14 22:07:45 +08:00
YAMAMOTO Takashi
02f88fbcaa wamr: flip the default of INTERPRETERS_WAMR_DISABLE_HW_BOUND_CHECK
Also, add a help text to explain the current situation.

cf. https://github.com/bytecodealliance/wasm-micro-runtime/pull/3419
2024-05-14 18:02:44 +08:00