unisoc / zephyr

Primary GIT Repository for the Zephyr Project
https://docs.zephyrproject.org
Apache License 2.0
4 stars 12 forks source link

memset large memory appear stack message #25

Open lispread opened 6 years ago

lispread commented 6 years ago

log message: [UNISOC] [WRN] main: Unisoc fdl 0x11 do_download:enter 1 is 2 is 104720two is 104720three is 0four is 104720two is 108734three is 1four is 108734two is 10c748 USAGE FAULT Executing thread ID (thread): 0x00110c88 Faulting instruction address: 0x0 Illegal use of the EPSR Fatal fault in essential thread! Spinning...

code : for (i = 0; i < PACKET_MAX_NUM; i++) { printf("two is %x", &packet[i]); memset (&packet[i], 0, sizeof (dl_packet_t)); printf("three is %x", i); packet[i].next = &packet[i+1]; printf("four is %x", &packet[i]); } dl_packet_t size 16K

bublover commented 6 years ago

Enable CONFIG_INIT_STACKS=y and then use the STACK_ANALYZE() macro to get the thread stack usage.