Hello, I’m trying to create a project on Visual Studio Code using platformIO and I want to develop it on a ESP32 board but I’m having some problems. Can you help me?
Environment
Development Kit: ESP32-DevKitC
Kit version DevKitC: v4
Module or chip used: ESP32-WROOM-32D
IDF version : v4.2.1
Build System: CMake
Compiler version : 8.4.0
Operating System: Windows
Windows environment type: ESP Command Prompt and PowerShell.
Using an IDE?: Yes → Visual Studio Code
Power Supply: USB
Problem Description
I want to load the speech_recognition example of tensorflow lite on my board (esp32 wroom 32d). I can build and load the code but in the serial monitor I visualize:
"Rebooting…
ets Jun 8 2016 00:22:57
rst:0xc (SW_CPU_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:1252
load:0x40078000,len:12692
load:0x40080400,len:3100
entry 0x400805ec
assertion “buf” failed: file “src/esp/ringbuf.c”, line 51, function: rb_init
abort() was called at PC 0x400e82a3 on core 1"
Can you link to the exact project you’re using? (code, platformio.ini
, etc.)
TensorFlowLite micro_speech
Starting from this repository I have developed the project for esp32 following the instruction and then I have imported this on VSC.
This is the cose of my platformio.ini:
[env:esp32dev]
platform = espressif32
board = esp32dev
framework = arduino
monitor_speed = 115200
platform_packages =
toolchain-xtensa32@~2.80400.0
framework-arduinoespressif32 @ https://github.com/espressif/arduino-esp32.git"
I have made some changes to that repository following the page of towardsdatascience about tensorflow-meet-the-esp32
Can you upload your exact project folder somewhere (e.g., github, google drive) so that we have are working on the exact same project as you?
salah
October 12, 2022, 2:37pm
#6
‘ringbuf.c’ creates the buffer in psram, but ESP32-DevKitC dose not have psram. Use:
’ buf = calloc(1, size);’
without checking for psram
salah
October 12, 2022, 3:16pm
#7
for a general case solution refer to the discussion @
opened 02:14AM - 09 Jul 18 UTC
closed 05:23AM - 15 Jul 18 UTC
### Hardware:
Not a hardware issue.
### Description:
Is there a reliable wa… y like checking a register or something to determine if you have the extra on-board memory that the WROVER unit has? I have ordered a ESP32-WROVER Wemos board that is supposed to have 4MB of PSRAM vs the standard 520KB that the ESP32 normally has. However, I want to be able to access this extra RAM for application use.
I could check the esp_get_free_heap_size() counter on boot and if it's above a certain amount (usually that's around 223000 bytes on cold boot with Serial output active) then we're using a WROVER, but since I am using composite graphics code from bitluni (@me-no-dev probably knows what I'm talking about) the framebuffer does eat up a lot of RAM on a standard ESP32. Is there a function that I can call that asks the ESP32 to return a byte total of how much memory it knows about (ie. the grand total that it "sees").
How does the ESP32 handle this extra memory? Does it notice it and the RTOS adds it into it's memory manager? Or is there some special things going behind the scenes?
My idea is to be able to tell if the PSRAM is attached or not by some mechanism, and then alert the person controlling the ESP32 with a warning saying that they may suffer sudden reboots due to out of memory errors or other crazy things happening.
Thanks!