- FpgaGatherVersion(temp, sizeof(temp));
- DbpString(temp);
- // Send Chip ID
- cmd_send(CMD_ACK,*(AT91C_DBGU_CIDR),0,0,NULL,0);
+ FpgaGatherVersion(FPGA_BITSTREAM_LF, temp, sizeof(temp));
+ strncat(VersionString, temp, sizeof(VersionString) - strlen(VersionString) - 1);
+ FpgaGatherVersion(FPGA_BITSTREAM_HF, temp, sizeof(temp));
+ strncat(VersionString, temp, sizeof(VersionString) - strlen(VersionString) - 1);
+
+ // Send Chip ID and used flash memory
+ uint32_t text_and_rodata_section_size = (uint32_t)&__data_src_start__ - (uint32_t)&_flash_start;
+ uint32_t compressed_data_section_size = common_area.arg1;
+ cmd_send(CMD_ACK, *(AT91C_DBGU_CIDR), text_and_rodata_section_size + compressed_data_section_size, 0, VersionString, strlen(VersionString));