Skip to content

Commit

Permalink
Fix fx2tool --bootloader
Browse files Browse the repository at this point in the history
Without this fix, 'fx2load --bootloader' will die with the error message
"read of closed file".
  • Loading branch information
jjakob authored and whitequark committed Aug 3, 2023
1 parent 2cba3e4 commit 82d1541
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion software/fx2/fx2tool.py
Original file line number Diff line number Diff line change
Expand Up @@ -349,7 +349,7 @@ def main():
if device is not None:
if args.bootloader:
bootloader_ihex = os.path.join(resource_dir, "boot-cypress.ihex")
device.load_ram(input_data(open(bootloader_ihex)))
device.load_ram(input_data(open(bootloader_ihex, "rb")))
elif args.stage2:
device.load_ram(input_data(args.stage2))

Expand Down

3 comments on commit 82d1541

@Planet911
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The fx2 Python pip package is almost a year out of date and badly needs this fix.
Any chance you could push that?

@whitequark
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done!

@Planet911
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So fast!
The Cypress EzUSB controllers are ubiquitous and this fx2 package is very useful, thank you.

Please sign in to comment.