Skip to content
This repository was archived by the owner on Jan 29, 2026. It is now read-only.

Add Automatic avrdude Download Feature with Redirect Handling#12

Merged
StrongTheDev merged 2 commits intoStrongTheDev:mainfrom
Alireza-Jahanbakhshi:main
Apr 5, 2025
Merged

Add Automatic avrdude Download Feature with Redirect Handling#12
StrongTheDev merged 2 commits intoStrongTheDev:mainfrom
Alireza-Jahanbakhshi:main

Conversation

@Alireza-Jahanbakhshi
Copy link
Copy Markdown
Collaborator

Description

This pull request adds functionality to automatically download avrdude v8.0 for Windows x64 when it's not found in the toolchain directory. It includes:

  • HTTP redirect handling for GitHub release URLs
  • Progress reporting during download
  • Extraction to the toolchain bin directory
  • Error handling and logging

Changes

  • Modified uploadToMicrocontroller.js to include downloadAvrdude function
  • Added redirect following logic with followRedirects
  • Improved error messages and logging

Testing

  • Tested on Windows with no existing avrdude
  • Verified download and extraction work with GitHub redirect
  • Confirmed upload functionality remains intact

Related Issues

  • Fixes issue with 302 redirect errors from GitHub releases

}

async function downloadAvrdude() {
const avrdudeUrl = 'https://github.com/avrdudes/avrdude/releases/download/v8.0/avrdude-v8.0-windows-x64.zip';
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

this is good for the start, but also consider that there will be linux and mac users as well. we will add more download urls later.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Sounds good! We can definitely consider adding support for Linux and Mac users later on.

@StrongTheDev StrongTheDev merged commit e10a803 into StrongTheDev:main Apr 5, 2025
3 checks passed
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants