Загрузка данных
static uint8_t lcd_guard_area[GUARD_SIZE] __aligned(4) __attribute__((section(".noinit")));
void check_guard_corruption(void)
{
int first_corrupted_byte = -1;
int corrupted_count = 0;
printf("check guard corruption\n");
for (int i = 0; i < GUARD_SIZE; i++) {
if (lcd_guard_area[i] != 0xEE) {
if (first_corrupted_byte == -1) {
first_corrupted_byte = i;
}
corrupted_count++;
}
}
if (first_corrupted_byte != -1) {
printf("!!! DETECTED CORRUPTION !!!\n");
printf("First corrupted byte at offset: %d\n", first_corrupted_byte);
printf("Total corrupted bytes: %d\n", corrupted_count);
// Выведем кусок данных для опознания (может там текст или ключи)
printf("Data: %02x %02x %02x %02x\n",
lcd_guard_area[first_corrupted_byte],
lcd_guard_area[first_corrupted_byte+1],
lcd_guard_area[first_corrupted_byte+2],
lcd_guard_area[first_corrupted_byte+3]);
}
}
!!! DETECTED CORRUPTION !!!
First corrupted byte at offset: 0
Total corrupted bytes: 512
Data: 00 2e 00 2e
kernel thread stacks
0x80009528 pa_thread_hnd_in (real size 4096): unused 2400 usage 1696 / 4096 (41 %) prior=11 stack=0x80041e00
0x80009678 i2s_thread_in (real size 4096): unused 3784 usage 312 / 4096 ( 7 %) prior=11 stack=0x80040d00
0x800093d8 pjsua_0 (real size 20480): unused 6856 usage 13624 / 20480 (66 %) prior=12 stack=0x8003bc00
0x80009288 ev_thread (real size 1024): unused 744 usage 280 / 1024 (27 %) prior=12 stack=0x8003b700
0x80009138 media (real size 4096): unused 2328 usage 1768 / 4096 (43 %) prior=12 stack=0x8003a600
0x80008fe8 main_thread (real size 30720): unused 14256 usage 16464 / 30720 (53 %) prior=10 stack=0x8002b380
0x80009e20 usbd_msc (real size 1024): unused 736 usage 288 / 1024 (28 %) prior=-1 stack=0x80027280
0x80008580 lcd_thread_id (real size 4096): unused 0 usage 4096 / 4096 (100 %) prior=13 stack=0x80023480
0x80009f38 input (real size 1024): unused 776 usage 248 / 1024 (24 %) prior=14 stack=0x80027700
0x8000a358 rx_q[0] (real size 2048): unused 1632 usage 416 / 2048 (20 %) prior=-1 stack=0x80027f80
0x8000a200 net_mgmt (real size 896): unused 656 usage 240 / 896 (26 %) prior=-1 stack=0x80027b80
0x8000a508 tcp_work (real size 1024): unused 784 usage 240 / 1024 (23 %) prior=-14 stack=0x80028800
0x80009d08 usbd (real size 1024): unused 768 usage 256 / 1024 (25 %) prior=-8 stack=0x80026e00
0x80008c10 shell_uart (real size 2048): unused 916 usage 1132 / 2048 (55 %) prior=14 stack=0x80026580
0x80007f18 kbd-matrix (real size 1024): unused 672 usage 352 / 1024 (34 %) prior=0 stack=0x80008100
0x8000abe0 sysworkq (real size 1664): unused 1200 usage 464 / 1664 (27 %) prior=-1 stack=0x8002aa80
0x8000a650 udc_work_q (real size 512): unused 272 usage 240 / 512 (46 %) prior=-1 stack=0x80028c80
0x8000a788 ENET_RX (real size 2048): unused 1544 usage 504 / 2048 (24 %) prior=-14 stack=0x80028f00
0x800086b8 logging (real size 8192): unused 7832 usage 360 / 8192 ( 4 %) prior=14 stack=0x80024500
0x8000a970 idle (real size 384): unused 312 usage 72 / 384 (18 %) prior=15 stack=0x8002a000
0x80029700 IRQ 00 (real size 2048): unused 1640 usage 408 / 2048 (19 %)
.bss.guid_chars
0x000000008001f973 0x40 ../libpjproject.a(guid_simple.c.obj)
.bss.buf.1 0x000000008001f9b3 0xfe ../libpjproject.a(sock_bsd.c.obj)
.bss.msg.0 0x000000008001fab1 0x20 ../libpjproject.a(transport_srtp.c.obj)
.bss.zephyr_audio_out_bufs
0x000000008001fad1 0x1900 ../libpjproject.a(zephyr_audio_dev.c.obj)
.bss.zephyr_audio_in_bufs
0x00000000800213d1 0x1900 ../libpjproject.a(zephyr_audio_dev.c.obj)
.bss.start_stream
0x0000000080022cd1 0x1 ../libpjproject.a(zephyr_i2s_dev.c.obj)
.bss.tpsel_info_buf.0
0x0000000080022cd2 0x50 ../libpjproject.a(sip_transport.c.obj)
.bss.str.1 0x0000000080022d22 0x2e ../libpjproject.a(sip_transport.c.obj)
.bss.count_aud_dev
0x0000000080022d50 0x1 ../libpjproject.a(audio_dev.c.obj)
.bss.bit_string
0x0000000080022d51 0x401 ../libpjproject.a(datatypes.c.obj)
.bss.err_level
0x0000000080023152 0x1 ../libpjproject.a(srtp_err.c.obj)
.bss.srtp_aes_icm_256_test_case_0_nonce
0x0000000080023153 0x10 ../libpjproject.a(cipher_test_cases.c.obj)
.bss.srtp_aes_icm_192_test_case_0_nonce
0x0000000080023163 0x10 ../libpjproject.a(cipher_test_cases.c.obj)
.bss.srtp_aes_icm_128_test_case_0_nonce
0x0000000080023173 0x10 ../libpjproject.a(cipher_test_cases.c.obj)
.bss.__tzname_dst
0x0000000080023183 0xc /home/vovan/ZEPHYR_RTOS/zephyrsdk/zephyr-sdk-0.16.3/arm-zephyr-eabi/bin/../lib/gcc/../../picolibc/arm-zephyr-eabi/lib/thumb/v7e-m+dp/hard/libc.a(libc_time_tzset.c.o)
.bss.__tzname_std
0x000000008002318f 0xc /home/vovan/ZEPHYR_RTOS/zephyrsdk/zephyr-sdk-0.16.3/arm-zephyr-eabi/bin/../lib/gcc/../../picolibc/arm-zephyr-eabi/lib/thumb/v7e-m+dp/hard/libc.a(libc_time_tzset.c.o)
*(SORT_BY_ALIGNMENT(COMMON))
*(SORT_BY_ALIGNMENT(.kernel_bss.*))
0x000000008002319c __bss_end = ALIGN (0x4)
noinit 0x0000000080023200 0x8845c
*(SORT_BY_ALIGNMENT(.noinit))
.noinit 0x0000000080023200 0x200 ../app/libapp.a(zephyr_lcd.c.obj)
*(SORT_BY_ALIGNMENT(.noinit.*))
.noinit."WEST_TOPDIR/zephyr/samples/pjsip/pjproject/pjsip-apps/src/samples/zephyr_lcd.c".1
0x0000000080023400 0x1080 ../app/libapp.a(zephyr_lcd.c.obj)
0x0000000080023400 _k_thread_stack_lcd_thread_id
.noinit."WEST_TOPDIR/zephyr/subsys/logging/log_core.c".0