Hello world :-)

There goes -1 from me, sorry :-P :-P

1. There are memory leak problems reported that I tried to confirm on
STM32F769. Is it ostest problem only or more general memory management
issue?

before ostest total/used: 483056 / 10112.
after ostest total/used: 483056 / 10200.

2. There are LVGL screen problems reported. This may be solved with
LVGL 9.2.1 release that should show up within days and its inclusion
is in the PRs. Or we have display driver to fix. I would also
recommend testing with previous NuttX releases on the same hardware to
confirm the possible regression. Gabor is very keen to NuttX and it
would be really nice to show working demo of LVGL 9.2.1 on 12.7.0 also
to attract newcomers to the project.

https://github.com/apache/nuttx/issues/13825
https://github.com/lvgl/lvgl/pull/6981

3. I have found a problem on ESP32 with esptool version 4.7 that
produces faulty unusable firmware with no warning / error. I found a
commit that bumps esptool to 4.8 in order to build on CI with new
bootloader from ESP IDF. Otherwise I would not know why it does not
run. But we should handle this situation with error message and/or use
older bootloader with 4.7 (?) otherwise people may get discouraged at
first contact with NuttX.

https://github.com/apache/nuttx/issues/13824


If there is any reason the 12.7.0 really should be released right now
for some serious reason I can change my vote to 0 not to block the
release. Otherwise we should focus on fixing those 3 discovered issues
in order to provide high quality no-surprises release :-)


Here returns the subject of distributed testing farms so we could test
NuttX builds locally on a real hardware that we have at hand. I
started building one. But we also need some scripts that will make
this task easy to setup by everyone interested in a repeatable way.
This is a separate discussion already taking place on dev@.


I have contacted local STM in Poland and asked if they can provide
free sample develkits to test NuttX on them and demo a reference
design. I have STM32F769I-DISCO but with no LCD so I cannot help with
LVGL at this point sorry.

Thank you :-)
Tomek


=== BUILD HOST ===

% uname -a
FreeBSD octagon 13.3-RELEASE-p7 FreeBSD 13.3-RELEASE-p7 GENERIC amd64

% git branch
* (HEAD detached at nuttx-12.7.0-RC0)

% git log --oneline -5
10e44f8915 (HEAD, tag: nuttx-12.7.0-RC0, origin/releases/12.7)
riscv_fork.c: Fix race condition when handling parent integer
registers
2d3c94411b riscv_fork.c: Fix vfork() for kernel mode + SMP
d1fec65e1b riscv: use g_running_task store current regs
57f84aaca8 sensor: Added 6dof motion and gesture related types. For
details, see: 
https://developer.android.com/reference/android/hardware/SensorEvent#values
a4e90b7268 inlclude/uorb.h:Update data types to be sorted by macro definition.

%  git branch
* (HEAD detached at nuttx-12.7.0-RC0)

% git log --oneline -5
ac11e3cba (HEAD, tag: nuttx-12.7.0-RC0, origin/releases/12.7) Adapt
the new header file path of va_format.
b4d794cbd Makefile:complete missing DEPPATH
f81a09428 nshlib: add support for pkill command
767c8ea6c uorb: enable O_CLOEXEC explicit
bae15dfd5 nshlib: enable O_CLOEXEC explicit to avoid potential fd leak


=== TARGETS ===

1. ESP32 (FAIL).
2. ESP32-C3 (PASS).
3. STM32F769I-DISCO (PASS).



=== ESP32 ===

% gmake clean distclean

% xtensa-esp32-elf-cc --version
xtensa-esp32-elf-cc (crosstool-NG esp-2021r2-patch5) 8.4.0
Copyright (C) 2018 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

% /usr/bin/time -h ./tools/configure.sh -B esp32-devkitc:nsh
        3,92s real              1,98s user              2,23s sys

% /usr/bin/time -h gmake -j8
 /usr/bin/time -h gmake -j8
Create version.h
Cloning Espressif HAL for 3rd Party Platforms
Clone: chip/esp-hal-3rdparty LN: platform/board to
/XXX/nuttx-apps.git/platform/dummy
Register: nsh
Register: sh
Espressif HAL for 3rd Party Platforms: 20690e67695f0a8170a19ec99e2e9a13b620e94d
CPP:  
/XXX/nuttx.git/arch/xtensa/src/chip/esp-hal-3rdparty/components/esp_rom/esp32/ld/esp32.rom.newlib-funcs.ld->
/XXX/nuttx.git/arch/xtensa/src/chip/esp-hal-3rdparty/components/esp_rom/esp32/ld/esp32.rom.newlib-funcs.ld.tmpLD:
nuttx
CP: nuttx.hex
MKIMAGE: ESP32 binary
esptool.py -c esp32 elf2image --ram-only-header -fs 4MB -fm dio -ff
40m -o nuttx.bin nuttx
usage: esptool [-h] [--chip
{auto,esp8266,esp32,esp32s2,esp32s3beta2,esp32s3,esp32c3,esp32c6beta,esp32h2beta1,esp32h2beta2,esp32c2,esp32c6}]
[--port PORT] [--baud BAUD] [--before
{default_reset,usb_reset,no_reset,no_reset_no_sync}] [--after
{hard_reset,soft_reset,no_reset,no_reset_stub}] [--no-stub] [--trace]
               [--override-vddsdio [{1.8V,1.9V,OFF}]]
[--connect-attempts CONNECT_ATTEMPTS]
               
{load_ram,dump_mem,read_mem,write_mem,write_flash,run,image_info,make_image,elf2image,read_mac,chip_id,flash_id,read_flash_status,write_flash_status,read_flash,verify_flash,erase_flash,erase_region,merge_bin,get_security_info,version}
...
esptool: error: unrecognized arguments: --ram-only-header
gmake: *** [tools/Unix.mk:558: nuttx] Error 2
        40,96s real             1m32,23s user           1m1,82s sys

% pip show esptool
Name: esptool
Version: 4.3
Summary: A serial utility to communicate & flash code to Espressif chips.
Home-page: https://github.com/espressif/esptool/
Author: Fredrik Ahlberg (themadinventor) & Angus Gratton (projectgus)
& Espressif Systems
Author-email:
License: GPLv2+
Location: /XXX/venv3.9embedded/lib/python3.9/site-packages
Requires: bitstring, cryptography, ecdsa, pyserial, reedsolo
Required-by: #N/A

(venv3.9embedded) pip install -U esptool

