-
Notifications
You must be signed in to change notification settings - Fork 25
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
Let's start small and let ScratchMonkey show up in Arduino 1.6+ #4
base: master
Are you sure you want to change the base?
Conversation
Sorry it took me so long to start reviewing this. Some initial questions:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Still trying to understand that index format. Once we have things working, it would be great if you could also contribute a manual section on how to install this, but that can be done in a separate PR.
@@ -0,0 +1,31 @@ | |||
{ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
From the documentation in https://github.com/arduino/Arduino/wiki/Arduino-IDE-1.6.x-package_index.json-format-specification I understand that the index name is supposed to contain both the "Manufacturer" and the package name, so I guess package_microtherion.scratchmonkey_index.json
.
{ | ||
"packages": [ | ||
{ | ||
"name": "microtherion", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldn't that be "scratchmonkey" ?
The compressed file used for Boards Manager installation must have the package files in the root of the folder, which means that with the current structure of this repository the archive files that GitHub automatically generates for releases can not be used for that purpose. So you need to manually create them with the right structure for each release. It's a bit messy to have these files in the master branch. I usually recommend creating a branch to store the JSON file and the release archive files so they don't clutter things up. I like to use the gh-pages branch because you can use a shorter URL but I see you're already using that branch.
It's a bit unorthodox but I have done this for a two different 3rd party programmers and it does work, though there can be some limitations depending on the situation. It will be functionally identical to manually installing it in the sketchbook/hardware folder. It's a very user friendly installation process. If the user has them enabled they will get a notification whenever a new version is released and they can easily update with three clicks. The downside in this case is that the user still needs to get the ScratchMonkey sketch but that's a much more simple process than installing the hardware definition for the programmers because the sketch doesn't need to be put in and specific location..
You would need to use the raw URL: |
I think a testing version would work best. Sorry to be so demanding (and slow), but right now I'm having difficulties understanding how all of this works. If this contains an archive of the entire code, would it make sense to distribute it separately, e.g. as a separate repo that repackages ScratchMonkey releases periodically? |
OK, I made a test JSON file that points to the Boards Manager installation archive file located in @DCEM's fork. I also made your requested changes to the filename and package name.
If you do a Sketch > Upload Using Programmer you will notice it fails with an error:
or
depending on your upload output verbosity preferences setting. This can be fixed by defining that property in ScratchMonkey's platform.txt. This is not specific to a Boards Manager installation of ScratchMonkey. The same problem would occur if the user installed ScratchMonkey manually to {sketchbook folder}/hardware. The reason you won't encounter that error when you do a Tools > Burn Bootloader is that the Arduino IDE has a strange behavior: The platform.txt associated with the selected board is used for Burn Bootloader. However, the platform.txt associated with the selected programmer is used for Upload Using Programmer. This means that it would be possible to provide a patched avrdude.conf file with the ScratchMonkey hardware package but it will only be used for Upload Using Programmer. It is possible to include sketches with a hardware package as examples for a dummy library. Unfortunately for us, libraries bundled with a hardware package are only recognized by the Arduino IDE when one of the boards of that hardware package are selected in the Tools > Board menu. So it would be possible to bundle the ScratchMonkey firmware sketch with the hardware package if we added a dummy board. The firmware installation process would be:
That would be reasonable. As I said, I don't like the idea of cluttering up the master branch with these files. Another option would be to create an orphan branch of this repository (something like |
Tried this PR. I reach error |
Any update here? I am using 1.8.19 and I cant see the programmer in the dropdown. Not show how I get it visible |
@ingegno How do I apply this patch file? |
Unfortunately, this project was a casualty of an otherwise very helpful change to the Arduino IDE made in the 1.8.13 release: The support for distributing custom programmer definitions as boards platforms required by this project is only available in previous versions of the Arduino IDE, so it can only be used with Arduino IDE 1.8.12 and older. If you still want to try it for some reason, you can get the old IDE versions here: https://www.arduino.cc/en/software/OldSoftwareReleases#arduino-18x Since @microtherion was not capable of evaluating this PR even back when it was more clearly of benefit, I don't think there is any chance it would be merged now so I would go ahead and close this PR @DCEM. I see two possible ways forward from here:
|
In that case, I will have to fire up a VM and install the older version to get this working. Such a shame. I did try and get it working with the current version but I got stuck with the .patch file as I was unsure how to merge it into the real file. I did manage to get the programmer options in the dropdown though |
As when I try to run it I get |
I managed to get further with Now with the changes you mentioned above @per1234 I get the following when trying to edit the fuses (burn bootloader) ir uploading a sketch on my ATTiny2313
|
Why do you want to use scratchmonkey? There is no need. For example, for attiny, just use attinycore to write flags with latest eg with latest arduino IDE:
Only use for scratchmonkey would be to undo burning the reset pin, but you need high voltage for that, better just buy a rescue board. I use MightyOhm HV Rescue Shield 2.1, look it up on google. |
That's exactly what I am doing. It has the wrong fuses set so I cant do anything with it, hence why I am trying to recover it with a DIY HVPP (ScratchMonkey) |
I have a scratchmonkey setup, but that was done with Arduino IDE 1.0.6, then it works fine. You do need to combine it with an old version of https://github.com/damellis/attiny/ for 1.0.x to have access to attiny. I work with @ingegno, with Arduino 1.8.x we moved to the rescue shield or 1.0.6 with scratchmonkey. |
No description provided.