tmedicci opened a new pull request, #17070:
URL: https://github.com/apache/nuttx/pull/17070
## Summary
* risc-v/espressif/uart: Update common source code functions
- Updates the common source code for the UART peripheral used by
Espressif's RISC-Vs SoCs. This enables newer SoCs to be supported in the future
while maintaining backwards compatibility.
## Impact
Impact on user: No.
Impact on build: No.
Impact on hardware: Not yet: newer Espressif SoCs can be supported on NuttX
following this change.
Impact on documentation: No.
Impact on security: No.
Impact on compatibility: No. It's totally backwards compatible.
## Testing
Testing can be performed using any of the `nsh` or `usbconsole` defconfigs
available for any of Espressif's RISC-V-based devices (ESP32-C3, ESP32-C6, or
ESP32-H2). The behavior of the UART-related peripherals didn't change, and this
PR's results are the same of the results before it. This can be verified:
### Building
#### ESP32-C3
##### `nsh`
```
make -j distclean && ./tools/configure.sh esp32c3-generic:nsh && make flash
ESPTOOL_PORT=/dev/ttyUSB0 && picocom -b 115200 /dev/ttyUSB0
```
##### `usbconsole`
```
make -j distclean && ./tools/configure.sh esp32c3-generic:usbconsole && make
flash ESPTOOL_PORT=/dev/ttyACM0 && picocom -b 115200 /dev/ttyACM0
```
#### ESP32-C6
##### `nsh`
```
make -j distclean && ./tools/configure.sh esp32c6-devkitc:nsh && make flash
ESPTOOL_PORT=/dev/ttyUSB0 && picocom -b 115200 /dev/ttyUSB0
```
##### `usbconsole`
```
make -j distclean && ./tools/configure.sh esp32c6-devkitc:usbconsole && make
flash ESPTOOL_PORT=/dev/ttyACM0 && picocom -b 115200 /dev/ttyACM0
```
#### ESP32-H2
##### `nsh`
```
make -j distclean && ./tools/configure.sh esp32h2-devkit:nsh && make flash
ESPTOOL_PORT=/dev/ttyUSB0 && picocom -b 115200 /dev/ttyUSB0
```
##### `usbconsole`
```
make -j distclean && ./tools/configure.sh esp32h2-devkit:usbconsole && make
flash ESPTOOL_PORT=/dev/ttyACM0 && picocom -b 115200 /dev/ttyACM0
```
### Running
Just check for the proper boot with `nsh`.
### Results
Device booting properly:
```
ESP-ROM:esp32c6-20220919
Build:Sep 19 2022
rst:0x1 (POWERON),boot:0xc (SPI_FAST_FLASH_BOOT)
SPIWP:0xee
mode:DIO, clock div:2
load:0x40800000,len:0x4620
load:0x40804620,len:0x840
SHA-256 comparison failed:
Calculated: cf880d2574dbbce0efb8c367c2ad01953ddeb6487982414181460af34b263e3a
Expected: 0000000060b10000000000000000000000000000000000000000000000000000
Attempting to boot anyway...
entry 0x408042f0
pmu_param(dbg): blk_version is less than 3, act dbias not burnt in efuse
*** Booting NuttX ***
dram: lma 0x00000020 vma 0x40800000 len 0x4620 (17952)
dram: lma 0x00004648 vma 0x40804620 len 0x840 (2112)
padd: lma 0x00004e98 vma 0x00000000 len 0xb160 (45408)
imap: lma 0x00010000 vma 0x42020000 len 0xaf80 (44928)
padd: lma 0x0001af88 vma 0x00000000 len 0x5070 (20592)
imap: lma 0x00020000 vma 0x42000000 len 0x1d820 (120864)
total segments stored 6
NuttShell (NSH) NuttX-10.4.0
nsh>
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]