(venv3.9embedded) /usr/bin/time -h gmake -j8
CPP:  
/XXX/nuttx.git/arch/xtensa/src/chip/esp-hal-3rdparty/components/esp_rom/esp32/ld/esp32.rom.newlib-funcs.ld->
/XXX/nuttx.git/arch/xtensa/src/chip/esp-hal-3rdparty/components/esp_rom/esp32/ld/esp32.rom.newlib-funcs.ld.tmpLD:
nuttx
CP: nuttx.hex
MKIMAGE: ESP32 binary
esptool.py -c esp32 elf2image --ram-only-header -fs 4MB -fm dio -ff
40m -o nuttx.bin nuttx
esptool.py v4.8.1
Creating esp32 image...
Image has only RAM segments visible. ROM segments are hidden and
SHA256 digest is not appended.
Merged 1 ELF section
Successfully created esp32 image.
Generated: nuttx.bin
        4,19s real              2,96s user              3,44s sys

(venv3.9embedded) /usr/bin/time -h gmake flash
        15,26s real             3,03s user              3,24s sys

(venv3.9embedded) cu -l /dev/cuaU0 -s 115200
Stale lock on cuaU0 PID=4016... overriding.
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:0x3ffb1f40,len:1388
ho 0 tail 12 room 4
load:0x40080000,len:20320
entry 0x40082650
*** Booting NuttX ***
dram: lma 0x00001020 vma 0x3ffb1f40 len 0x56c    (1388)
iram: lma 0x00001594 vma 0x40080000 len 0x4f60   (20320)
padd: lma 0x00006508 vma 0x00000000 len 0x9af0   (39664)
imap: lma 0x00010000 vma 0x400e0000 len 0x10d78  (68984)
padd: lma 0x00020d80 vma 0x00000000 len 0xf298   (62104)
dmap: lma 0x00030020 vma 0x3f400020 len 0x2848   (10312)
total segments stored 6

NuttShell (NSH) NuttX-12.7.0
nsh> uname -a
NuttX 12.7.0 10e44f8915-dirty Oct  4 2024 22:22:13 xtensa esp32-devkitc
nsh> free
                 total       used       free    maxused    maxfree  nused  nfree
      Umem:     323568       6424     317144       6800     186696     22      3


