Closed TimVosch closed 2 years ago
Hey!
First of all regarding the fuse bitmap, it is a mask for which fuse "registers" are available on your device. So looking at ATtiny814's datasheet, it's 0x5F7 (0 on positions 0x3 and 0x9 since these are Reserved, and 1 on positions 0x0-0x2, 0x4-0x8, 0xA). Presumably it would throw an error if attempting to access a fuse which is unavailable based on this mask.
You also probably forgot to change the flash page size in the updi_device_desc part of the device descriptor. Correct value is 64 bytes, not 128. That is used by avarice when initializing the connection to the target device instead of the flash page size which is at the begining of the outer device descriptor struct. May be why you are getting that failure.
And regarding the OCD module address, I got it from avrdude and seems to be common for the AVR8x family (latest megaAVRs and tinyAVRs including your ATtiny). If it allows you to set breakpoints it should be fine.
The RAM size reported to GDB using info mem
appears to be hard-coded in avarice and is probably done so to account for all possible AVR RAM sizes. Also there is a comment when avarice outputs that xml saying:
/* The RAM size indicated includes the possible EEPROM range, so GDB will treat EEPROM uploads just like simple SRAM load operations. AVaRICE will disambiguate them based on their virtual offset. */
So that size being incorrect probably doesn't hurt at all. GDB may try to access invalid memory due to this but avarice will probably reject such requests anyway.
I added your device to the necessary files in latest commit. Can you please pull that and retry?
Also if there are further issues please post the full output of avarice since your log is missing the initialization messages between avarice and the target (your log starts at command_sequence == 14).
Hey Florin
Thanks for the help and the explanations. I pulled the changes and recompiled avarice. I am indeed able to load firmware on the device and set breakpoints. 🎉
There's a few other issues, like avarice exiting suddenly and variables values not changing / initializing. Once i can consistently reproduce it, I will post more details. For now I am quite busy with graduating, so I will not much time in the upcoming week.
Will close this since there's been no news for a while. Please open another issue if you find more problems.
Hey, it's been almost a year since this was brought up. Just wanted to mention that I've discovered a bug giving me the same issue, which should be fixed now in v2.14-7. Give it a try if you are still interested.
Hi,
First of all thanks for your work on this! After a bit of struggling I could get a GDB server starting. (I did not have hidapi installed!
sudo apt install libhidapi-hidraw0 libhidapi-libusb0
)Unfortunately I am now running into a few issues with a device I am trying to add.
I tried to format and provide you with all the information you need. Let me know if you need something else 👍
What I am trying
I am trying to add the ATtiny814 and flash an ELF file
How I added attiny814
attiny814_io_registers
inioreg.cc
and the headerfuse_bitmap
is most likely incorrectOCD module
might be incorrect.SYSCFG
is a 0x0F00, but I do not know the offsetavarice -k
reports the correct sizesWhat doesn't work
load
in GDB causes avarice/atmel-ice to throw an error:Wrong length for memory access
.Also notable that in gdb
info mem
shows a second region, in the avarice logs there is a memory-map XML that says its the RAM. But that would be incorrect since the ATtiny814 only has 512b SRAM.Code and logs
Devdescr struct
Avarice logs