* enable DLFCN.
* bump WAMR to a version which i happened to test.
* enable bulk-memory because it's required by recent versions of
wasi-sdk, which i happened to use to build a test module.
(test.wasm in the log below.)
Lightly tested with a stripped down version of WAMR native-lib example. [1]
```
nsh> mount -t littlefs /dev/esp32flash /mnt
nsh> iwasm --native-lib=/mnt/test_add.o /mnt/test.wasm
Hello World!
10 + 20 = 30
nsh> iwasm /mnt/test.wasm
[00:00:23:000 - 6]: warning: failed to link import function (env, test_add)
Hello World!
Exception: failed to call unlinked import function (env, test_add)
nsh>
```
[1] https://github.com/bytecodealliance/wasm-micro-runtime/tree/main/samples/native-lib
* disable too verbose wamr options.
* enable CONFIG_SCHED_WAITPID. because async execution on nsh prompt
sometimes confuses me.
* enable toywasm. it's sometimes convenient to have another interpreter.
note: wasm3 in nuttx apps doesn't have wasi enabled.
Add the necessary configs to the default nsh config file in order to enable
support for MMCSD-SPI.
Signed-off-by: Robert-Ionut Alexa <robertalexa2000@gmail.com>
Add support to esp32-sparrow-kit for the LTR308 sensor. This patch also
enables the sensor in the default nsh config file.
Signed-off-by: Robert-Ionut Alexa <robertalexa2000@gmail.com>
ESP32-SPARROW-KIT is built upon ESP32-WROVER-KIT by adding various
peripherals. This is an initial commits that only backports the code
as it is, without further changes.
Signed-off-by: Robert-Ionut Alexa <robertalexa2000@gmail.com>
In order to turn longjmp context-switch safe, it's necessary
to disable interrupts before modifying windowbase and windowstart.
Otherwise, after a context switch, windowstart and windowbase
would be different, leading to a wrongly set windowstart bit due to
longjmp writing it based on the windowbase before the context switch.
This corrupts the registers at the next window overflow reaching
that wrongly set bit.
*Background:*
This PR is related to an issue first observed on ESP-IDF
https://github.com/espressif/esp-idf/issues/5229 and it was, then,
checked on NuttX using a test application.
*The test application:*
To check if the problem affects ESP32, ESP32-S2 and ESP32-S3 on
NuttX, it was created an application based on:
https://en.cppreference.com/w/c/program/longjmp
The application creates 16 tasks (`#define NUMBER_OF_TASKS 16`)
that implements the following daemon:
```
static int setjmp_longjmp_daemon(int argc, char *argv[])
{
for (int i = 0; i < NUMBER_OF_TASKS * 2; i++)
{
jmp_buf env;
volatile int count = 0;
if (setjmp(env) != UINT16_MAX)
{
foo(&env, ++count);
}
}
sem_post(&g_sem);
return EXIT_SUCCESS;
}
```
The main function also initializes a semaphore to avoid application
exiting before tasks return successfully:
```
sem_init(&g_sem, 0, -NUMBER_OF_TASKS);
```
Finally, the round-robin interval was lowered to 1ms to raise the
chances of the longjmp being interrupted by a context switch
(`CONFIG_RR_INTERVAL=1).
This setup was able to reproduce the problem prior to this patch
being applied.
- Add ioctl method to enable allocating the apb buffer.
- Add RX methods to set data width, sample rate, channels and
for receiving data from the I2S peripheral.
- Update the i2schar defconfig to enable the I2S receiver.
- Add nxlooper defconfig to enable testing the RX interface.
- Add specific bindings on ESP32-S2 bringup to enable nxlooper
to work without the need of any specific codec.
- Add ioctl method to enable allocating the apb buffer.
- Add RX methods to set data width, sample rate, channels and
for receiving data from the I2S peripheral.
- Update the i2schar defconfig to enable the I2S receiver.
- Add nxlooper defconfig to enable testing the RX interface.
- Add specific bindings on ESP32 bringup to enable nxlooper
to work without the need of any specific codec.
since this config is removed from:
commit a446b5816f
Author: Xiang Xiao <xiaoxiang@xiaomi.com>
Date: Sun Nov 6 00:18:52 2022 +0800
mm/circbuf: Remove MM_CIRCBUF option from Kconfig
since the linker can remove the unused object file from the final image
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Summary:
- This commit adds the following configs to elf/defconfig
+CONFIG_DEBUG_FULLOPT=y
+CONFIG_DEBUG_SYMBOLS=y
+CONFIG_STACK_COLORATION=y
Impact:
- None
Testing:
- Tested with esp32-devkitc (QEMU and board)
Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
This change syncs the NuttX application image IRAM upper limit to the
start of the IRAM region used by the IDF 2nd stage bootloader.
Signed-off-by: Gustavo Henrique Nihei <gustavo.nihei@espressif.com>
Summary:
- This commit fixes the CI build errors regressed by
https://github.com/apache/incubator-nuttx/pull/7351
Impact:
- None
Testing:
- Build only
Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
Add initial support for the I2S peripheral on ESP32S2.
Add I2S character driver and generic I2S audio driver.
Include i2schar defconfig for ESP32-S2-Saola-1 board.
Add initial support for the I2S peripheral on ESP32.
Add I2S character driver and generic I2S audio driver.
Include i2schar defconfig for ESP32-DevKitC board.
* Update WAMR version
* Enable CONFIG_INTERPRETERS_WAMR_DEBUG_INTERP
(TCP related config changes in this commit are for this)
* Enable CONFIG_MM_DUMP_ON_FAILURE
* Bump CONFIG_NSH_LINELEN
In order to better test the lcdddev driver and framebuffer, newer
board configs (for the TTGO T-Display and for the simulator) were
added.
Adjusted references of the sim:lvgl_(fb/lcd) config.
Summary:
- This commit enables to test C++ static object in ELF (hello++3)
Impact:
- elf defconfig only
Testing:
- Tested with both QEMU and esp32-devkitc board
Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
- Introduce the ESP32_WIFI option to replace the broader
ESP32_WIRELESS option. ESP32_WIRELESS is used by both WIFI and BLE.
- Move common functions from esp32_wifi_adapter to esp32_wireless.
- Change the order of including the external libraries to avoid undefined references.
Signed-off-by: Abdelatif Guettouche <abdelatif.guettouche@espressif.com>
and remove CONFIG_LIBC_LONG_LONG option to simplify the usage.
note: the size will increase 668
before change:
text data bss dec hex filename
168440 348 4480 173268 2a4d4 nuttx
after change:
text data bss dec hex filename
169108 348 4480 173936 2a770 nuttx
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Sync driver interfaces, also fixes the handling of special pin value for
esp32s2_gpio_matrix_in and esp32s2_gpio_matrix_out functions
Signed-off-by: Gustavo Henrique Nihei <gustavo.nihei@espressif.com>
Selecting this option will pass "-Map=$(TOPDIR)$(DELIM)nuttx.map" to ld
when linking NuttX ELF. That file can be useful for verifying
and debugging magic section games, and for seeing which
pieces of code get eliminated with DEBUG_OPT_UNUSED_SECTIONS.
Signed-off-by: chao.an <anchao@xiaomi.com>
Enable this option to optimization the unused input sections with the
linker by compiling with " -ffunction-sections -fdata-sections ", and
linking with " --gc-sections ".
Signed-off-by: chao.an <anchao@xiaomi.com>
MCUboot apps were moved to examples directory. This fix configs due to
recent changes.
Signed-off-by: Gerson Fernando Budke <gerson.budke@ossystems.com.br>
```
board/esp32_bringup.c: In function 'esp32_bringup':
board/esp32_bringup.c:171:9: error: implicit declaration of function 'esp32_efuse_initialize'; did you mean 'esp32_mmcsd_initialize'? [-Werror=implicit-function-declaration]
ret = esp32_efuse_initialize("/dev/efuse");
^~~~~~~~~~~~~~~~~~~~~~
esp32_mmcsd_initialize
```
Summary:
- I noticed that automatic tests sometimes fail
- This commit fixes this issue
Impact:
- None
Testing:
- Tested with QEMU
Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
## Summary
A lot of linker scripts were listed twice, once for unix, once for windows.
This PR cleans up the logic so they're only listed once.
## Impact
Any opportunity to use a single source of truth and reduce lines of code is a win!
## Testing
CI will test all build
since the related code was removed by:
commit 4d5a964f29
Author: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
Date: Tue Feb 23 18:04:13 2021 +0800
net: unify socket into file descriptor
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>