I found problem with esptool 4.7.0 (system wide on FreeBSD) no error
is found, firmware is built and flashed, but no NSH prompt shows up
:-(


% gmake clean distclean


% /usr/bin/time -h ./tools/configure.sh -B esp32-devkitc:nsh
        3,89s real              1,77s user              2,41s sys

% /usr/bin/time -h gmake -j8
Create version.h
Cloning Espressif HAL for 3rd Party Platforms
Clone: chip/esp-hal-3rdparty LN: platform/board to
/XXX/nuttx-apps.git/platform/dummy
Register: nsh
Register: sh
Espressif HAL for 3rd Party Platforms: 20690e67695f0a8170a19ec99e2e9a13b620e94d
CPP:  
/XXX/nuttx.git/arch/xtensa/src/chip/esp-hal-3rdparty/components/esp_rom/esp32/ld/esp32.rom.newlib-funcs.ld->
/XXX/nuttx.git/arch/xtensa/src/chip/esp-hal-3rdparty/components/esp_rom/esp32/ld/esp32.rom.newlib-funcs.ld.tmp
LD: nuttx
CP: nuttx.hex
MKIMAGE: ESP32 binary
esptool.py -c esp32 elf2image --ram-only-header -fs 4MB -fm dio -ff
40m -o nuttx.bin nuttx
esptool.py v4.7.0
Creating esp32 image...
ROM segments hidden - only RAM segments are visible to the ROM loader!
Merged 1 ELF section
Successfully created esp32 image.
Generated: nuttx.bin
        39,74s real             1m31,54s user           1m2,00s sys

%  /usr/bin/time -h gmake flash
CPP:  
/XXX/nuttx.git/arch/xtensa/src/chip/esp-hal-3rdparty/components/esp_rom/esp32/ld/esp32.rom.newlib-funcs.ld->
/XXX/nuttx.git/arch/xtensa/src/chip/esp-hal-3rdparty/components/esp_rom/esp32/ld/esp32.rom.newlib-funcs.ld.tmpLD:
nuttx
CP: nuttx.hex
MKIMAGE: ESP32 binary
esptool.py -c esp32 elf2image --ram-only-header -fs 4MB -fm dio -ff
40m -o nuttx.bin nuttx
esptool.py v4.7.0
Creating esp32 image...
ROM segments hidden - only RAM segments are visible to the ROM loader!
Merged 1 ELF section
Successfully created esp32 image.
Generated: nuttx.bin
esptool.py -c esp32 -p /dev/cuaU0 -b 115200  write_flash -fs detect
-fm dio -ff 40m 0x1000 nuttx.bin
esptool.py v4.7.0
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 0x00001000 to 0x00033fff...
Compressed 206984 bytes to 72429...
Wrote 206984 bytes (72429 compressed) at 0x00001000 in 6.7 seconds
(effective 247.0 kbit/s)...
Hash of data verified.

Leaving...
Hard resetting via RTS pin...
        15,25s real             3,07s user              3,17s sys


% cu -l /dev/cuaU0 -s 115200
Connected
ets 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:0x3ffb1f40,len:1388
ho 0 tail 12 room 4
load:0x40080000,len:20320
entry 0x40082650
*** Booting NuttX ***
dram: lma 0x00001020 vma 0x3ffb1f40 len 0x56c    (1388)
iram: lma 0x00001594 vma 0x40080000 len 0x4f60   (20320)
padd: lma 0x00006508 vma 0x00000000 len 0xaaf0   (43760)
imap: lma 0x00011000 vma 0x400e0000 len 0x10d78  (68984)
padd: lma 0x00021d80 vma 0x00000000 len 0xf298   (62104)
dmap: lma 0x00031020 vma 0x3f400020 len 0x2848   (10312)
total segments stored 6

>>> NO NSH HERE DEVICE HANGS <<<


Lets try with the CoreMark:

% gmake clean distclean

% /usr/bin/time -h ./tools/configure.sh -B esp32-devkitc:coremark
        3,93s real              1,73s user              2,46s sys

% /usr/bin/time -h gmake -j8
        42,46s real             1m35,59s user           1m0,58s sys

%  /usr/bin/time -h gmake flash
        13,78s real             2,69s user              2,63s sys

% cu -l /dev/cuaU0 -s 115200
Connected
ets 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:0x3ffb30a0,len:2016
load:0x40080000,len:30100
entry 0x40083940
*** Booting NuttX ***
dram: lma 0x00001020 vma 0x3ffb30a0 len 0x7e0    (2016)
iram: lma 0x00001808 vma 0x40080000 len 0x7594   (30100)
padd: lma 0x00008da8 vma 0x00000000 len 0x8250   (33360)
imap: lma 0x00011000 vma 0x400e0000 len 0xde14   (56852)
padd: lma 0x0001ee1c vma 0x00000000 len 0x21fc   (8700)
dmap: lma 0x00021020 vma 0x3f400020 len 0x14fc   (5372)
total segments stored 6

>>> COREMARK DOES NOT RUN <<<


Looks like default Python switched from 3.9 to 3.11. Reinstalled
py311-esptool system package.

% gmake clean distclean

% /usr/bin/time -h ./tools/configure.sh -B esp32-devkitc:coremark
        3,91s real              1,90s user              2,30s sys

% /usr/bin/time -h gmake -j8
Create version.h
Cloning Espressif HAL for 3rd Party Platforms
Clone: chip/esp-hal-3rdparty LN: platform/board to
/XXX/nuttx-apps.git/platform/dummy
Downloading: https://github.com/eembc/coremark/archive/main.zip
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
100  475k    0  475k    0     0   621k      0 --:--:-- --:--:-- --:--:--  621k
Unpacking: main.zip -> coremark
Hmm...  Looks like a unified diff to me...
The text leading up to this was:
--------------------------
|--- coremark/posix/core_portme.c
|+++ coremark/posix/core_portme.c
--------------------------
Patching file coremark/posix/core_portme.c using Plan A...
Hunk #1 succeeded at 208.
done
Register: coremark
Espressif HAL for 3rd Party Platforms: 20690e67695f0a8170a19ec99e2e9a13b620e94d
CPP:  
/XXX/nuttx.git/arch/xtensa/src/chip/esp-hal-3rdparty/components/esp_rom/esp32/ld/esp32.rom.newlib-funcs.ld->
/XXX/nuttx.git/arch/xtensa/src/chip/esp-hal-3rdparty/components/esp_rom/esp32/ld/esp32.rom.newlib-funcs.ld.tmpLD:
nuttx
CP: nuttx.hex
MKIMAGE: ESP32 binary
esptool.py -c esp32 elf2image --ram-only-header -fs 4MB -fm dio -ff
40m -o nuttx.bin nuttx
esptool.py v4.7.0
Creating esp32 image...
ROM segments hidden - only RAM segments are visible to the ROM loader!
Merged 1 ELF section
Successfully created esp32 image.
Generated: nuttx.bin
        39,75s real             1m34,74s user           1m0,86s sys


%  /usr/bin/time -h gmake flash
CPP:  
/XXX/nuttx.git/arch/xtensa/src/chip/esp-hal-3rdparty/components/esp_rom/esp32/ld/esp32.rom.newlib-funcs.ld->
/XXX/nuttx.git/arch/xtensa/src/chip/esp-hal-3rdparty/components/esp_rom/esp32/ld/esp32.rom.newlib-funcs.ld.tmpLD:
nuttx
CP: nuttx.hex
MKIMAGE: ESP32 binary
esptool.py -c esp32 elf2image --ram-only-header -fs 4MB -fm dio -ff
40m -o nuttx.bin nuttx
esptool.py v4.7.0
Creating esp32 image...
ROM segments hidden - only RAM segments are visible to the ROM loader!
Merged 1 ELF section
Successfully created esp32 image.
Generated: nuttx.bin
esptool.py -c esp32 -p /dev/cuaU0 -b 115200  write_flash -fs detect
-fm dio -ff 40m 0x1000 nuttx.bin
esptool.py v4.7.0
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 0x00001000 to 0x00022fff...
Compressed 136508 bytes to 66615...
Wrote 136508 bytes (66615 compressed) at 0x00001000 in 6.0 seconds
(effective 183.4 kbit/s)...
Hash of data verified.

Leaving...
Hard resetting via RTS pin...
        13,63s real             2,50s user              2,81s sys

% cu -l /dev/cuaU0 -s 115200
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:0x3ffb30a0,len:2016
load:0x40080000,len:30100
entry 0x40083940
*** Booting NuttX ***
dram: lma 0x00001020 vma 0x3ffb30a0 len 0x7e0    (2016)
iram: lma 0x00001808 vma 0x40080000 len 0x7594   (30100)
padd: lma 0x00008da8 vma 0x00000000 len 0x8250   (33360)
imap: lma 0x00011000 vma 0x400e0000 len 0xde14   (56852)
padd: lma 0x0001ee1c vma 0x00000000 len 0x21fc   (8700)
dmap: lma 0x00021020 vma 0x3f400020 len 0x14fc   (5372)
total segments stored 6

>>> COREMARK DOES NOT RUN HERE TOO <<<


Looking at the history this commit seems to enforce esptool 4.8 to fix
the CI builds, but our build system for ESP32 does not check or alert
if previous versions are present thus building faulty firmware with no
error!

commit 457f9d3dce45affd5f26da9d6369494709ff2314
Author: Almir Okato <almir.ok...@espressif.com>
Date:   Thu Jul 4 11:46:00 2024 +0200

    ci: update required esptool version to 4.8.dev4

    This esptool version is required when building the
    default Simple Boot for Espressif chips.

    Signed-off-by: Almir Okato <almir.ok...@espressif.com>






=== ESP32-C3 ===

% riscv32-esp-elf-gcc -v
Using built-in specs.
COLLECT_GCC=riscv32-esp-elf-gcc
COLLECT_LTO_WRAPPER=/XXX/.espressif/tools/riscv32-esp-elf/esp-2021r2-patch5-8.4.0/riscv32-esp-elf/bin/../libexec/gcc/riscv32-esp-elf/8.4.0/lto-wrapper
Target: riscv32-esp-elf
Configured with:
/builds/idf/crosstool-NG/.build/riscv32-esp-elf/src/gcc/configure
--build=x86_64-build_pc-linux-gnu --host=x86_64-build_pc-linux-gnu
--target=riscv32-esp-elf
--prefix=/builds/idf/crosstool-NG/builds/riscv32-esp-elf
--exec_prefix=/builds/idf/crosstool-NG/builds/riscv32-esp-elf
--with-local-prefix=/builds/idf/crosstool-NG/builds/riscv32-esp-elf/riscv32-esp-elf
--with-headers=/builds/idf/crosstool-NG/builds/riscv32-esp-elf/riscv32-esp-elf/include
--with-newlib --enable-threads=no --disable-shared --with-arch=rv32gc
--with-abi=ilp32 --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/riscv32-esp-elf/buildtools
--with-mpfr=/builds/idf/crosstool-NG/.build/riscv32-esp-elf/buildtools
--with-mpc=/builds/idf/crosstool-NG/.build/riscv32-esp-elf/buildtools
--with-isl=/builds/idf/crosstool-NG/.build/riscv32-esp-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)


