Warn if sending bitstream to FPGA fails
This commit is contained in:
1 file changed
+5
@@ -357,8 +357,13 @@ static void FpgaDownloadAndGoEx(int bitstream_target, bool keep_em) {
|
|||||||
LZ4_streamDecode_t lz4StreamDecode_body = {{ 0 }};
|
LZ4_streamDecode_t lz4StreamDecode_body = {{ 0 }};
|
||||||
compressed_fpga_stream.lz4StreamDecode = &lz4StreamDecode_body;
|
compressed_fpga_stream.lz4StreamDecode = &lz4StreamDecode_body;
|
||||||
uint8_t *output_buffer = BigBuf_calloc(FPGA_RING_BUFFER_BYTES);
|
uint8_t *output_buffer = BigBuf_calloc(FPGA_RING_BUFFER_BYTES);
|
||||||
|
if (output_buffer == NULL) {
|
||||||
|
Dbprintf(_RED_("Not enough memory to decompress FPGA image (%d bytes)"), FPGA_RING_BUFFER_BYTES);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (reset_fpga_stream(bitstream_target, &compressed_fpga_stream, output_buffer) == false) {
|
if (reset_fpga_stream(bitstream_target, &compressed_fpga_stream, output_buffer) == false) {
|
||||||
|
Dbprintf(_RED_("reset_fpga_stream failed"));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user