32 u4 support
Added support for AVR 32U4 using Arduino IDE. Library from Arduino IDE is used for initializing USB mainly. As there's a bug in Win not allowing the Arduino to send replies back it only works using Linux. For finding out where the sketch can't continue I added some LED flashing stuff also using Arduino library.
I think you messed up the latest commit to your repository, there are lots of duplicate files in the root directory that should be in the source directory.
Sorry, hope I got that fixed now. I had to manual merge some files. Please check if something went wrong there with the changes done due to the tiny0/1 adds.
The code cannot have unconditional dependencies on Arduino libraries, It must compile on systems that don't have the Arduino libraries installed (that is, for targets other than the mega32U4). In other words, you need to wrap every Arduino dependent code in conditional compile blocks.
edit: for example wrap the blocks with
#if UPDI_IO_TYPE == 3 ... #endif`
I created a branch to work on the code, since even after you address the issue from the previous comment, there will probably be more things to change before merging with main.
I can wrap the dependencies, no prob. But what happens with those files from C:\Program Files (x86)\Arduino\hardware\tools\avr\avr\include\avr (if I take the win version) as there are io.h, iom32u4.h, C:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino\HardwareSerial.h? I guess I won't go for an approach to even have the 32U4 being able to compile without Arduino libs, by picking the USB stuff from the libs. But you're not out after that if I get that right.
And is it a good idea to keep the 'LED_blink' in? I added it only for that windows usb issue, as the ardino-ide has no debugger. But I could change that to setting LED on/off by setting the registers directly as you did (SYS::setLED, SYS::clearLED) - or put that in with an optional compile switch.
I guess I won't go for an approach to even have the 32U4 being able to compile without Arduino libs, by picking the USB stuff from the libs. But you're not out after that if I get that right.
No, what I want is not to break compatibility with things that work in the current version, like building by running the makefiles on a system without Arduino. But this is for other targets, not 32U4. That one will require Arduino libraries to be installed on the system but I'm ok with that.
edit: yes, regarding the LED, please use Arduino libraries only when absolutely needed. I'll be reviewing their use later, anyway.
Hi, might be a bad place to post this, there are no issues available on @haweiler fork. Is this code currently in working condition? I haven't had any luck so far with an arduino micro. Any writeup how to get this working with the atmega32u4 would be highly appreciated
`
avrdude: Version 6.3-20190619
Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
Copyright (c) 2007-2014 Joerg Wunsch
System wide configuration file is "C:\Users\xxxxx\AppData\Local\Arduino15\packages\megaTinyCore\hardware\megaavr\1.1.5/avrdude.conf"
Using Port : COM10
Using Programmer : jtag2updi
avrdude: ser_recv(): read error: The I/O operation has been aborted because of either a thread exit or an application request.
avrdude: jtagmkII_getsync(): sign-on command: status -1
avrdude: ser_send(): write error: sorry no info avail
avrdude: jtagmkII_send(): failed to send command to serial port
avrdude: ser_recv(): read error: The device does not recognize the command.`
EDIT: Verbose ` avrdude.exe: Version 6.3-20190619 Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/ Copyright (c) 2007-2014 Joerg Wunsch
System wide configuration file is "C:\Users\xxxxx\AppData\Local\Arduino15\packages\megaTinyCore\hardware\megaavr\1.1.5/avrdude.conf"
Using Port : COM10
Using Programmer : jtag2updi
avrdude.exe: jtagmkII_open_pdi()
avrdude.exe: jtagmkII_getsync()
avrdude.exe: jtagmkII_getsync(): Sending sign-on command:
avrdude.exe: jtagmkII_send(): sending 1 bytes
avrdude.exe: Send: . [1b] . [00] . [00] . [01] . [00] . [00] . [00] . [0e] . [01] . [f3] . [97]
avrdude.exe: jtagmkII_recv():
avrdude.exe: ser_recv(): programmer is not responding
avrdude.exe: jtagmkII_recv(): Timeout receiving packet
avrdude.exe: jtagmkII_getsync(): sign-on command: status -1
avrdude.exe: jtagmkII_getsync(): Sending sign-on command:
avrdude.exe: jtagmkII_send(): sending 1 bytes
avrdude.exe: Send: . [1b] . [00] . [00] . [01] . [00] . [00] . [00] . [0e] . [01] . [f3] . [97]
avrdude.exe: jtagmkII_recv():
avrdude.exe: ser_recv(): programmer is not responding
avrdude.exe: jtagmkII_recv(): Timeout receiving packet
avrdude.exe: jtagmkII_getsync(): sign-on command: status -1
avrdude.exe: jtagmkII_getsync(): Sending sign-on command:
avrdude.exe: jtagmkII_send(): sending 1 bytes
avrdude.exe: Send: . [1b] . [00] . [00] . [01] . [00] . [00] . [00] . [0e] . [01] . [f3] . [97]
`
Hi,code is on working condition, still.It was quite some time now since I did the last commit. Code is working as it is (using Linux), ElTangas wanted me to kick out the dependencies to Arduino where not needed to have the non 32U4 part independend from Arduino. Work is done but not committed, yet. I had some changes as well turning more than one LED on/off to get a hint where the program got stuck. Didn't find an easy solution without Arduino there, therefor didn't commit.
Den tisdag 12 maj 2020 08:39:18 CEST, rneurink <[email protected]> skrev:
Hi, might be a bad place to post this, there are no issues available on @haweiler fork. Is this code currently in working condition? I haven't had any luck so far with an arduino micro. Any writeup how to get this working with the atmega32u4 would be highly appreciated
`avrdude: Version 6.3-20190619 Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/ Copyright (c) 2007-2014 Joerg Wunsch System wide configuration file is "C:\Users\xxxxx\AppData\Local\Arduino15\packages\megaTinyCore\hardware\megaavr\1.1.5/avrdude.conf"
Using Port : COM10
Using Programmer : jtag2updi
avrdude: ser_recv(): read error: The I/O operation has been aborted because of either a thread exit or an application request.
avrdude: jtagmkII_getsync(): sign-on command: status -1 avrdude: ser_send(): write error: sorry no info avail avrdude: jtagmkII_send(): failed to send command to serial port avrdude: ser_recv(): read error: The device does not recognize the command.`
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or unsubscribe.