% gmake clean distclean

% /usr/bin/time -h ./tools/configure.sh -B esp32c3-devkit:nsh
        4,07s real              1,86s user              2,38s sys

% /usr/bin/time -h gmake -j8 CROSSDEV=riscv32-esp-elf-
Create version.h
LN: platform/board to /XXX/nuttx-apps.git/platform/dummy
Register: nsh
Register: sh
Register: dumpstack
LD: nuttx
CP: nuttx.hex
MKIMAGE: ESP32-C3 binary
esptool.py -c esp32c3 elf2image -fs 4MB -fm dio -ff 40m -o nuttx.bin nuttx
esptool.py v4.7.0
Creating esp32c3 image...
Merged 1 ELF section
Successfully created esp32c3 image.
Generated: nuttx.bin (ESP32-C3 compatible)
        34,55s real             1m18,50s user           59,23s sys

% /usr/bin/time -h gmake flash CROSSDEV=riscv32-esp-elf-
LD: nuttx
CP: nuttx.hex
MKIMAGE: ESP32-C3 binary
esptool.py -c esp32c3 elf2image -fs 4MB -fm dio -ff 40m -o nuttx.bin nuttx
esptool.py v4.7.0
Creating esp32c3 image...
Merged 1 ELF section
Successfully created esp32c3 image.
Generated: nuttx.bin (ESP32-C3 compatible)
esptool.py -c esp32c3 -p /dev/cuaU0 -b 115200   write_flash -fs 4MB
-fm dio -ff 40m 0x10000 nuttx.bin
esptool.py v4.7.0
Serial port /dev/cuaU0
Connecting.........
Chip is ESP32-C3 (QFN32) (revision v0.3)
Features: WiFi, BLE
Crystal is 40MHz
MAC: 7c:df:a1:b1:58:00
Uploading stub...
Running stub...
Stub running...
Configuring flash size...
Flash will be erased from 0x00010000 to 0x00035fff...
Compressed 155424 bytes to 69417...
Wrote 155424 bytes (69417 compressed) at 0x00010000 in 6.3 seconds
(effective 198.2 kbit/s)...
Hash of data verified.

Leaving...
Hard resetting via RTS pin...
        22,98s real             6,66s user              11,54s sys


% cu -l /dev/cuaU0 -s 115200
Connected
ESP-ROM:esp32c3-api1-20210207
Build:Feb  7 2021
rst:0x1 (POWERON),boot:0xc (SPI_FAST_FLASH_BOOT)
SPIWP:0xee
mode:DIO, clock div:1
load:0x3fcd5820,len:0x16c0
load:0x403cc710,len:0x87c
load:0x403ce710,len:0x2f54
entry 0x403cc710
I (30) boot: ESP-IDF v5.1-dev-3972-g1559b6309f 2nd stage bootloader
I (30) boot: compile time Mar 15 2023 12:14:06
I (31) boot: chip revision: v0.3
I (35) boot.esp32c3: SPI Speed      : 80MHz
I (40) boot.esp32c3: SPI Mode       : DIO
I (44) boot.esp32c3: SPI Flash Size : 4MB
I (49) boot: Enabling RNG early entropy source...
I (54) boot: Partition Table:
I (58) boot: ## Label            Usage          Type ST Offset   Length
I (65) boot:  0 factory          factory app      00 00 00010000 00100000
I (73) boot: End of partition table
I (77) esp_image: segment 0: paddr=00010020 vaddr=3c020020 size=039a0h
( 14752) map
I (88) esp_image: segment 1: paddr=000139c8 vaddr=3fc81a70 size=00200h
(   512) load
I (94) esp_image: segment 2: paddr=00013bd0 vaddr=40380000 size=01a64h
(  6756) load
I (103) esp_image: segment 3: paddr=0001563c vaddr=00000000 size=0aabch ( 43708)
I (117) esp_image: segment 4: paddr=00020100 vaddr=42000100
size=15df8h ( 89592) map
I (133) boot: Loaded app from partition at offset 0x10000
I (133) boot: Disabling RNG early entropy source...

NuttShell (NSH) NuttX-12.7.0
nsh> uname -a
NuttX 12.7.0 10e44f8915-dirty Oct  4 2024 23:04:21 risc-v esp32c3-devkit
nsh> free
                 total       used       free    maxused    maxfree  nused  nfree
      Umem:     373820       5364     368456       5720     368456     19      1


% gmake clean distclean CROSSDEV=riscv32-esp-elf-

% /usr/bin/time -h ./tools/configure.sh -B esp32c3-devkit:coremark
        3,97s real              2,16s user              2,09s sys

% /usr/bin/time -h gmake -j8 CROSSDEV=riscv32-esp-elf-
        32,35s real             1m11,61s user           55,55s sys

% /usr/bin/time -h gmake flash CROSSDEV=riscv32-esp-elf-
        20,03s real             5,94s user              11,38s sys

% cu -l /dev/cuaU0 -s 115200
Connected
ESP-ROM:esp32c3-api1-20210207
Build:Feb  7 2021
rst:0x1 (POWERON),boot:0xc (SPI_FAST_FLASH_BOOT)
SPIWP:0xee
mode:DIO, clock div:1
load:0x3fcd5820,len:0x16c0
load:0x403cc710,len:0x87c
load:0x403ce710,len:0x2f54
entry 0x403cc710
I (30) boot: ESP-IDF v5.1-dev-3972-g1559b6309f 2nd stage bootloader
I (30) boot: compile time Mar 15 2023 12:14:06
I (31) boot: chip revision: v0.3
I (35) boot.esp32c3: SPI Speed      : 80MHz
I (40) boot.esp32c3: SPI Mode       : DIO
I (44) boot.esp32c3: SPI Flash Size : 4MB
I (49) boot: Enabling RNG early entropy source...
I (54) boot: Partition Table:
I (58) boot: ## Label            Usage          Type ST Offset   Length
I (65) boot:  0 factory          factory app      00 00 00010000 00100000
I (73) boot: End of partition table
I (77) esp_image: segment 0: paddr=00010020 vaddr=3c010020 size=00bd0h
(  3024) map
I (86) esp_image: segment 1: paddr=00010bf8 vaddr=3fc81e10 size=0015ch
(   348) load
I (94) esp_image: segment 2: paddr=00010d5c vaddr=40380000 size=01e0ch
(  7692) load
I (104) esp_image: segment 3: paddr=00012b70 vaddr=00000000 size=0d588h ( 54664)
I (119) esp_image: segment 4: paddr=00020100 vaddr=42000100
size=0db60h ( 56160) map
I (128) boot: Loaded app from partition at offset 0x10000
I (128) boot: Disabling RNG early entropy source...
Running CoreMark...
2K performance run parameters for coremark.
CoreMark Size    : 666
Total ticks      : 1472
Total time (secs): 14.720000
Iterations/Sec   : 407.608696
Iterations       : 6000
Compiler version : GCC8.4.0
Compiler flags   : -O3 -fno-strict-aliasing -fomit-frame-pointer
-ffunction-sections -fdata-sections -nostdlib
Memory location  : HEAP
seedcrc          : 0xe9f5
[0]crclist       : 0xe714
[0]crcmatrix     : 0x1fd7
[0]crcstate      : 0x8e3a
[0]crcfinal      : 0xa14c
Correct operation validated. See README.md for run and reporting rules.
CoreMark 1.0 : 407.608696 / GCC8.4.0 -O3 -fno-strict-aliasing
-fomit-frame-pointer -ffunction-sections -fdata-sections -nostdlib /
HEAP

