With
assert(arr != NULL); uncommented, it crashes once and halts
Serial with baud 250000
(41) boot: Assert failed in void setup(), array-test2.ino:12 (arr != NULL)
baud 115200
ets Jun 8 2016 00:22:57
rst:0x1 (POWERON_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
ets Jun 8 2016 00:22:57
rst:0x10 (RTCWDT_RTC_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:1
load:0x3fff0018,len:4
load:0x3fff001c,len:952
load:0x40078000,len:6084
load:0x40080000,len:7936
entry 0x40080310
With
assert(arr != NULL); commented out, it crashes and reboots forever
baud 250000
cheers
Guru Meditation Error: Core 1 panic'ed (StoreProhibited). Exception was unhandled.
Core 1 register dump:
PC : 0x400d09d2 PS : 0x00060530 A0 : 0x800e20e1 A1 : 0x3ffb1f80
A2 : 0x00000000 A3 : 0x0001c200 A4 : 0x00000000 A5 : 0x3ffc3c80
A6 : 0x00000000 A7 : 0x00000000 A8 : 0x800d09c5 A9 : 0x3ffb1f60
A10 : 0x00000008 A11 : 0x00000006 A12 : 0x0800001c A13 : 0x00000003
A14 : 0x00000001 A15 : 0x00000000 SAR : 0x0000001f EXCCAUSE: 0x0000001d
EXCVADDR: 0x00000000 LBEG : 0x400d09ce LEND : 0x400d09d7 LCOUNT : 0x0001c1ff
Backtrace: 0x400d09d2:0x3ffb1f80 0x400e20de:0x3ffb1fa0
Rebooting...
baud 115200
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:1
load:0x3fff0018,len:4
load:0x3fff001c,len:952
load:0x40078000,len:6084
load:0x40080000,len:7936
entry 0x40080310
Code
Code: Select all
uint8_t *arr;
float arrF[768];
uint8_t arr2[768];
uint8_t arr3[768];
uint16_t arr4[850];
void setup() {
// put your setup code here, to run once:
Serial.begin(250000);
arr = (uint8_t*)malloc(115200);
assert(arr != NULL);
Serial.println("end");
}
void loop() {
Serial.println("cheers");
for(uint32_t i=0; i<115200;i++) {
arr[i]=(uint8_t)i;
}
for(uint16_t i=0;i<768;i++) {
arrF[i]=arr[i]*43.0;
arr2[i]=arrF[i];
arr3[i]=arrF[768-i];
arr4[i]=arr2[i]*3*arr3[i];
}
}