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

pyocd command line cannot recognize path correctly when it contains "@" #1424

Closed
Hoohaha opened this issue Jun 24, 2022 · 1 comment · Fixed by #1425
Closed

pyocd command line cannot recognize path correctly when it contains "@" #1424

Hoohaha opened this issue Jun 24, 2022 · 1 comment · Fixed by #1425

Comments

@Hoohaha
Copy link
Contributor

Hoohaha commented Jun 24, 2022

If command line options contains @ , the pyocd won't work as expected.

pyocd flash -W --format bin -u 02260000070b178700000000000000000000000097969905 -t mimxrt1015 "C:/xxxx/test@wifi/binaries/wifi_1015.bin"

0001275 C invalid literal for int() with base 0: 'wifi/binaries/evkmimxrt1015.bin' [__main__]
Traceback (most recent call last):
  File "C:\Program Files\Python39\lib\site-packages\pyocd\__main__.py", line 161, in run
    status = cmd.invoke()
  File "C:\Program Files\Python39\lib\site-packages\pyocd\subcommands\load_cmd.py", line 104, in invoke
    base_address = int_base_0(suffix)
  File "C:\Program Files\Python39\lib\site-packages\pyocd\utility\cmdline.py", line 237, in int_base_0
    return int(x, base=0)
ValueError: invalid literal for int() with base 0: 'wifi/binaries/wifi_1015.bin'
@flit
Copy link
Member

flit commented Jun 24, 2022

Hi @Hoohaha 😄

That's because the flash/load command accepts a "@<address>" suffix on filenames to allow setting the load address for binary files without relying on the --address argument (since that won't work when loading multiple binary files). I'll have to change it to check if there's an existing file with the full argument value before attempting to process the @ suffix.

Thanks for reporting this.

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

Successfully merging a pull request may close this issue.

2 participants