Commit Graph

511 Commits

Author SHA1 Message Date
Alan Carvalho de Assis
f0289577bf boards: Update all boards config after updating NSH_CMDPARMS 2023-01-23 03:04:51 +08:00
Alan Carvalho de Assis
9b187446f4 esp32s2-saola-1: Initialize EFUSE driver 2023-01-20 15:41:13 +08:00
Alan Carvalho de Assis
1be9d7c57f esp32s3-devkit: Initialize EFUSE driver 2023-01-20 15:40:46 +08:00
Gustavo Henrique Nihei
11e401c0bc esp32[c3|s3]: Fix relative path in file header
Signed-off-by: Gustavo Henrique Nihei <gustavo.nihei@espressif.com>
2023-01-19 10:11:34 +08:00
Gustavo Henrique Nihei
5a25b46b8b esp32[c3|s3]: Improve documentation of Linker Scripts
Signed-off-by: Gustavo Henrique Nihei <gustavo.nihei@espressif.com>
2023-01-19 10:11:34 +08:00
Gustavo Henrique Nihei
2436065096 espressif: Add missing Apache Foundation copyright header
Signed-off-by: Gustavo Henrique Nihei <gustavo.nihei@espressif.com>
2023-01-19 10:11:34 +08:00
Gustavo Henrique Nihei
ed91c97f93 xtensa/esp32: Remove deprecated CONFIGFILE variable
Signed-off-by: Gustavo Henrique Nihei <gustavo.nihei@espressif.com>
2023-01-19 10:11:34 +08:00
Gustavo Henrique Nihei
705e29fb27 xtensa/esp32: Support allocation of userspace heap into External RAM
Signed-off-by: Gustavo Henrique Nihei <gustavo.nihei@espressif.com>
2023-01-18 17:41:09 +08:00
Lucas Saavedra Vaz
89536c526b boards/esp32s2-saola-1: Add button driver support 2023-01-12 22:23:42 +08:00
Lucas Saavedra Vaz
42b3316d51 boards/esp32-lyrat: Fix typos 2023-01-12 22:23:42 +08:00
pengyiqiang
1c62181b0d boards: adapt LVGL v8 defconfig
Signed-off-by: pengyiqiang <pengyiqiang@xiaomi.com>
2023-01-01 10:15:08 -03:00
halyssonJr
cdbb670e5d Add support to Franzininho board
rename files ESP32S2-Franzininho to Franzininho-WiFi and remove some scripts previously tested
2022-12-20 19:47:37 -03:00
Gustavo Henrique Nihei
b6d9d4e92f xtensa/esp32: Fix PSRAM support when Stack Smash protection is enabled
Signed-off-by: Gustavo Henrique Nihei <gustavo.nihei@espressif.com>
2022-12-15 09:34:15 +08:00
Almir Okato
8f3c425067 xtensa/esp32s3: Enable booting from MCUboot bootloader
Add support for booting from MCUboot bootloader on ESP32-S3.

Signed-off-by: Almir Okato <almir.okato@espressif.com>
2022-12-15 00:42:13 +08:00
Lucas Saavedra Vaz
893b1477ea boards/esp32-lyrat: Add initial touch pad configuration 2022-12-14 22:38:10 +08:00
Gustavo Henrique Nihei
ffa6004b5a boards/esp32-devkitc: Disable FPU test for knsh defconfig
FPU test is not supported under Protected Mode.