% gmake clean distclean CROSSDEV=riscv32-esp-elf-






=== STM32F769I-DISCO ===

This is my first play with NuttX on that board.. I can also verify
flashing instructions :-)

% arm-none-eabi-gcc --version
arm-none-eabi-gcc (GNU Arm Embedded Toolchain ) 10.3.1 20210824 (release)
Copyright (C) 2020 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

% ./tools/configure.sh -B stm32f769i-disco:nsh
        4,14s real              1,98s user              2,46s sys

% /usr/bin/time -h gmake -j8
        40,20s real             3m14,54s user           39,11s sys

% /usr/bin/time -h gmake flash
LD: nuttx
CP: nuttx.hex
CP: nuttx.bin
        5,02s real              2,51s user              2,82s sys

% openocd -f  interface/stlink.cfg -f target/stm32f7x.cfg -c 'program
nuttx.bin 0x08000000; reset run; exit'
Open On-Chip Debugger 0.12.0
Licensed under GNU GPL v2
For bug reports, read
        http://openocd.org/doc/doxygen/bugs.html
Info : auto-selecting first available session transport "hla_swd". To
override use 'transport select <transport>'.
Info : The selected transport took over low-level target control. The
results might differ compared to plain JTAG/SWD
Info : clock speed 2000 kHz
Info : STLINK V2J27M15 (API v2) VID:PID 0483:374B
Info : Target voltage: 3.221551
Info : [stm32f7x.cpu] Cortex-M7 r1p0 processor detected
Info : [stm32f7x.cpu] target has 8 breakpoints, 4 watchpoints
Info : starting gdb server for stm32f7x.cpu on 3333
Info : Listening on port 3333 for gdb connections
Info : Unable to match requested speed 2000 kHz, using 1800 kHz
Info : Unable to match requested speed 2000 kHz, using 1800 kHz
[stm32f7x.cpu] halted due to debug-request, current mode: Thread
xPSR: 0x01000000 pc: 0x0800037c msp: 0x20021928
Info : Unable to match requested speed 8000 kHz, using 4000 kHz
Info : Unable to match requested speed 8000 kHz, using 4000 kHz
** Programming Started **
Info : device id = 0x10006451
Info : flash size = 2048 KiB
Info : Single Bank 2048 kiB STM32F76x/77x found
** Programming Finished **
Info : Unable to match requested speed 2000 kHz, using 1800 kHz
Info : Unable to match requested speed 2000 kHz, using 1800 kHz

