digistump / DigistumpArduino

Files to add Digistump support (Digispark, Pro, DigiX) to Arduino 1.6.X (1.6.5+)
932 stars 377 forks source link

Keyboard compile error #123

Open Mikolaj98p opened 4 years ago

Mikolaj98p commented 4 years ago

Hello, When I compiling "hello wolrd" program for keyboard, compilation was terminated on platform io. Can you help?

Thx. https://gist.github.com/Mikolaj98p/9d7c29cba54c37491c81d78cb2dcb1ec

ArminJo commented 4 years ago

Please try it with the new version 1.6.8 of Digistump avr core. I included a change which could possibly fix your error.

pfeerick commented 4 years ago

@ArminJo Since the OP is having problems in PlatformIO, some consideration as to how to use the your updated framework with PlatformIO is needed. It is possible to override the digistump package using platform_packages in the platformio.ini, but the layout of the current board support package used there expects the core volder for the tiny to be called dtiny (don't ask me why), and the cores, variants, etc, to be in the root. (i.e. like this, which I can use in PlatformIO with just in inclusion of platform_packages = framework-arduino-avr-digistump @ https://github.com/pfeerick/DigistumpArduinoAvr), If you were able to make a zip file release available in that format, it would be a trivial change in the platformio configuration to use as it could be pointed at the zip file.

Otherwise, if you think this is stable enough to completely replace the Digistump core now, it might be worth looking at getting it properly integrated into PlatformIO with a equest over at https://github.com/platformio/platform-atmelavr. I see you're still active on this at present, so is time to start kicking the tyres yet?

ArminJo commented 4 years ago

Hi Peter, thanks a lot of explaining the PlatformIO specials. Here is the reason for the name dtiny.

Having your repo as reference, I created a zip file as you proposed. I named it .tar.gz since I found this is the name of the original file, but it is only a zip file. I do not know what the correct format is, which PlatformIO expects.

Maybe you can test it? This would be very helpful!

And in the next step I can document it and asking the PlatformIO guys to integrate it.

pfeerick commented 4 years ago

lol... yeah, I expected it would be something to do with one of the other cores... but couldn't be bothered looking it up. Thanks for that! :)

Wow... I didn't expect that quick a response! Fantastic! And I will most certainly give it a try, and let you know if I have any issues. Might be a couple of days before I can really do much on that. Just as a quick test, I did platform_packages = framework-arduino-avr-digistump @ https://github.com/ArminJo/DigistumpArduino/raw/master/framework-arduino-avr-digistump-1.6.8.zip in a platformio.ini and tried re-compiling a simple blink sketch with no issues at all.

btw, am I right thinking the reason there's no LED_BUILTIN for the ... plain ... digispark because of the modelA/modelB or rev1 vs rev2/4 differences in LED connection?

ArminJo commented 4 years ago

Thanks for the trigger, I included the LED_BUILTIN definition and changed Start to Blink, which helps to decide if you have a Model B. Have you ever seen such Model B? I have around 20 boards but all Model A.

pfeerick commented 4 years ago

Thanks for that! No I haven't. Mine are the Kickstarter Special Editions and even they are rev2 boards, so I don't know about the rev1 board... maybe they went to beta testers? I suspect there will be no complaints with PB1 ;)

ArminJo commented 4 years ago

Thanks for the feedback 👍

Mikolaj98p commented 4 years ago

Ok now it's work

gigawatts commented 3 years ago

What is the current status of this? Is there a documented work-around?

I am getting similar compile errors (as well as a bunch of other warnings) in PlatformIO, such as: C:\Users\me\.platformio\packages\framework-arduino-avr-digistump\libraries\DigisparkKeyboard/DigiKeyboard.h:59:1: m 'int' to 'char' inside { } [-Wnarrowing]

ArminJo commented 3 years ago

Try https://github.com/ArminJo/DigistumpArduino

gigawatts commented 3 years ago

@ArminJo Thank you, that works great :)

I guess this (official) repo has been abandoned then?

ArminJo commented 3 years ago

@Mikolaj98p Please close the issue. Thanks!