mirror of
https://github.com/openmv/openmv.git
synced 2025-11-04 14:49:50 +08:00
Merge pull request #1112 from openmv/uid_fix
Define UID size in board config.
This commit is contained in:
commit
03c6353919
@ -15,6 +15,7 @@
|
||||
#define OMV_ARCH_STR "NANO33 M4" // 33 chars max
|
||||
#define OMV_BOARD_TYPE "NANO33"
|
||||
#define OMV_UNIQUE_ID_ADDR 0x10000060
|
||||
#define OMV_UNIQUE_ID_SIZE 2 // 2 words
|
||||
|
||||
// Needed by the SWD JTAG testrig - located at the bottom of the frame buffer stack.
|
||||
#define OMV_SELF_TEST_SWD_ADDR MAIN_FB()->bpp
|
||||
|
||||
@ -15,6 +15,7 @@
|
||||
#define OMV_ARCH_STR "OMV2 F4 256 JPEG" // 33 chars max
|
||||
#define OMV_BOARD_TYPE "M4"
|
||||
#define OMV_UNIQUE_ID_ADDR 0x1FFF7A10
|
||||
#define OMV_UNIQUE_ID_SIZE 3 // 3 words
|
||||
|
||||
// Needed by the SWD JTAG testrig - located at the bottom of the frame buffer stack.
|
||||
#define OMV_SELF_TEST_SWD_ADDR MAIN_FB()->bpp
|
||||
|
||||
@ -15,6 +15,7 @@
|
||||
#define OMV_ARCH_STR "OMV3 F7 512" // 33 chars max
|
||||
#define OMV_BOARD_TYPE "M7"
|
||||
#define OMV_UNIQUE_ID_ADDR 0x1FF0F420
|
||||
#define OMV_UNIQUE_ID_SIZE 3 // 3 words
|
||||
|
||||
// Needed by the SWD JTAG testrig - located at the bottom of the frame buffer stack.
|
||||
#define OMV_SELF_TEST_SWD_ADDR MAIN_FB()->bpp
|
||||
|
||||
@ -15,6 +15,7 @@
|
||||
#define OMV_ARCH_STR "OMV4 H7 1024" // 33 chars max
|
||||
#define OMV_BOARD_TYPE "H7"
|
||||
#define OMV_UNIQUE_ID_ADDR 0x1FF1E800
|
||||
#define OMV_UNIQUE_ID_SIZE 3 // 3 words
|
||||
|
||||
// Needed by the SWD JTAG testrig - located at the bottom of the frame buffer stack.
|
||||
#define OMV_SELF_TEST_SWD_ADDR MAIN_FB()->bpp
|
||||
|
||||
@ -15,6 +15,7 @@
|
||||
#define OMV_ARCH_STR "OMV4P H7 32768 SDRAM" // 33 chars max
|
||||
#define OMV_BOARD_TYPE "H7"
|
||||
#define OMV_UNIQUE_ID_ADDR 0x1FF1E800
|
||||
#define OMV_UNIQUE_ID_SIZE 3 // 3 words
|
||||
|
||||
// Needed by the SWD JTAG testrig - located at the bottom of the frame buffer overlay stack.
|
||||
#define OMV_SELF_TEST_SWD_ADDR *((uint32_t *) 0x24000018)
|
||||
|
||||
@ -15,6 +15,7 @@
|
||||
#define OMV_ARCH_STR "OPENMVPT 65536 SDRAM" // 33 chars max
|
||||
#define OMV_BOARD_TYPE "H7"
|
||||
#define OMV_UNIQUE_ID_ADDR 0x1FF1E800
|
||||
#define OMV_UNIQUE_ID_SIZE 3 // 3 words
|
||||
|
||||
// Flash sectors for the bootloader.
|
||||
// Flash FS sector, main FW sector, max sector.
|
||||
|
||||
@ -15,6 +15,7 @@
|
||||
#define OMV_ARCH_STR "PORTENTA H7 8192 SDRAM" // 33 chars max
|
||||
#define OMV_BOARD_TYPE "H7"
|
||||
#define OMV_UNIQUE_ID_ADDR 0x1FF1E800
|
||||
#define OMV_UNIQUE_ID_SIZE 3 // 3 words
|
||||
|
||||
// Flash sectors for the bootloader.
|
||||
// Flash FS sector, main FW sector, max sector.
|
||||
|
||||
@ -149,11 +149,17 @@ void usbdbg_data_in(void *buffer, int length)
|
||||
break;
|
||||
|
||||
case USBDBG_ARCH_STR: {
|
||||
unsigned int uid[3] = {
|
||||
#if (OMV_UNIQUE_ID_SIZE == 2)
|
||||
0U,
|
||||
#else
|
||||
*((unsigned int *) (OMV_UNIQUE_ID_ADDR + 8)),
|
||||
#endif
|
||||
*((unsigned int *) (OMV_UNIQUE_ID_ADDR + 4)),
|
||||
*((unsigned int *) (OMV_UNIQUE_ID_ADDR + 0)),
|
||||
};
|
||||
snprintf((char *) buffer, 64, "%s [%s:%08X%08X%08X]",
|
||||
OMV_ARCH_STR, OMV_BOARD_TYPE,
|
||||
*((unsigned int *) (OMV_UNIQUE_ID_ADDR + 8)),
|
||||
*((unsigned int *) (OMV_UNIQUE_ID_ADDR + 4)),
|
||||
*((unsigned int *) (OMV_UNIQUE_ID_ADDR + 0)));
|
||||
OMV_ARCH_STR, OMV_BOARD_TYPE, uid[0], uid[1], uid[2]);
|
||||
cmd = USBDBG_NONE;
|
||||
break;
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user