4
4
#include " LittleFileSystem.h"
5
5
#include " FATFileSystem.h"
6
6
#if defined(ARDUINO_PORTENTA_H7_M7)
7
+ #include " portenta_info.h"
7
8
#include " portenta_bootloader.h"
8
9
#include " portenta_lite_bootloader.h"
9
10
#include " portenta_lite_connected_bootloader.h"
@@ -42,6 +43,8 @@ uint8_t* bootloader_identification = (uint8_t*)(BOOTLOADER_ADDR + bootloader_ide
42
43
const unsigned char * bootloader_ptr = &bootloader_mbed_bin[0 ];
43
44
long bootloader_len = bootloader_mbed_bin_len;
44
45
46
+ uint8_t * boardInfo ();
47
+
45
48
void setup () {
46
49
Serial.begin (115200 );
47
50
while (!Serial) {}
@@ -65,6 +68,18 @@ void setup() {
65
68
Serial.println (" Has Video output: " + String (bootloader_data[8 ] == 1 ? " Yes" : " No" ));
66
69
Serial.println (" Has Crypto chip: " + String (bootloader_data[9 ] == 1 ? " Yes" : " No" ));
67
70
71
+ auto info = *((PortentaBoardInfo*)boardInfo ());
72
+ if (info.magic == 0xB5 ) {
73
+ Serial.println (" Secure info version: " + String (info.version ));
74
+ Serial.println (" Secure board revision: " + String (info.revision >> 8 ) + " ." + String (info.revision & 0xFF ));
75
+ Serial.println (" Secure carrier identification: " + String (info.carrier >> 8 ) + " ." + String (info.revision & 0xFF ));
76
+ Serial.println (" Secure vid: 0x" + String (info.vid , HEX));
77
+ Serial.println (" Secure pid: 0x" + String (info.pid , HEX));
78
+ Serial.println (" Secure mac: " + String (info.mac_address [0 ], HEX) + " :" + String (info.mac_address [1 ], HEX) + " :" +
79
+ String (info.mac_address [2 ], HEX) + " :" + String (info.mac_address [3 ], HEX) + " :" +
80
+ String (info.mac_address [4 ], HEX) + " :" + String (info.mac_address [5 ], HEX));
81
+ }
82
+
68
83
video_available = bootloader_data[8 ];
69
84
wifi_available = bootloader_data[5 ];
70
85
0 commit comments