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
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
Lucas Saavedra Vaz
89536c526b
boards/esp32s2-saola-1: Add button driver support
2023-01-12 22:23:42 +08: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
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
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
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
Lucas Saavedra Vaz
22ce6e8a9c
boards/xtensa: Added support for the ESP32-S2-Kaluga-1 board
2022-11-07 14:23:09 -03:00
Lucas Saavedra Vaz
a5d3a6b126
xtensa/esp32s2: Move linker scripts to folder common to all boards
2022-11-03 22:22:54 +01:00
Xiang Xiao
28947517ca
sched/spawn: Rename task_spawnattr_[get|set]stack[size|addr] to posix_spawnattr_[get|set]stack[size|addr]
...
since they can be not only used in task_spawn but also in posix_spawn
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-11-01 09:51:18 +09:00
Tiago Medicci Serrano
ebf9af662e
xtensa/esp32s2: add support for the CS4344 audio codec
...
Include i2schar and audio defconfigs for ESP32-S2-Saola-1 board.
2022-10-22 15:18:35 +08:00
Tiago Medicci Serrano
16b99ee013
xtensa/esp32s2: add initial support for I2S
...
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.
2022-10-22 15:18:35 +08:00
Alan Carvalho de Assis
11ca921b71
esp32s2-saola-1: Add SPI example using max6675
2022-10-20 10:11:26 +08:00
Abdelatif Guettouche
6de170b154
boards/xtensa: Remove outdated information.
...
Signed-off-by: Abdelatif Guettouche <abdelatif.guettouche@espressif.com>
2022-07-12 01:10:31 +08:00
Gustavo Henrique Nihei
43685aefc8
esp32s2-saola-1: Add support for BMP180 pressure sensor
...
Signed-off-by: Gustavo Henrique Nihei <gustavo.nihei@espressif.com>
2022-06-30 00:32:02 +03:00
Gustavo Henrique Nihei
01b3ddd22f
esp32s2-saola-1: Add support for I2C chardev driver
...
Signed-off-by: Gustavo Henrique Nihei <gustavo.nihei@espressif.com>
2022-06-30 00:32:02 +03:00
Gustavo Henrique Nihei
31cddc922c
xtensa/esp32s2: Sync GPIO driver implementation with ESP32-S3
...
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>
2022-06-30 00:10:41 +08:00
YAMAMOTO Takashi
864f43b562
esp32*: Disable CONFIG_RAW_BINARY
...
Because it uses the same filename as esp32 Config.mk. (nuttx.bin)
2022-05-27 13:41:51 +03:00
Ville Juven
5800dd2af5
boards/xxx: Remove CONFIG_SCHED_ATEXIT/ONEXIT from all defconfigs
2022-05-25 15:28:43 +08:00
Xiang Xiao
1f920e55d3
Move warning option from Make.defs to Toolchain.defs
...
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-05-15 15:40:35 +03:00
Xiang Xiao
aeb9c5d822
boards: Move -fno-strict-aliasing from Make.defs to Toolchain.defs
...
and migrate MAXOPTIMIZATION into ARCHOPTIMIZATION
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-05-01 11:36:41 +03:00
Xiang Xiao
b12c0a1e31
boards: Remove -std=c++1x from Make.defs
...
let the implementation of standard library choice what they want
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-04-29 21:08:14 -03:00
Xiang Xiao
8f8ee25a9c
boards: Move -g from Make.defs to Toolchain.defs
...
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-04-25 16:23:03 +03:00
Xiang Xiao
75326e563d
boards: Move -fno-common from Make.defs to Toolchain.defs
...
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-04-25 07:57:29 +03:00
Xiang Xiao
547c85b0ae
boards: Switch the elf link script to binfmt/libelf/gnu-elf.ld
...
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-04-24 17:02:37 +02:00
chao.an
1c8e12406e
compile/opt: add config DEBUG_LINK_MAP
...
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>
2022-04-22 01:37:23 +08:00
chao.an
64d7326ed5
compile/opt: add config DEBUG_OPT_UNUSED_SECTIONS
...
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>
2022-04-22 01:37:23 +08:00
Xiang Xiao
6bc61b5752
arch/xtensa: Remove FAR from chip and board folder
...
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-04-17 18:42:38 +03:00
Alan C. Assis
c232be541c
Add SPIRAM to ESP32-S2
2022-04-14 22:10:23 +08:00
Gustavo Henrique Nihei
7b4d9f0afd
esp32[s2/s3/c3]: Add defconfigs for testing C++
...
Signed-off-by: Gustavo Henrique Nihei <gustavo.nihei@espressif.com>
2022-03-30 11:19:29 +08:00
Gustavo Henrique Nihei
06d0a9f1ad
xtensa|risc-v: Make CXX exception and RTTI depend on Kconfig options
...
Signed-off-by: Gustavo Henrique Nihei <gustavo.nihei@espressif.com>
2022-03-30 11:19:29 +08:00
Gustavo Henrique Nihei
c92c4af304
xtensa/esp32s2: Initialize instruction cache on startup
...
Signed-off-by: Gustavo Henrique Nihei <gustavo.nihei@espressif.com>
2022-03-23 20:05:40 -03:00
Gustavo Henrique Nihei
7cb8f02ecc
esp32s2-saola-1: Use cache-related definitions from Kconfig
...
Signed-off-by: Gustavo Henrique Nihei <gustavo.nihei@espressif.com>
2022-03-23 19:38:28 -03:00
Gustavo Henrique Nihei
04b80cc8d2
xtensa/esp32s2: Remove unused and not unsupported configs from Kconfig
...
Signed-off-by: Gustavo Henrique Nihei <gustavo.nihei@espressif.com>
2022-03-23 19:38:28 -03:00
Petro Karashchenko
dab5bb6bd3
boards/Kconfig: introduce ARCH_BOARD_COMMON option
...
Signed-off-by: Petro Karashchenko <petro.karashchenko@gmail.com>
2022-03-11 16:00:00 +08:00
Xiang Xiao
ee931c137f
boards: Remove -fno-builtin
...
it's more efficent to generate the machine code directly if possible
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-03-10 19:46:01 +02:00
Gustavo Henrique Nihei
c164324122
esp32s2-saola-1: Initialize Watchdog Timers on bringup
...
Signed-off-by: Gustavo Henrique Nihei <gustavo.nihei@espressif.com>
2022-03-08 22:24:07 -03:00
Gustavo Henrique Nihei
bd7ee0d675
xtensa/esp32s2: Sync IRQ management API with ESP32 and ESP32-S3
...
Signed-off-by: Gustavo Henrique Nihei <gustavo.nihei@espressif.com>
2022-03-08 11:36:32 -03:00
Alan C. Assis
73098e2a55
example/oneshot: Update defconfig to use default 2s
2022-02-25 00:10:45 +08:00
Xiang Xiao
54b886ca0d
boards: Add -fno-common to ARCHCFLAGS and ARCHCXXFLAGS
...
since elf loader can't handle SHN_COMMON
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-02-23 22:00:32 +08:00
Xiang Xiao
163fe4ff0b
boards: Replace CONFIG_CYGWIN_WINTOOL with CONVERT_PATH
...
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-02-20 21:15:36 +01:00
Xiang Xiao
1d1bdd85a3
Remove the double blank line from source files
...
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-02-20 20:10:14 +01:00
Alan Rosenthal
8defb843aa
Remove duplicate linker script definitions
...
## 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
2022-02-17 02:55:25 +08:00
Xiang Xiao
a9d7a776c4
sched: Remove SDCLONE_DISABLE option and config
...
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>
2022-01-31 19:03:20 +01:00
Abdelatif Guettouche
94fb8f4d2a
esp32s3_rom.ld: Lowercase cache related function to comply with nxstyle.
...
Signed-off-by: Abdelatif Guettouche <abdelatif.guettouche@espressif.com>
2022-01-31 23:35:50 +08:00
Huang Qi
0c28fe9831
boards: Remove unused NXFLAT flags from Make.defs
...
Since NXFLAT only avaliable on arm.
Signed-off-by: Huang Qi <huangqi3@xiaomi.com>
2022-01-27 11:08:43 +08:00
Xiang Xiao
c5c50acb93
board: Remove -fstrict-volatile-bitfields
...
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-01-20 16:00:48 +01:00
Xiang Xiao
8bcdefafc9
board: Remove -fno-strength-reduce
...
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-01-19 00:14:03 +01:00
Petro Karashchenko
8d3bf05fd2
include: fix double include pre-processor guards
...
Signed-off-by: Petro Karashchenko <petro.karashchenko@gmail.com>
2022-01-16 11:11:14 -03:00
chao.an
cbd82f1c1b
compile/flags: remove redundant -fomit-frame-pointer from board flags
...
Signed-off-by: chao.an <anchao@xiaomi.com>
2021-12-27 22:31:27 -06:00
ligd
412d030149
boards: move USERMAIN_XX out of INIT_ENTRYPOINT
...
Signed-off-by: ligd <liguiding1@xiaomi.com>
2021-12-24 08:23:30 -06:00
Jari van Ewijk
2e47ef32cf
GPIO driver: register all pintypes as generic /dev/gpioN
2021-12-09 23:55:12 -06:00
Jari van Ewijk
bcf9b4e5cd
timer-gpout example renamed to timer-gpio
2021-12-09 12:00:36 -06:00
Alan C. Assis
03738622a1
esp32s2: Add RNG driver support and board profile example
2021-10-23 04:03:12 -05:00
Abdelatif Guettouche
284c6f50e4
esp32s2_rom.ld: Add a strong declaration of some libgcc functions that are
...
ROM resident.
Signed-off-by: Abdelatif Guettouche <abdelatif.guettouche@espressif.com>
2021-10-01 10:09:04 -03:00
Gustavo Henrique Nihei
75dd460f79
boards/esp32s2-saola-1: Add example defconfig for booting from MCUboot
...
Signed-off-by: Gustavo Henrique Nihei <gustavo.nihei@espressif.com>
2021-09-27 18:21:53 -07:00
Gustavo Henrique Nihei
800678ca78
xtensa/esp32s2: Enable booting from MCUboot bootloader
...
Signed-off-by: Gustavo Henrique Nihei <gustavo.nihei@espressif.com>
2021-09-27 18:21:53 -07:00
Sara Souza
962059f843
xtensa/esp32-s2: Adds oneshot device driver support
2021-09-22 22:53:54 -03:00
Sara Souza
fba6fa2dc1
xtensa/esp32-s2: Adds support to rt_timer and systimer to ESP32-S2.
2021-09-22 17:18:24 -03:00
Gustavo Henrique Nihei
aacbe981be
boards/esp32s2-saola-1: Add implementation for BOARDIOC_RESET interface
...
Signed-off-by: Gustavo Henrique Nihei <gustavo.nihei@espressif.com>
2021-09-13 18:32:02 -03:00
Alan C. Assis
099e9fb4f7
boards: Remove -nostartfiles -nodefaultlibs from LDFLAGS
2021-09-13 08:58:25 +08:00
Gustavo Henrique Nihei
12b4d22757
tools/esp32s2: Create option for merging all binaries into a single file
...
Signed-off-by: Gustavo Henrique Nihei <gustavo.nihei@espressif.com>
2021-09-08 12:16:52 +02:00
Sara Souza
8081228556
xtensa/esp32-s2: Adds support to the timer driver
...
Only one more support for ESP32-S2 chip.
2021-09-01 14:10:01 -03:00
Xiang Xiao
b12f588140
Rename CONFIG_LIB_BOARDCTL to CONFIG_BOARDCTL
...
since boardctl isn't a libc feature
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2021-08-06 13:58:26 +02:00
Sara Souza
9c3799f130
xtensa/esp32-s2: Adds GPIO board logic to esp32s2-saola-1.
2021-07-29 17:21:32 -03:00
Jiuzhu Dong
85470176e7
sched/task: delete CONFIG_MAX_TASKS limit
...
Change-Id: I583015a95dbcebd352f81ecb3104ffdbd646a9ec
Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
2021-07-11 19:42:30 -07:00
Abdelatif Guettouche
2004acdeb1
boards/esp32s2: Remove anything that has to do with QEMU since it's not
...
supported.
Signed-off-by: Abdelatif Guettouche <abdelatif.guettouche@espressif.com>
2021-06-01 12:43:15 -05:00
Abdelatif Guettouche
672b8000f5
boards/xtensa/esp32s2/esp32s2-saola-1/scripts/.gitignore: Ignore the
...
generated linker script file.
Signed-off-by: Abdelatif Guettouche <abdelatif.guettouche@espressif.com>
2021-06-01 10:31:26 -05:00
Abdelatif Guettouche
8347a56bc0
Improve and remove not necessary board configuration
2021-06-01 07:49:54 +02:00
Alan C. Assis
1201777457
Add support to the esp32s2-saola-1 board
2021-06-01 07:49:54 +02:00