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

ravedude should check rust target against selected MCU #531

Open
Rahix opened this issue Apr 1, 2024 · 3 comments
Open

ravedude should check rust target against selected MCU #531

Rahix opened this issue Apr 1, 2024 · 3 comments
Labels

Comments

@Rahix
Copy link
Owner

Rahix commented Apr 1, 2024

We should safeguard against people accidentally flashing a binary for a different MCU.

User report: #530

@Rahix Rahix added the ravedude label Apr 1, 2024
@Rahix Rahix changed the title ravedude should throw an error when trying to flash binary that was buildt for a different MCU ravedude should check rust target against selected MCU Apr 1, 2024
@Rahix
Copy link
Owner Author

Rahix commented Apr 1, 2024

We have to catch two problems:

  1. Wrong rust target
  2. Wrong MCU-feature selected in the HAL

For the rust target, I guess we can just check the architecture from the ELF.

For the MCU-feature, maybe the HAL should define a static symbol in the ELF which contains the selected MCU?

@brainstorm
Copy link

brainstorm commented Apr 7, 2024

And/or potentially substitute ravedude for this one?:

https://github.com/luqasz/avrisp

As discussed in probe-rs in probe-rs/probe-rs#391

@Rahix
Copy link
Owner Author

Rahix commented Apr 7, 2024

@brainstorm, I think this is not really related to the topic of this issue. If you want to discuss this, please open a separate issue.

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

No branches or pull requests

2 participants