Signed-off-by: Gustavo Henrique Nihei <gustavo.nihei@espressif.com>
2022-12-14 09:30:51 +09:00
Gustavo Henrique Nihei
ca16e9bbd5 xtensa/esp32s3: Simplify board linker script selection
Signed-off-by: Gustavo Henrique Nihei <gustavo.nihei@espressif.com>
2022-12-08 21:55:29 +08:00
Gustavo Henrique Nihei
afd95058c0 xtensa/esp32s2: Rename linker scripts into more meaningful names
Signed-off-by: Gustavo Henrique Nihei <gustavo.nihei@espressif.com>
2022-12-08 21:55:29 +08:00
Gustavo Henrique Nihei
f78c6432d8 xtensa/esp32: Simplify board linker script selection
Signed-off-by: Gustavo Henrique Nihei <gustavo.nihei@espressif.com>
2022-12-08 21:55:29 +08:00
Gustavo Henrique Nihei
236ee5c80d xtensa/esp32: Rename linker scripts into more meaningful names
Signed-off-by: Gustavo Henrique Nihei <gustavo.nihei@espressif.com>
2022-12-08 21:55:29 +08:00
Gustavo Henrique Nihei
1ecaa4e672 xtensa/esp32s3: Configure the PMS peripheral for Protected Mode
Signed-off-by: Gustavo Henrique Nihei <gustavo.nihei@espressif.com>
2022-12-07 03:07:45 +08:00
Gustavo Henrique Nihei
bfc40c74d0 xtensa/esp32s3: Add support for Protected Mode
Signed-off-by: Gustavo Henrique Nihei <gustavo.nihei@espressif.com>
2022-12-07 03:07:45 +08:00
YAMAMOTO Takashi
fc4493b7f1 esp32-devkitc/wamr_wasi_debug: enable native-lib stuff
* 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
2022-12-02 13:47:20 +08:00
YAMAMOTO Takashi
a43af6563b esp32-devkitc:wamr_wasi_debug kconfig maintainance
* 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.
2022-12-01 23:28:33 +08:00
Lucas Saavedra Vaz
a926445995 boards: Fix buttons GPIO IRQ on ESP boards 2022-11-28 17:24:57 -03:00
Lucas Saavedra Vaz
cd5e536c40 boards/esp32-lyrat: Add buttons example 2022-11-28 17:24:57 -03:00
SuGliger
83a4b45dd4 boards/esp32-wrover-kit: Fix GPIO conflicts 2022-11-26 11:58:58 +08:00
SuGliger
9cdb865c9c boards/esp32-wrover-kit: Add Lua Interpreter defconfig 2022-11-26 11:58:58 +08:00
Robert-Ionut Alexa
9c6971279d esp32-sparrow-kit: enable support for MMCSD-SPI
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>
2022-11-23 19:52:34 +08:00
Robert-Ionut Alexa
e0374c30e4 esp32-sparrow-kit: add support for the LTR308 light sensor
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>
2022-11-23 19:52:34 +08:00
Robert-Ionut Alexa
3351146c0b boards/xtensa/esp32: add initial commit for the ESP32-SPARROW-KIT
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>
2022-11-23 19:52:34 +08:00
Tiago Medicci Serrano
d3ffeb40a7 libc/machine/xtensa: make longjmp safe against context switch
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.
2022-11-22 19:34:44 +01:00
chao an
624d69ee05 boards: enter/leave critical section should in pairs
Signed-off-by: chao an <anchao@xiaomi.com>
2022-11-22 08:19:24 +09:00
Tiago Medicci Serrano
d492a5b092 esp32s2/i2s: implement I2S receiver module
- 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.
2022-11-21 23:46:47 +08:00
Tiago Medicci Serrano
3b5ab27893 esp32/i2s: implement I2S receiver module
- 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.
2022-11-15 17:01:47 -03:00
Alan Carvalho de Assis
013b15db2d esp32: Add support to LilyGO_TBeam V1.1 LoRa/GPS board 2022-11-13 22:59:50 +08:00
YAMAMOTO Takashi
0f2206e9a8 esp32-devkitc/wamr_wasi_debug: bump WAMR version 2022-11-09 18:20:05 +08:00
Xiang Xiao
352006af6d boards/esp32-lyrat: Remove CONFIG_MM_CIRCBUF=y from audio config
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>
2022-11-08 18:24:07 -03:00
Xiang Xiao
a446b5816f 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>
2022-11-08 10:18:27 -03:00
Lucas Saavedra Vaz
bcafc77cf8 boards/esp32-lyrat: Add support for the ES8388 codec 2022-11-08 10:03:18 -03:00
Masayuki Ishikawa
6bd285814d boards: esp32-devkitc: Update elf/defconfig
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>
2022-11-08 10:03:00 -03:00
Lucas Saavedra Vaz
22ce6e8a9c boards/xtensa: Added support for the ESP32-S2-Kaluga-1 board 2022-11-07 14:23:09 -03:00
Gustavo Henrique Nihei
f0cf1ea69e boards/esp32s3: Improve documentation on the IRAM upper limit definition
Signed-off-by: Gustavo Henrique Nihei <gustavo.nihei@espressif.com>
2022-11-08 00:49:03 +08:00
Gustavo Henrique Nihei
3cb6d103c5 xtensa/esp32s3: Extend IRAM region according to IDFboot v4.4.2
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>
2022-11-08 00:49:03 +08:00
Masayuki Ishikawa
bbe2fd3b80 boards: Fix the CI build errors for telnetd
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>
2022-11-07 16:06:00 +01:00
Xiang Xiao
4e43fef5cd boards: Update telnetd related config after apps/nshlib change
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-11-07 15:24:29 +09:00
Tiago Medicci Serrano
9ecc345c02 esp32/i2s: use internal buffer to handle multiple audio formats 2022-11-05 00:37:00 +08:00
Lucas Saavedra Vaz
c06b881812 boards/esp32: Fix invalid IRAM option in linker script 2022-11-03 22:24:18 +01:00
Lucas Saavedra Vaz
a5d3a6b126 xtensa/esp32s2: Move linker scripts to folder common to all boards 2022-11-03 22:22:54 +01:00
Gustavo Henrique Nihei
1befe6076f xtensa/esp32s3: Move linker scripts to folder common to all boards
Signed-off-by: Gustavo Henrique Nihei <gustavo.nihei@espressif.com>
2022-11-02 16:04:00 +01:00