Re: STM32 and ttyACM device

2023-10-22 Thread Robert Middleton
Update: After looking through the code a bit, I discovered that the
CAIOC_GETCTRLLINE ioctl exists.  This seems to do exactly what I want
it to, in that once the host system opens the ttyACM the DTR and RTS
lines are raised.  As long as the host system does not turn off the
DTR line it should be fine.

Sample code(no error checking):

int get_val;
ioctl(fd, CAIOC_GETCTRLLINE, &get_val);
printf("get val: 0x%02X.  RTS: %d DTR: %d\n",
  get_val,
  (get_val & CDCACM_UART_RTS) > 0,
  (get_val & CDCACM_UART_DTR) > 0);

-Robert Middleton


Re: [VOTE] Apache NuttX 12.3.0 RC1 release

2023-10-22 Thread Alin Jerpelea
+1 from me

Tested on Spresense

Best regards
Alin

On Thu, Oct 19, 2023 at 6:25 PM Tomek CEDRO  wrote:

> +1 :-)
>
> BUILD HOST:
> FreeBSD octagon 13.2-RELEASE-p4 FreeBSD 13.2-RELEASE-p4 GENERIC amd64 .
>
>
> TARGETS:
> 1. ESP32.
> 2. ESP32-C3.
> 3. ESP32-S2.
> 4. ESP32-S3.
>
>
> === ESP32 ===
>
> % xtensa-esp32-elf-gcc -v
> Using built-in specs.
> COLLECT_GCC=xtensa-esp32-elf-gcc
>
> COLLECT_LTO_WRAPPER=/usr/home/cederom/.espressif/tools/xtensa-esp32-elf/esp-2021r2-patch5-8.4.0/xtensa-esp32-elf/bin/../libexec/gcc/xtensa-esp32-elf/8.4.0/lto-wrapper
> Target: xtensa-esp32-elf
> Configured with:
> /builds/idf/crosstool-NG/.build/xtensa-esp32-elf/src/gcc/configure
> --build=x86_64-build_pc-linux-gnu --host=x86_64-build_pc-linux-gnu
> --target=xtensa-esp32-elf
> --prefix=/builds/idf/crosstool-NG/builds/xtensa-esp32-elf
> --exec_prefix=/builds/idf/crosstool-NG/builds/xtensa-esp32-elf
>
> --with-local-prefix=/builds/idf/crosstool-NG/builds/xtensa-esp32-elf/xtensa-esp32-elf
>
> --with-headers=/builds/idf/crosstool-NG/builds/xtensa-esp32-elf/xtensa-esp32-elf/include
> --with-newlib --enable-threads=no --disable-shared
> --with-pkgversion='crosstool-NG esp-2021r2-patch5'
> --disable-__cxa_atexit --enable-cxx-flags=-ffunction-sections
> --disable-libgomp --disable-libmudflap --disable-libmpx
> --disable-libssp --disable-libquadmath --disable-libquadmath-support
> --disable-libstdcxx-verbose
> --with-gmp=/builds/idf/crosstool-NG/.build/xtensa-esp32-elf/buildtools
> --with-mpfr=/builds/idf/crosstool-NG/.build/xtensa-esp32-elf/buildtools
> --with-mpc=/builds/idf/crosstool-NG/.build/xtensa-esp32-elf/buildtools
> --with-isl=/builds/idf/crosstool-NG/.build/xtensa-esp32-elf/buildtools
> --enable-lto --enable-target-optspace --without-long-double-128
> --disable-nls --enable-multiarch --enable-languages=c,c++
> --disable-libstdcxx-verbose --enable-threads=posix
> --enable-gcov-custom-rtio --enable-libstdcxx-time=yes
> Thread model: posix
> gcc version 8.4.0 (crosstool-NG esp-2021r2-patch5)
>
> % /usr/bin/time -h ./tools/configure.sh -B -a ../nuttx-apps.git
> esp32-devkitc:coremark
> 2,88s real  1,49s user  1,61s sys
>
> % /usr/bin/time -h gmake -j8
> 14,84s real 56,33s user 32,84s sys
>
> % /usr/bin/time -h gmake flash
> 9,98s real  1,49s user  0,97s sys
>
> % cu -l /dev/cuaU0 -s 115200
> can't open log file /var/log/aculog.
> Connected
> ts Jul 29 2019 12:21:46
>
> rst:0x1 (POWERON_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
> configsip: 0, SPIWP:0xee
> clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
> mode:DIO, clock div:2
> load:0x3fff0030,len:4540
> ho 0 tail 12 room 4
> load:0x40078000,len:12344
> ho 0 tail 12 room 4
> load:0x40080400,len:4124
> entry 0x40080680
> Running CoreMark...
> 2K performance run parameters for coremark.
> CoreMark Size: 666
> Total ticks  : 1218
> Total time (secs): 12.18
> Iterations/Sec   : 985.221675
> Iterations   : 12000
> Compiler version : GCC8.4.0
> Compiler flags   : -O3 -fno-strict-aliasing -fomit-frame-pointer
> -ffunction-sections -fdata-sections
> Parallel PThreads : 2
> Memory location  : HEAP
> seedcrc  : 0xe9f5
> [0]crclist   : 0xe714
> [1]crclist   : 0xe714
> [0]crcmatrix : 0x1fd7
> [1]crcmatrix : 0x1fd7
> [0]crcstate  : 0x8e3a
> [1]crcstate  : 0x8e3a
> [0]crcfinal  : 0xa14c
> [1]crcfinal  : 0xa14c
> Correct operation validated. See README.md for run and reporting rules.
> CoreMark 1.0 : 985.221675 / GCC8.4.0 -O3 -fno-strict-aliasing
> -fomit-frame-pointer -ffunction-sections -fdata-sections / HEAP /
> 2:PThreads
> ~
> [EOT]
>
>
> % /usr/bin/time -h gmake clean distclean
> 6,92s real  3,12s user  4,08s sys
>
> % /usr/bin/time -h ./tools/configure.sh -B -a ../nuttx-apps.git
> esp32-devkitc:nsh
> 2,88s real  1,51s user  1,59s sys
>
> % /usr/bin/time -h gmake -j8
> 15,25s real 54,93s user 34,13s sys
>
> % /usr/bin/time -h gmake flash
> LD: nuttx
> CP: nuttx.hex
> MKIMAGE: ESP32 binary
> esptool.py -c esp32 elf2image -fs 4MB -fm dio -ff 40m -o nuttx.bin nuttx
> esptool.py v4.5
> Creating esp32 image...
> Merged 1 ELF section
> Successfully created esp32 image.
> Generated: nuttx.bin (ESP32 compatible)
> esptool.py -c esp32 -p /dev/cuaU0 -b 115200  write_flash -fs detect
> -fm dio -ff 40m 0x1 nuttx.bin
> esptool.py v4.5
> Serial port /dev/cuaU0
> Connecting.
> Chip is ESP32-D0WD-V3 (revision v3.0)
> Features: WiFi, BT, Dual Core, 240MHz, VRef calibration in efuse,
> Coding Scheme None
> Crystal is 40MHz
> MAC: 8c:4b:14:81:0b:ec
> Uploading stub...
> Running stub...
> Stub running...
> Configuring flash size...
> Auto-detected Flash size: 4MB
> Flash will be erased from 0x0001 to 0x00031fff...
> Compressed 136080 bytes to 62605...
> Wrote 136080 bytes (62605 compressed) at 0x0001 in 5.7 seconds
> (ef