Palatis / Arduino-Lufa

LUFA (Lightweight USB For AVRs) on the Arduino!
MIT License
100 stars 26 forks source link

URL / project is not working #26

Closed melroy89 closed 1 year ago

melroy89 commented 1 year ago

I entered the following url https://github.com/Palatis/Arduino-Lufa/raw/master/package_arduino-lufa_index.json as the additional board within the preferences.

Your URL within the package_arduino-lufa_index.json file is not working. You don't have a version tagged under this Git repo.

Try for example this link yourself: https://github.com/Palatis/Arduino-Lufa/archive/refs/tags/1.0.zip (it's not found!)

This will most likely gives a lot of problems, since I think the Arduino IDE 2 won't download or install this project. For example I'm also missing the examples (only see built-in examples):

image

iFreilicht commented 1 year ago

Ah yes, I forgot about this after #23 was merged. I just published a release and the URL now exists. Can you try again?

melroy89 commented 1 year ago

Nope. It still doesn't work (yes I also restart the IDE everytime).. I also tried: https://raw.githubusercontent.com/Palatis/Arduino-Lufa/master/package_arduino-lufa_index.json instead, without any luck.

Checksum is not correct, could that cause issues with Arduino IDE? Checksum is now: 61184a377d979cd7aa0b25df92fb828cf173a3e84e388488eaffd9bed2051584. I expect then: SHA-256:61184a377d979cd7aa0b25df92fb828cf173a3e84e388488eaffd9bed2051584 as value? Somehow the size does still match..

melroy89 commented 1 year ago

@iFreilicht anything?

iFreilicht commented 1 year ago

Sorry I'm a bit busy at the moment. Maybe @CrazyRedMachine can help out? He made the original PR to add support for the board manager in #23

CrazyRedMachine commented 1 year ago

hi, yes as explained in #23 once the release is published you need to update the checksum in the json, i included a link to the relevant lines to be modified

CrazyRedMachine commented 1 year ago

@melroy89 you can also just use my fork and its url which has been working for 2 years already https://github.com/CrazyRedMachine/Arduino-Lufa/

i have to say i'm pretty disappointed about the way this merge is being handled... between the delays and the fact nobody in charge seems to read or care about the instructions

iFreilicht commented 1 year ago

Ok thank you, I updated the checksum to the value @melroy89 provided. Could you try again?

Sorry about how I've handled this. I took over the maintainer role because I was actively using and improving this library and Victor had no time to take care of the issues and PRs, and so I think it's on me to deal with stuff like this. As I don't do any embedded work right now, this project has low priority for me, but as you basically did all the work and there was very little to do for me, I should've reacted quickly.

melroyvandenberg commented 1 year ago

Sorry to hear about all the drama

OK, I will try this repo again soon on my other PC (this is my work account as you may notice as well ahha).

I also saw that there are libraries within Arduino IDE, allowing to search on libraries and click install. This repo is using a library: https://github.com/NicoHood/HID. Maybe something worth to consider? Just an idea.

CrazyRedMachine commented 1 year ago

yea don't worry, looks like it will finally be working now, and the fact it's been used for years prior means we should get little to no issues.

@melroy89 i'm not sure I understand the question ? lufa-arduino cannot be used as a library as it requires to change board definitions to change the usb layer in a way that is conflicting with pluggableusb (the usual arduino usb stack).

melroy89 commented 1 year ago

Ah I see. Yes in that case ignore my library proposal.

melroy89 commented 1 year ago

Small question upfront: Am I able to flash the original AVR board (bootloader etc.) without any issues?

I can find and install:

image

Then I install it:

image

Which seems to install. But no examples in the menu for LUFA?

image

CrazyRedMachine commented 1 year ago

i think it's normal as examples come from libraries, not boards

as said before, having lufa as library wouldn't work, and having it as a board actually suffices so having an additional library just for the examples would make it confusing?

although it might actually work if we just call the library "lufa examples" and keep mentioning on each example header that you need to download the lufa boards for them to work.. I'll look into it when I have time

in the mean time I suggest taking examples manually from the repo (download zip, extract somewhere then open the .ino of your choice... i also have several repositories making use of lufa, most notable being lufahybridfightstick if you happen to need a gamepad example)

melroy89 commented 1 year ago

Thanks for your answer, make sense indeed. And about my initial question? I suspect no issues when I need to re-flash again my current old project using Arduino SDK right? So I can safely go back and forward between the two boards?

CrazyRedMachine commented 1 year ago

looks like there's only one example which is the dualserial so maybe not worth the trouble.. or i'd need to create more examples from other projects..

https://github.com/Palatis/Arduino-Lufa/blob/master/libraries/Arduino-LUFA/examples/LUFA_DualVirtualSerial/LUFA_DualVirtualSerial.ino

About your first question, yes, you can always flash non-LUFA firmware by selecting the correct board type before flashing (and adding arduino-lufa as custom board was done mainly because i needed to switch efficiently between lufa and non-lufa code)

only thing to note is that lufa won't expose the arduino serial interface (which allows the automatic reset for code upload), therefore you'll have to use the reset button manually during upload whenever you want to flash a new firmware and your board is currently running lufa

melroy89 commented 1 year ago

only thing to note is that lufa won't expose the arduino serial interface (which allows the automatic reset for code upload), therefore you'll have to use the reset button manually during upload whenever you want to flash a new firmware and your board is currently running lufa

Ow that is a problem.. Thanks for pointing this out in advance! Since my arduino micro chip is inside.. well.. 😖 See photo: usb

CrazyRedMachine commented 1 year ago

indeed that makes it annoying... maybe autoreset can work if you take care of adding a cdc interface as first interface in your project and copy the code which triggers a reset to bootloader (should be somewhere in pluggableusb files maybe)

also depending on the chip, i think there's another way to go into bootloader mode which is unplug/replug quickly 3 times on atmega32u4..

melroy89 commented 1 year ago

Yea, so that issue is worth another issue ticket...

I will close this ticket, since I think the repo is now fixed.