Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Parse errors with hex loading addresses #3

Open
robertlipe opened this issue Jul 14, 2021 · 0 comments
Open

Parse errors with hex loading addresses #3

robertlipe opened this issue Jul 14, 2021 · 0 comments

Comments

@robertlipe
Copy link

I was revisiting this for the BL706 ('it's the same, they said...') and came across an error that I suspect is just another incompatibility across python versions. With

python3 --version
Python 3.9.5

an attempt to run python3 ./bltool.py -L -p /dev/cu.usbmodem0000000200001 -w 0x23000000 /tmp/lvgl_main.bin

will result in a a parse error for 0x230000000 as base 10. It looks like

diff --git a/bltool.py b/bltool.py
index 07d403c..5409a5e 100644
--- a/bltool.py
+++ b/bltool.py
@@ -288,7 +288,7 @@ def main():
eflash.eraseFlash()

     if args.write:
  •        address = int(args.write[0])
    
  •        address = int(args.write[0], 0)
           filename = args.write[1]
           print("Writing file {} to address 0x{:08x}...".format(filename, address))
           with open(filename, "rb") as f:
    

is the style of change needed. I'll leave it to you to figure out how to do that across Python versions that you care about.

Thanx!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant