Search found 2 matches

by xutengl
Fri Jun 02, 2023 12:03 am
Forum: ESP-IDF
Topic: why can't I use an array of size larger than 3584 bytes in main() ?
Replies: 2
Views: 684

why can't I use an array of size larger than 3584 bytes in main() ?

In the following code, I declared an array of size 3585 bytes, it compiles without error but during execution, it constantly reboots my esp32-Wrover-E chip. If I reduce the array size to 3584 bytes, then there is no such issue. Why? Also, if I declare the array of size larger than 3585 bytes outside...
by xutengl
Thu Jun 01, 2023 11:57 pm
Forum: ESP-IDF 中文讨论版
Topic: 在app_main() 中无法使用大于3584 字节的数据类型
Replies: 1
Views: 815

在app_main() 中无法使用大于3584 字节的数据类型

以下代码中,int_array 的大小为3585字节,可以编译,但运行时esp32会持续重启。 如果把int_array 减小一个字节,则不会一直重启。 如果把int_array定义为全局变量或者用动态内存分配,则不会出现问题。 请问这是为什么? PS: esp-idf 版本 5.0.1, #include "freertos/FreeRTOS.h" #include "freertos/task.h" #include <stdio.h> void app_main(void) { uint8_t int_array[3585] = {0}; while (1) { int_array[0]...