Can't load program / unable to run
I have a ATtiny84a. Everything worked until I tried to upload new code via debugwire:
Unconnected. > device tty.usbserial-AH06TDUZ
Connected to ATtiny84 on /dev/tty.usbserial10 at 30949 baud.
fffffffe: ffff > l src/main.elf
Loading 308 flash bytes from ELF text segment 0 to addresses $0 through $133.
SerialRead expected 256 bytes, received 112 bytes
64 64 d2 b5 d7 23 01 64 d2 b5 e7 23 00 64 d2 b5 f7 23 00 64 64 64 d2 b4 07 23 10 64 d2 b4 17 23 e0 d0 00 00 64 d2 bf d7 23 64 d2 95 e8 23 64 d2 96 32 23 64 64 d2 b4 07 23 a0 64 d2 b4 17 23 e6 d0 00 00 64 d2 bf d7 23 64 d2 95 e8 23 64 d2 96 32 23 64 64 d2 b4 07 23 b0 64 d2 b4 17 23 e0 d0 00 00 64 d2 bf d7 23 64 d2 95 e8 23 64 d2 96 32
SerialRead expected 256 bytes, received 198 bytes
23 64 64 d2 b4 07 23 e4 64 d2 b4 17 23 e3 d0 00 00 64 d2 bf d7 23 64 d2 95 e8 23 64 d2 96 32 23 64 64 d2 b4 07 23 f1 64 d2 b4 17 23 e0 d0 00 00 64 d2 bf d7 23 64 d2 95 e8 23 64 d2 96 32 23 64 64 d2 b4 07 23 03 64 d2 b4 17 23 c0 d0 00 00 64 d2 bf d7 23 64 d2 95 e8 23 64 d2 96 32 23 64 64 d2 b4 07 23 c8 64 d2 b4 17 23 95 d0 00 00 64 d2 bf d7 23 64 d2 95 e8 23 64 d2 96 32 23 64 64 d2 b4 07 23 31 64 d2 b4 17 23 96 d0 00 00 64 d2 bf 64 64 d2 b5 d7 23 01 64 d2 b5 e7 23 00 64 d2 b5 f7 23 00 64 64 64 d2 b4 07 23 10 64 d2 b4 17 23 e0 d0 00 00 64 d2 bf d7 23 64 d2 95 e8 23 64 d2 96 32 23 64 64 d2
Questions:
- What should I do next? quit and restart doesn't seem to work. The program is not running (or sth is running but not what should)
- Why is the application telling it's device dev/tty.usbserial10? There's no such device, only tty.usbserial-AH06TDUZ
- If I add baudrate, eg 9600 or any other value not around 30949 baud the device is not found at all, how come?
- I also tried with a CH340, but no device is found even /dev/tty.wchusbserial1420 is there :-(
Maybe someone can help me getting things going on?
Just a short update: I was able to update new code by switching to ISP mode with the command "qi" and updating fuses or software via ISP connector.
THIS APPEARS TO BE WRONG: Somehow the *.elf file was broken. I 1st checked to generate a correct elf file until uploading it via isp works. Now that file also can be uploaded with debugwire.
It seemed to work, because I uploaded the same elf. And then no error is thrown. So seems that I can't upload a file via debugwire. No matter what I do (I even changed to a 1N4148 to be sure), I get some errors. This seems to somehow mess up the memory, as afterwards nothing works anymore. No reset, no go, no nothing...
0000: c010 rjmp 0022 (+17) > l ../src/main.elf
Loading 88 flash bytes from ELF text segment 0 to addresses $0 through $57.
SerialRead expected 256 bytes, received 129 bytes
64 64 d2 b5 d7 23 01 64 d2 b5 e7 23 00 64 d2 b5 f7 23 00 64 64 64 d2 b4 07 23 10 64 d2 b4 17 23 c0 d0 00 00 64 d2 bf d7 23 64 d2 95 e8 23 64 d2 96 32 23 64 64 d2 b4 07 23 17 64 d2 b4 17 23 c0 d0 00 00 64 d2 bf d7 23 64 d2 95 e8 23 64 d2 96 32 23 64 64 d2 b4 07 23 16 64 d2 b4 17 23 c0 d0 00 00 64 d2 bf d7 23 64 d2 95 e8 23 64 d2 96 32 23 64 64 d2 b4 07 23 15 64 d2 b4 17 23 c0 d0 00 00
SerialRead expected 256 bytes, received 150 bytes
64 d2 bf d7 23 64 d2 95 e8 23 64 d2 96 32 23 64 64 d2 b4 07 23 14 64 d2 b4 17 23 c0 d0 00 00 64 d2 bf d7 23 64 d2 95 e8 23 64 d2 96 32 23 64 64 d2 b4 07 23 13 64 d2 b4 17 23 c0 d0 00 00 64 d2 bf d7 23 64 d2 95 e8 23 64 d2 96 32 23 64 64 d2 b4 07 23 12 64 d2 b4 17 23 c0 d0 00 00 64 d2 bf d7 23 64 d2 95 e8 23 64 d2 96 32 23 64 64 d2 b4 07 23 11 64 d2 b4 17 23 c0 d0 00 00 64 d2 bf 64 64 d2 b5 d7 23 01 64 d2 b5 e7 23 00 64 d2 b5 f7 23 00 64 64 64 d2