3 int main(
int argc,
char** argv) {
9 std::cout <<
"Found device with name: " <<
info.name << std::endl;
13 std::list<dai::DeviceBootloader::Memory> supportedMemTypes = {dai::DeviceBootloader::Memory::FLASH, dai::DeviceBootloader::Memory::EMMC};
14 if(bl.
getType() == dai::DeviceBootloader::Type::USB) {
15 std::cout <<
"USB Bootloader - supports only Flash memory" << std::endl;
16 supportedMemTypes = {dai::DeviceBootloader::Memory::FLASH};
18 std::cout <<
"NETWORK Bootloader, is User Bootloader: " << bl.
isUserBootloader() << std::endl;
22 for(
const auto& mem : supportedMemTypes) {
23 std::cout << std::endl;
25 if(memoryInfo.available) {
26 std::cout <<
"Memory '" << mem <<
"' size: " << memoryInfo.
size <<
", info: " << memoryInfo.info << std::endl;
29 std::cout <<
"Application, flashed: " << appInfo.
hasApplication <<
" firmware version: " << appInfo.firmwareVersion
30 <<
" application name: " << appInfo.applicationName << std::endl;
32 std::cout <<
"Memory '" << mem <<
"' not available..." << std::endl;
35 }
catch(
const std::exception& ex) {
36 std::cout <<
"Couldn't retrieve memory details: " << ex.what() << std::endl;
39 std::cout <<
"No devices found" << std::endl;