koenvervloesem / digispark_blink_platformio

PlatformIO example project to build the canonical blink code for the Digispark USB development board with an Atmel AVR ATtiny85 microcontroller
MIT License
4 stars 0 forks source link

Error during `cp ./micronucleus /usr/local/bin/` #2

Open hasenradball opened 2 years ago

hasenradball commented 2 years ago

When using your installation script:

git clone https://github.com/micronucleus/micronucleus.git
cd micronucleus/commandline
sudo apt install libusb-dev
make
sudo make install

I got the following error: cp: Das Überschreiben des Verzeichnisses '/usr/local/bin/micronucleus' mit einem Nicht‐Verzeichnis ist nicht möglich. cp: can not overwrite a folder by an file due to the same naming of the file and the folder.

Its comming from this part: cp ./micronucleus /usr/local/bin/

I am wondering if this works in your system?

OK: as info I copied the git content also in /usr/local/bin :-)

koenvervloesem commented 2 years ago

Do you have a directory micronucleus in your /usr/local/bin? What's in it?

Anyway, the make install is just a suggestion. You can install the binary manually too in any location you want.

hasenradball commented 2 years ago

Yes I have installed the Git content into /usr/local/bin. I have renamed the cloed Directory now it works :-)

I have an other issue. My Digispark is not recognized as USB device on my raspberrypi with the actual 64-bit OS. I did add the recommend udev file.

Do yu have an idea? I can buld the code with PIO fine, but not flash due to no detected Digispark.

koenvervloesem commented 2 years ago

I don't remember that I needed to add a udev rule, which one did you add? I only needed the following procedure: https://koen.vervloesem.eu/blog/how-to-build-avr-code-for-the-digispark-with-platformio/

Maybe add the full path to the micronucleus binary in the upload_command of platformio.ini to make sure you're using the right binary.

hasenradball commented 2 years ago

Or do you think the issue could be located in, that I flashed the last time the Digispark by AtmelStudio directly via ISP?

koenvervloesem commented 2 years ago

That could be it, I'm not sure, I never used Atmel Studio.

Have you tried upgrading the micronucleus bootloader on the Digispark? See https://koen.vervloesem.eu/blog/how-to-upgrade-the-micronucleus-bootloader-on-the-digispark/ for the procedure.

hasenradball commented 2 years ago

Yes I did the update. But after that I did an flash by ISP via AtmelStudio. I think thats the root cause.

koenvervloesem commented 2 years ago

Then I would reinstall the micronucleus bootloader first, before trying to install this Blink code to the board.