diff --git a/src/omv/usbdbg.c b/src/omv/usbdbg.c index 92db005af..12c46f4c7 100644 --- a/src/omv/usbdbg.c +++ b/src/omv/usbdbg.c @@ -17,6 +17,7 @@ #include "parse.h" #include "compile.h" #include "runtime.h" +#include "omv_boardconfig.h" static int xfer_bytes; static int xfer_length; @@ -118,6 +119,14 @@ void usbdbg_data_in(void *buffer, int length) } break; + case USBDBG_ARCH_STR: { + int len = IM_MIN(64, (strlen(OMV_ARCH_STR)+1)); + ((char *)buffer)[len-1] = 0; + memcpy(buffer, OMV_ARCH_STR, len); + cmd = USBDBG_NONE; + break; + } + case USBDBG_SCRIPT_RUNNING: { uint32_t *buf = buffer; buf[0] = (uint32_t) script_running; @@ -221,6 +230,11 @@ void usbdbg_control(void *buffer, uint8_t request, uint32_t length) xfer_length = length; break; + case USBDBG_ARCH_STR: + xfer_bytes = 0; + xfer_length = length; + break; + case USBDBG_SCRIPT_EXEC: xfer_bytes = 0; xfer_length =length; diff --git a/src/omv/usbdbg.h b/src/omv/usbdbg.h index 6c262881c..498f2d69f 100644 --- a/src/omv/usbdbg.h +++ b/src/omv/usbdbg.h @@ -34,6 +34,7 @@ enum usbdbg_cmd { USBDBG_FW_VERSION =0x80, USBDBG_FRAME_SIZE =0x81, USBDBG_FRAME_DUMP =0x82, + USBDBG_ARCH_STR =0x83, USBDBG_SCRIPT_EXEC =0x05, USBDBG_SCRIPT_STOP =0x06, USBDBG_SCRIPT_SAVE =0x07, diff --git a/usr/openmv.py b/usr/openmv.py index 657cd76c2..cbd5fa230 100755 --- a/usr/openmv.py +++ b/usr/openmv.py @@ -20,6 +20,7 @@ __USBDBG_CMD = 48 __USBDBG_FW_VERSION = 0x80 __USBDBG_FRAME_SIZE = 0x81 __USBDBG_FRAME_DUMP = 0x82 +__USBDBG_ARCH_STR = 0x83 __USBDBG_SCRIPT_EXEC = 0x05 __USBDBG_SCRIPT_STOP = 0x06 __USBDBG_SCRIPT_SAVE = 0x07 @@ -161,6 +162,10 @@ def fw_version(): def enable_fb(enable): __serial.write(struct.pack("')