mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-08-21 05:43:48 -07:00
visual clue in case of data decompression error at boot time
This commit is contained in:
parent
14f62eaa88
commit
e17ff8260f
1 changed files with 10 additions and 3 deletions
|
@ -28,6 +28,7 @@
|
||||||
#endif
|
#endif
|
||||||
#include "BigBuf.h"
|
#include "BigBuf.h"
|
||||||
#include "string.h"
|
#include "string.h"
|
||||||
|
#include "ticks.h"
|
||||||
|
|
||||||
extern common_area_t g_common_area;
|
extern common_area_t g_common_area;
|
||||||
extern uint32_t __data_src_start__[], __data_start__[], __data_end__[], __bss_start__[], __bss_end__[];
|
extern uint32_t __data_src_start__[], __data_start__[], __data_end__[], __bss_start__[], __bss_end__[];
|
||||||
|
@ -40,9 +41,15 @@ static void uncompress_data_section(void) {
|
||||||
// uncompress data segment to RAM
|
// uncompress data segment to RAM
|
||||||
char *p = (char *)__data_src_start__;
|
char *p = (char *)__data_src_start__;
|
||||||
int res = LZ4_decompress_safe(p + 4, (char *)__data_start__, avail_in, avail_out);
|
int res = LZ4_decompress_safe(p + 4, (char *)__data_start__, avail_in, avail_out);
|
||||||
|
if (res < 0) {
|
||||||
if (res < 0)
|
while (true) {
|
||||||
return;
|
LED_A_INV();
|
||||||
|
LED_B_INV();
|
||||||
|
LED_C_INV();
|
||||||
|
LED_D_INV();
|
||||||
|
SpinDelay(200);
|
||||||
|
}
|
||||||
|
}
|
||||||
// save the size of the compressed data section
|
// save the size of the compressed data section
|
||||||
g_common_area.arg1 = avail_in;
|
g_common_area.arg1 = avail_in;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue