opencv component overload DRAM.bss , how can i put into PSRAM

k1924001
Posts: 4
Joined: Fri Mar 22, 2024 4:12 am

opencv component overload DRAM.bss , how can i put into PSRAM

Postby k1924001 » Fri Mar 22, 2024 4:22 am

I tried to put EXT_RAM_BSS_ATTR , example: EXT_RAM_BSS_ATTR cv::QRCodeDetector QRdetecter; but didnt't work , dram.bss still overload, i read there is also possible to place the BSS section of a component or a library to external RAM using linker fragment scheme extram_bss. But how? there is no further instruction.

ESP_Sprite
Posts: 9052
Joined: Thu Nov 26, 2015 4:08 am

Re: opencv component overload DRAM.bss , how can i put into PSRAM

Postby ESP_Sprite » Fri Mar 22, 2024 11:41 am

There's an option for that somewhere in menuconfig. Note that you do need to annotate the bss variables you want in psram with a certain attribute; see the help for the menuconfig option.

k1924001
Posts: 4
Joined: Fri Mar 22, 2024 4:12 am

Re: opencv component overload DRAM.bss , how can i put into PSRAM

Postby k1924001 » Fri Mar 22, 2024 4:38 pm

ESP_Sprite wrote:
Fri Mar 22, 2024 11:41 am
There's an option for that somewhere in menuconfig. Note that you do need to annotate the bss variables you want in psram with a certain attribute; see the help for the menuconfig option.
I know CONFIG_SPIRAM_ALLOW_BSS_SEG_EXTERNAL_MEMORY, Found in: Component config > ESP PSRAM > CONFIG_SPIRAM > SPI RAM config, I enable it before .I really don't konw how to ues extram_bss to make components .bss into PSRAM.bss

ESP_Sprite
Posts: 9052
Joined: Thu Nov 26, 2015 4:08 am

Re: opencv component overload DRAM.bss , how can i put into PSRAM

Postby ESP_Sprite » Sat Mar 23, 2024 2:57 am

If you enable that, you can mark variables to live in PSRAM BSS rather than internal BSS. Example:

Code: Select all

char very_big_variable[1024*1024];
would become

Code: Select all

#include <esp_attr.h>
...
EXT_RAM_BSS_ATTR char very_big_variable[1024*1024];
to allocate it in PSRAM.

k1924001
Posts: 4
Joined: Fri Mar 22, 2024 4:12 am

Re: opencv component overload DRAM.bss , how can i put into PSRAM

Postby k1924001 » Sun Mar 24, 2024 9:54 am

ESP_Sprite wrote:
Sat Mar 23, 2024 2:57 am
If you enable that, you can mark variables to live in PSRAM BSS rather than internal BSS. Example:

Code: Select all

char very_big_variable[1024*1024];
would become

Code: Select all

#include <esp_attr.h>
...
EXT_RAM_BSS_ATTR char very_big_variable[1024*1024];
to allocate it in PSRAM.
Thanks, i understand,it can't work on C++ CLASS.

Who is online

Users browsing this forum: Bing [Bot] and 193 guests