feat(psram): support bss on psram on p4

This commit is contained in:
Armando
2024-07-15 15:56:23 +08:00
parent 172784733c
commit 0b5db82e5e
5 changed files with 47 additions and 7 deletions
+9
View File
@@ -11,6 +11,7 @@
* When we add more types of external RAM memory, this can be made into a more intelligent dispatcher.
*----------------------------------------------------------------------------------------------------*/
#include <sys/param.h>
#include <string.h>
#include "sdkconfig.h"
#include "esp_attr.h"
#include "esp_err.h"
@@ -521,3 +522,11 @@ bool esp_psram_extram_test(void)
return true;
}
void esp_psram_bss_init(void)
{
#if CONFIG_SPIRAM_ALLOW_BSS_SEG_EXTERNAL_MEMORY
size_t size = (&_ext_ram_bss_end - &_ext_ram_bss_start) * sizeof(_ext_ram_bss_start);
memset(&_ext_ram_bss_start, 0, size);
#endif
}