% cu -l /dev/cuaU0 -s 115200
Connected
$$$08170221053F680F3A7BF125
NuttShell (NSH) NuttX-12.7.0
nsh> uname -a
NuttX 12.7.0 10e44f8915-dirty Oct  4 2024 23:25:59 arm stm32f769i-disco
nsh> free
nsh: free: command not found
nsh> help
help usage:  help [-v] [<cmd>]

    .           cd          exit        mkrd        sleep       unset
    [           cp          expr        mount       source      uptime
    ?           cmp         false       mv          test        usleep
    alias       dirname     help        printf      time        xd
    unalias     dd          hexdump     pwd         true
    basename    dmesg       kill        rm          truncate
    break       echo        ls          rmdir       uname
    cat         exec        mkdir       set         umount

Builtin Apps:
    nsh    sh


% gmake clean distclean

% /usr/bin/time -h ./tools/configure.sh -B stm32f769i-disco:netnsh
        4,11s real              1,92s user              2,50s sys

% /usr/bin/time -h gmake -j8
        53,49s real             4m24,31s user           49,74s sys

% /usr/bin/time -h gmake flash
        6,33s real              2,93s user              3,73s sys

% openocd -f  interface/stlink.cfg -f target/stm32f7x.cfg -c 'program
nuttx.bin 0x08000000; reset run; exit'
Open On-Chip Debugger 0.12.0
Licensed under GNU GPL v2
For bug reports, read
        http://openocd.org/doc/doxygen/bugs.html
Info : auto-selecting first available session transport "hla_swd". To
override use 'transport select <transport>'.
Info : The selected transport took over low-level target control. The
results might differ compared to plain JTAG/SWD
Info : clock speed 2000 kHz
Info : STLINK V2J27M15 (API v2) VID:PID 0483:374B
Info : Target voltage: 3.221551
Info : [stm32f7x.cpu] Cortex-M7 r1p0 processor detected
Info : [stm32f7x.cpu] target has 8 breakpoints, 4 watchpoints
Info : starting gdb server for stm32f7x.cpu on 3333
Info : Listening on port 3333 for gdb connections
Info : Unable to match requested speed 2000 kHz, using 1800 kHz
Info : Unable to match requested speed 2000 kHz, using 1800 kHz
[stm32f7x.cpu] halted due to debug-request, current mode: Thread
xPSR: 0x01000000 pc: 0x0800037c msp: 0x20021928
Info : Unable to match requested speed 8000 kHz, using 4000 kHz
Info : Unable to match requested speed 8000 kHz, using 4000 kHz
** Programming Started **
Info : device id = 0x10006451
Info : flash size = 2048 KiB
Info : Single Bank 2048 kiB STM32F76x/77x found
** Programming Finished **
Info : Unable to match requested speed 2000 kHz, using 1800 kHz
Info : Unable to match requested speed 2000 kHz, using 1800 kHz


% cu -l /dev/cuaU0 -s 115200
Connected
$$$08170221053F680F3A7BF125
NuttShell (NSH) NuttX-12.7.0
No MOTD string provided
nsh>
nsh> uname -a
NuttX stntest 12.7.0 10e44f8915-dirty Oct  4 2024 23:32:10 arm stm32f769i-disco
nsh> help
help usage:  help [-v] [<cmd>]

    .           cd          exec        kill        printf      time
    [           cp          exit        pkill       ps          true
    ?           cmp         expr        ls          pwd         truncate
    alias       dirname     false       mkdir       rm          uname
    unalias     dd          fdinfo      mkrd        rmdir       umount
    arp         df          free        mount       set         unset
    basename    dmesg       help        mv          sleep       uptime
    break       echo        hexdump     nslookup    source      usleep
    cat         env         ifconfig    pidof       test        xd

Builtin Apps:
    nsh      ping     renew    sh

nsh> ifconfig
eth0    Link encap:Ethernet HWaddr ea:db:b5:7a:ff:e4 at UP mtu 1486
        inet addr:10.0.0.2 DRaddr:10.0.0.1 Mask:255.255.255.0

             IPv4   TCP   UDP  ICMP
Received     0004  0000  0004  0000
Dropped      0000  0000  0000  0000
  IPv4        VHL: 0000   Frg: 0000
  Checksum   0000  0000  0000  ----
  TCP         ACK: 0000   SYN: 0000
              RST: 0000  0000
  Type       0000  ----  ----  0000
Sent         0000  0000  0000  0000
  Rexmit     ----  0000  ----  ----


nsh> ifconfig eth0 dhcp
>>> HANGS, NEED RESET <<<

nsh> renew eth0
>>> HANGS, NEED RESET <<<

nsh> ifconfig eth0 XXX.150
nsh> ifconfig
eth0    Link encap:Ethernet HWaddr ea:db:b5:7a:ff:e4 at UP mtu 1486
        inet addr:XXX.150 DRaddr:XXX.1 Mask:255.255.255.0

             IPv4   TCP   UDP  ICMP
Received     0003  0000  0003  0000
Dropped      0000  0000  0000  0000
  IPv4        VHL: 0000   Frg: 0000
  Checksum   0000  0000  0000  ----
  TCP         ACK: 0000   SYN: 0000
              RST: 0000  0000
  Type       0000  ----  ----  0000
Sent         0000  0000  0000  0000
  Rexmit     ----  0000  ----  ----
nsh> ping XXX.1
PING XXX.1 56 bytes of data
56 bytes from XXX.1: icmp_seq=0 time=0.0 ms
...
56 bytes from XXX.1: icmp_seq=9 time=0.0 ms
10 packets transmitted, 10 received, 0% packet loss, time 10100 ms
rtt min/avg/max/mdev = 0.000/0.000/0.000/0.000 ms

 Okay we have a quite powerful hardware lets run some benchmarks on it :-)

BUG: Looks like SPINLOCK benchmark has broken dependencies.

% gmake -j8
LD: nuttx
CP: nuttx.hex
CP: nuttx.bin
octagon% gmake flash
LD: nuttx
CP: nuttx.hex
CP: nuttx.bin

% cu -l /dev/cuaU0 -s 115200

nsh> uname -a
NuttX stntest 12.7.0 10e44f8915-dirty Oct  4 2024 23:50:23 arm stm32f769i-disco

nsh> free
                 total       used       free    maxused    maxfree  nused  nfree
      Umem:     474288      10144     464144      13192     326328     30      5
nsh> help
help usage:  help [-v] [<cmd>]

    .           cd          exec        kill        printf      time
    [           cp          exit        pkill       ps          true
    ?           cmp         expr        ls          pwd         truncate
    alias       dirname     false       mkdir       rm          uname
    unalias     dd          fdinfo      mkrd        rmdir       umount
    arp         df          free        mount       set         unset
    basename    dmesg       help        mv          sleep       uptime
    break       echo        hexdump     nslookup    source      usleep
    cat         env         ifconfig    pidof       test        xd

Builtin Apps:
    coremark          pi_css5           ramspeed
    dhrystone         ping              renew
    nsh               radix2_big_64k    sh

nsh> coremark
Running CoreMark...
2K performance run parameters for coremark.
CoreMark Size    : 666
Total ticks      : 1772
Total time (secs): 17.720000
Iterations/Sec   : 620.767494
Iterations       : 11000
Compiler version : GCC10.3.1 20210824 (release)
Compiler flags   : -Os -fno-strict-aliasing -fomit-frame-pointer
-fno-common -Wall -Wshadow -Wundef -ffunction-sections -fdata-sections
Memory location  : HEAP
seedcrc          : 0xe9f5
[0]crclist       : 0xe714
[0]crcmatrix     : 0x1fd7
[0]crcstate      : 0x8e3a
[0]crcfinal      : 0x33ff
Correct operation validated. See README.md for run and reporting rules.
CoreMark 1.0 : 620.767494 / GCC10.3.1 20210824 (release) -Os
-fno-strict-aliasing -fomit-frame-pointer -fno-common -Wall -Wshadow
-Wundef -ffunction-sections -fdata-sections / HEAP

nsh> dhrystone

Dhrystone Benchmark, Version C, Version 2.2
Program compiled without 'register' attribute
Using MSC clock(), HZ=100

Trying 50000 runs through Dhrystone:
Measured time too small to obtain meaningful results

Trying 500000 runs through Dhrystone:
Measured time too small to obtain meaningful results

Trying 5000000 runs through Dhrystone:
Final values of the variables used in the benchmark:

Int_Glob:            5
        should be:   5
Bool_Glob:           1
        should be:   1
Ch_1_Glob:           A
        should be:   A
Ch_2_Glob:           B
        should be:   B
Arr_1_Glob[8]:       7
        should be:   7
Arr_2_Glob[8][7]:    5550010
        should be:   Number_Of_Runs + 10
Ptr_Glob->
  Ptr_Comp:          537385352
        should be:   (implementation-dependent)
  Discr:             0
        should be:   0
  Enum_Comp:         2
        should be:   2
  Int_Comp:          17
        should be:   17
  Str_Comp:          DHRYSTONE PROGRAM, SOME STRING
        should be:   DHRYSTONE PROGRAM, SOME STRING
Next_Ptr_Glob->
  Ptr_Comp:          537385352
        should be:   (implementation-dependent), same as above
  Discr:             0
        should be:   0
  Enum_Comp:         1
        should be:   1
  Int_Comp:          18
        should be:   18
  Str_Comp:          DHRYSTONE PROGRAM, SOME STRING
        should be:   DHRYSTONE PROGRAM, SOME STRING
Int_1_Loc:           5
        should be:   5
Int_2_Loc:           13
        should be:   13
Int_3_Loc:           7
        should be:   7
Enum_Loc:            1
        should be:   1
Str_1_Loc:           DHRYSTONE PROGRAM, 1'ST STRING
        should be:   DHRYSTONE PROGRAM, 1'ST STRING
Str_2_Loc:           DHRYSTONE PROGRAM, 2'ND STRING
        should be:   DHRYSTONE PROGRAM, 2'ND STRING

Microseconds for one run through Dhrystone:        2.3
Dhrystones per Second:                          441306


nsh> pi_css5
Calculation of PI using FFT and AGM, ver. LG1.1.2-MP1.5.2a.memsave

Usage: pi_css5 digits

Number of digits of pi to calculate?
1000000000
initializing...
Allocation Failure!
nsh>
nsh> pi_css5
Calculation of PI using FFT and AGM, ver. LG1.1.2-MP1.5.2a.memsave

Usage: pi_css5 digits

Number of digits of pi to calculate?
1000000
initializing...
Allocation Failure!
nsh> pi_css5
Calculation of PI using FFT and AGM, ver. LG1.1.2-MP1.5.2a.memsave

Usage: pi_css5 digits

Number of digits of pi to calculate?
65535
initializing...
Allocation Failure!
nsh> pi_css5
Calculation of PI using FFT and AGM, ver. LG1.1.2-MP1.5.2a.memsave

Usage: pi_css5 digits

Number of digits of pi to calculate?
12345
initializing...
Allocation Failure!
nsh> pi_css5
Calculation of PI using FFT and AGM, ver. LG1.1.2-MP1.5.2a.memsave

Usage: pi_css5 digits

Number of digits of pi to calculate?
123
initializing...
nfft= 32
radi_assert: Current Version: NuttX stntest 12.7.0 10e44f8915-dirty
Oct  4 2024 23:50:23 arm
_assert: Assertion failed panic: at file: :0 task: 0x801bda1
up_dump_register: R0: 00000004 R1: 00000000 R2: 00000000  R3: 00000000
up_dump_register: R4: 00000004 R5: 00000033 R6: 2007d9f8  FP: 2007dae8
up_dump_register: R8: 2007da48 SB: 2007da98 SL: 2007f0e0 R11: 2007f0e1
up_dump_register: IP: 2007db58 SP: 2007ef10 LR: 080089d9  PC: 080088f8
up_dump_register: xPSR: 01000000 PRIMASK: 00000000 CONTROL: 00000000
up_dump_register: EXC_RETURN: ffffffe9
dump_stack: User Stack:
dump_stack:   base: 0x2007e858
dump_stack:   size: 00002016
dump_stack:     sp: 0x2007ef10
stack_dump: 0x2007eef0: 00000000 3fe00000 00000000 00000000 00000000
00000000 80000010 00000000
stack_dump: 0x2007ef10: 00000004 080089d9 00000000 08029735 00000000
00000000 00000000 0801c359
stack_dump: 0x2007ef30: 2007d9f8 2007f040 00000020 2007f0e0 2007f1f8
2007f310 2007f040 2007f1f8
stack_dump: 0x2007ef50: 00000000 00000000 2007f090 2007f310 00000001
0000000b 00000020 32316970
stack_dump: 0x2007ef70: 78742e38 00000074 00000000 00000000 00000000
00000000 00000004 ffffffe9
stack_dump: 0x2007ef90: 00000000 00000000 00000000 00000000 00000000
00000000 00000000 00000000
stack_dump: 0x2007efb0: 00000000 00000000 00000000 00000000 00000000
00000000 00000000 00000000
stack_dump: 0x2007efd0: 00000000 00000000 00000000 00000000 00000000
00000000 00000000 00000000
stack_dump: 0x2007eff0: 00000000 0801bda1 2007d588 00000000 00000000
00000000 00000000 00000000
stack_dump: 0x2007f010: 00000000 08008b1d 2007e848 00000001 2007e848
08005cd9 00000000 00000000
stack_dump: 0x2007f030: 00000000 00000000 00000000 00000000 00000000
00000000 00000000 00000000
dump_tasks:    PID GROUP PRI POLICY   TYPE    NPX STATE   EVENT
SIGMASK          STACKBASE  STACKSIZE   COMMAND
dump_task:       0     0   0 FIFO     Kthread - Ready
0000000000000000 0x2002bf5c      1008   <noname>
dump_task:       1     0 224 RR       Kthread - Waiting Semaphore
0000000000000000 0x2007c238      1984   <noname> 0x200201a4 0x200201c8
dump_task:       2     0 100 RR       Kthread - Waiting Semaphore
0000000000000000 0x2007cae8      1984   <noname> 0x200201dc 0x20020200
dump_task:       4     4 100 RR       Task    - Waiting Semaphore
0000000000000000 0x2007e058      2008   <noname>
dump_task:      12    12 100 RR       Task    - Running
0000000000000000 0x2007e858      2016   <noname>

heh =)

nsh> pi_css5
Calculation of PI using FFT and AGM, ver. LG1.1.2-MP1.5.2a.memsave

Usage: pi_css5 digits

Number of digits of pi to calculate?
4
initi_assert: Current Version: NuttX stntest 12.7.0 10e44f8915-dirty
Oct  4 2024 23:50:23 arm
_assert: Assertion failed panic: at file: :0 task: 0x801bda1
up_dump_register: R0: 00000004 R1: 00000000 R2: 00000000  R3: 00000000
up_dump_register: R4: 00000004 R5: 00000033 R6: 2007d968  FP: 2007d9b0
up_dump_register: R8: 2007d980 SB: 2007d998 SL: 2007d9f8 R11: 2007d9f9
up_dump_register: IP: 2007db58 SP: 2007ef10 LR: 080089d9  PC: 080088f8
up_dump_register: xPSR: 01000000 PRIMASK: 00000000 CONTROL: 00000000
up_dump_register: EXC_RETURN: ffffffe9
dump_stack: User Stack:
dump_stack:   base: 0x2007e858
dump_stack:   size: 00002016
dump_stack:     sp: 0x2007ef10
stack_dump: 0x2007eef0: 00000000 3fe00000 00000000 00000000 00000000
00000000 80000010 00000000
stack_dump: 0x2007ef10: 00000004 080089d9 00000000 08029735 00000000
00000000 00000000 0801c359
stack_dump: 0x2007ef30: 2007d968 2007d9c8 00000002 2007d9f8 2007da20
2007da48 2007d9c8 2007da20
stack_dump: 0x2007ef50: 00000000 00000000 2007d9e0 2007da48 00000001
00000003 00000002 2e386970
stack_dump: 0x2007ef70: 00747874 00000000 00000000 00000000 00000000
00000000 00000004 ffffffe9
stack_dump: 0x2007ef90: 00000000 00000000 00000000 00000000 00000000
00000000 00000000 00000000
stack_dump: 0x2007efb0: 00000000 00000000 00000000 00000000 00000000
00000000 00000000 00000000
stack_dump: 0x2007efd0: 00000000 00000000 00000000 00000000 00000000
00000000 00000000 00000000
stack_dump: 0x2007eff0: 00000000 0801bda1 2007d588 00000000 00000000
00000000 00000000 00000000
stack_dump: 0x2007f010: 00000000 08008b1d 2007e848 00000001 2007e848
08005cd9 00000000 00000000
stack_dump: 0x2007f030: 00000000 00000000 00000000 00000000 00000000
00000000 00000000 00000000
dump_tasks:    PID GROUP PRI POLICY   TYPE    NPX STATE   EVENT
SIGMASK          STACKBASE  STACKSIZE   COMMAND
dump_task:       0     0   0 FIFO     Kthread - Ready
0000000000000000 0x2002bf5c      1008   <noname>
dump_task:       1     0 224 RR       Kthread - Waiting Semaphore
0000000000000000 0x2007c238      1984   <noname> 0x200201a4 0x200201c8
dump_task:       2     0 100 RR       Kthread - Waiting Semaphore
0000000000000000 0x2007cae8      1984   <noname> 0x200201dc 0x20020200
dump_task:       4     4 100 RR       Task    - Waiting Semaphore
0000000000000000 0x2007e058      2008   <noname>
dump_task:       5     5 100 RR       Task    - Running
0000000000000000 0x2007e858      2016   <noname>

BROKEN :-)

