From 323e4c2e7cb27d64d31cb73d41976cc245b9cb6b Mon Sep 17 00:00:00 2001 From: pennam Date: Fri, 21 Feb 2025 12:49:01 +0100 Subject: [PATCH 1/5] OPTA: allow vid/pid function override from derived core --- variants/OPTA/pins_arduino.h | 3 +++ variants/OPTA/variant.cpp | 10 ++-------- 2 files changed, 5 insertions(+), 8 deletions(-) diff --git a/variants/OPTA/pins_arduino.h b/variants/OPTA/pins_arduino.h index 25d6e8c06..a1243b4e8 100644 --- a/variants/OPTA/pins_arduino.h +++ b/variants/OPTA/pins_arduino.h @@ -148,11 +148,14 @@ static const uint8_t SCK = PIN_SPI_SCK; // Use these only if bootloader data is not available / valid #define _BOARD_VENDORID 0x2341 #define _BOARD_PRODUCTID 0x0264 + +#ifndef FIRST_PROGRAMMING uint16_t _getVid_(); uint16_t _getPid_(); // Retrieve (Arduino OUI) Ethernet MAC Address from QSPIF OTP uint8_t _getSecureEthMac_(uint8_t *); +#endif #define BOARD_NAME "Arduino Opta" diff --git a/variants/OPTA/variant.cpp b/variants/OPTA/variant.cpp index eabe1cdab..93b796e88 100644 --- a/variants/OPTA/variant.cpp +++ b/variants/OPTA/variant.cpp @@ -313,26 +313,19 @@ uint16_t boardRevision() { return (((OptaBoardInfo*)_boardInfo)->revision); } +#ifndef FIRST_PROGRAMMING uint16_t _getVid_() { -#ifdef FIRST_PROGRAMMING - return _BOARD_VENDORID; -#else if (!has_otp_info) { getSecureFlashData(); } return ((OptaBoardInfo*)_boardInfo)->vid; -#endif } uint16_t _getPid_() { -#ifdef FIRST_PROGRAMMING - return _BOARD_PRODUCTID; -#else if (!has_otp_info) { getSecureFlashData(); } return ((OptaBoardInfo*)_boardInfo)->pid; -#endif } uint8_t _getSecureEthMac_(uint8_t *mac_address) { @@ -349,6 +342,7 @@ uint8_t mbed_otp_mac_address(char *mac) auto ret = _getSecureEthMac_(reinterpret_cast(mac)); return ret; } +#endif #define BOARD_REVISION(x,y) (x << 8 | y) From a0ccfbd79ffac6998c3ba13932560dcf6a831372 Mon Sep 17 00:00:00 2001 From: pennam Date: Fri, 21 Feb 2025 16:10:38 +0100 Subject: [PATCH 2/5] OPTA: restore _getVid_ _getPid_ function declaration --- variants/OPTA/pins_arduino.h | 2 -- 1 file changed, 2 deletions(-) diff --git a/variants/OPTA/pins_arduino.h b/variants/OPTA/pins_arduino.h index a1243b4e8..301ac30aa 100644 --- a/variants/OPTA/pins_arduino.h +++ b/variants/OPTA/pins_arduino.h @@ -149,13 +149,11 @@ static const uint8_t SCK = PIN_SPI_SCK; #define _BOARD_VENDORID 0x2341 #define _BOARD_PRODUCTID 0x0264 -#ifndef FIRST_PROGRAMMING uint16_t _getVid_(); uint16_t _getPid_(); // Retrieve (Arduino OUI) Ethernet MAC Address from QSPIF OTP uint8_t _getSecureEthMac_(uint8_t *); -#endif #define BOARD_NAME "Arduino Opta" From befeca3b551333f9fc8a8a1f23eb766f58067bb6 Mon Sep 17 00:00:00 2001 From: pennam Date: Thu, 27 Feb 2025 14:58:19 +0100 Subject: [PATCH 3/5] Release 4.2.3 Internal release only for OPTA --- package_full.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package_full.sh b/package_full.sh index cb57b1a98..e7fca45b2 100755 --- a/package_full.sh +++ b/package_full.sh @@ -1,5 +1,5 @@ #Get version from git(hub) tag -export VERSION="4.2.2" +export VERSION="4.2.3" FLAVOURS=`ls *.variables` From 13a142b3a61f1911df62e539a6fd8ee1fb017ab1 Mon Sep 17 00:00:00 2001 From: pennam Date: Thu, 27 Feb 2025 15:23:30 +0100 Subject: [PATCH 4/5] Wire: I2C slave, exit critical section before calling onReceiveCb() --- libraries/Wire/Wire.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/libraries/Wire/Wire.cpp b/libraries/Wire/Wire.cpp index d34ad83b0..9b345d3e1 100644 --- a/libraries/Wire/Wire.cpp +++ b/libraries/Wire/Wire.cpp @@ -179,10 +179,10 @@ void arduino::MbedI2C::receiveThd() { break; } } - if (rxBuffer.available() > 0 && onReceiveCb != NULL) { - onReceiveCb(rxBuffer.available()); - } core_util_critical_section_exit(); + if (available() > 0 && onReceiveCb != NULL) { + onReceiveCb(available()); + } //slave->stop(); break; case mbed::I2CSlave::NoData: From 9f0337f452cdddbbdfab9f3755b0fff1f41e2de5 Mon Sep 17 00:00:00 2001 From: Mattia Pennasilico Date: Mon, 10 Mar 2025 12:40:31 +0100 Subject: [PATCH 5/5] Release 4.2.4 --- package_full.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package_full.sh b/package_full.sh index e7fca45b2..2f9c1434e 100755 --- a/package_full.sh +++ b/package_full.sh @@ -1,5 +1,5 @@ #Get version from git(hub) tag -export VERSION="4.2.3" +export VERSION="4.2.4" FLAVOURS=`ls *.variables`