This is an automated email from the ASF dual-hosted git repository. agross pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/mynewt-core.git
The following commit(s) were added to refs/heads/master by this push: new d4bb0c6 da1469x: Increase size of loadable binaries new 53e5185 Merge pull request #2682 from agross-korg/devmode-ram-loader-fix d4bb0c6 is described below commit d4bb0c6c4f056395ec074c16cef21c9059425f22 Author: Andy Gross <andy.gr...@juul.com> AuthorDate: Thu Sep 16 02:17:32 2021 -0500 da1469x: Increase size of loadable binaries This patch increases the maximum supported size of ram loaded binaries using the serial loading protocol. Signed-off-by: Andy Gross <andy.gr...@juul.com> --- hw/bsp/dialog_da1469x-dk-pro/da1469x_serial.py | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/hw/bsp/dialog_da1469x-dk-pro/da1469x_serial.py b/hw/bsp/dialog_da1469x-dk-pro/da1469x_serial.py index 598c609..cf6ad08 100755 --- a/hw/bsp/dialog_da1469x-dk-pro/da1469x_serial.py +++ b/hw/bsp/dialog_da1469x-dk-pro/da1469x_serial.py @@ -88,8 +88,17 @@ def load(infile, uart, reset_script): som_detected = True print("Detected serial boot protocol") msg = bytes([0x1]) - msg += bytes([len(data) & 0xff]) - msg += bytes([len(data) >> 8]) + + if len(data) > 65535: + msg += bytes([0x0]) + msg += bytes([0x0]) + msg += bytes([len(data) & 0xff]) + msg += bytes([(len(data) >> 8) & 0xff]) + msg += bytes([len(data) >> 16]) + else: + msg += bytes([len(data) & 0xff]) + msg += bytes([len(data) >> 8]) + ser.write(msg) ser.timeout = 10 msg = ser.read()