nsh> radix2_big_64k
Malloc Failed from coremark-pro/mith/src/th_rand.c:241!

BROKEN :-)

% gmake clean distclean

% ./tools/configure.sh -B stm32f769i-disco:nsh

gmake menuconfig -> add apps / testing / ostest

gmake -j8
gmake flash

% openocd -f  interface/stlink.cfg -f target/stm32f7x.cfg -c 'program
nuttx.bin 0x08000000; reset run; exit'

% cu -l /dev/cuaU0 -s 115200

nsh> uname -a
NuttX 12.7.0 10e44f8915-dirty Oct  5 2024 00:02:28 arm stm32f769i-disco

nsh> ostest
(..)
user_main: vfork() test
vfork_test: Child 69 ran successfully

Final memory usage:
VARIABLE  BEFORE   AFTER
======== ======== ========
arena       7dcbc    7dcbc
ordblks         3        6
mxordblk    59ad0    59ad0
uordblks     4244     69a4
fordblks    79a78    77318
user_main: Exiting
ostest_main: Exiting with status 0

Looks like memory usage before and after seems to differ that confirms
the memory leak?

I wanted to use "free" command but it is not built although it is not
disabled in the config:

nsh> free
nsh: free: command not found

% grep CONFIG_NSH_DISABLE_FREE .config
# CONFIG_NSH_DISABLE_FREE is not set


Lets try again with netsh configuration that had free available and add ostest:

% gmake clean distclean

% usr/bin/time -h ./tools/configure.sh -B stm32f769i-disco:netnsh
        4,24s real              1,95s user              2,60s sys

% gmake menuconfig <- enable ostest

% grep OSTEST .config
CONFIG_TESTING_OSTEST=y
CONFIG_TESTING_OSTEST_LOOPS=1
CONFIG_TESTING_OSTEST_STACKSIZE=8192
CONFIG_TESTING_OSTEST_NBARRIER_THREADS=8
CONFIG_TESTING_OSTEST_RR_RANGE=10000
CONFIG_TESTING_OSTEST_RR_RUNS=10
# CONFIG_TESTING_OSTEST_FPUTESTDISABLE is not set
CONFIG_TESTING_OSTEST_FPULOOPS=16
CONFIG_TESTING_OSTEST_FPUMSDELAY=750
CONFIG_TESTING_OSTEST_FPUPRIORITY=100
CONFIG_TESTING_OSTEST_FPUSTACKSIZE=2048
CONFIG_TESTING_OSTEST_WAITRESULT=y


% /usr/bin/time -h gmake -j8
        54,54s real             4m31,11s user           50,04s sys

% gmake flash
LD: nuttx
CP: nuttx.hex
CP: nuttx.bin

% openocd -f  interface/stlink.cfg -f target/stm32f7x.cfg -c 'program
nuttx.bin 0x08000000; reset run; exit'

% cu -l /dev/cuaU0 -s 115200
Connected
$$$08170221053F680F3A7BF125
nsh> uname -a
NuttX stntest 12.7.0 10e44f8915-dirty Oct  5 2024 00:43:15 arm stm32f769i-disco
nsh> free
                 total       used       free    maxused    maxfree  nused  nfree
      Umem:     483056      10112     472944      11192     335096     29      4
nsh> uname -a
NuttX stntest 12.7.0 10e44f8915-dirty Oct  5 2024 00:43:15 arm stm32f769i-disco
nsh> free
                 total       used       free    maxused    maxfree  nused  nfree
      Umem:     483056      10112     472944      11192     335096     29      4

nsh> ostest
(..)
user_main: vfork() test
vfork_test: Child 140 ran successfully

Final memory usage:
VARIABLE  BEFORE   AFTER
======== ======== ========
arena       75ef0    75ef0
ordblks         4        6
mxordblk    51cf8    51cf8
uordblks     5500     7c68
fordblks    709f0    6e288
user_main: Exiting
ostest_main: Exiting with status 0

nsh> free
                 total       used       free    maxused    maxfree  nused  nfree
      Umem:     483056      10200     472856      49640     335096     31      5


nsh> ostest
(..)
user_main: vfork() test
vfork_test: Child 280 ran successfully

Final memory usage:
VARIABLE  BEFORE   AFTER
======== ======== ========
arena       75ef0    75ef0
ordblks         4        6
mxordblk    51cf8    51cf8
uordblks     5560     7c68
fordblks    70990    6e288
user_main: Exiting
ostest_main: Exiting with status 0

nsh> free
                 total       used       free    maxused    maxfree  nused  nfree
      Umem:     483056      10200     472856      49728     335096     31      5


-- 
CeDeROM, SQ7MHZ, http://www.tomek.cedro.info

Reply via email to