Page 1 of 1

Illegal opcode on ATtiny

Posted: Thu Mar 11, 2021 1:53 am
by mikenick42
Hi,

I'm trying to modify the ATtiny demos to work on an ATtiny85 and keep getting:

Code: Select all

/tmp/ccqAUctt.s: Assembler messages:
/tmp/ccqAUctt.s:255: Error: illegal opcode jmp for mcu avr25
make: *** [../../ChibiOS/os/common/ports/AVR/compilers/GCC/rules.mk:174: build/obj/chcore.o] Error 1
make: *** Waiting for unfinished jobs....


To get that far I had to set it change the entry in the Makefile from

Code: Select all

MCU = attiny167


to

Code: Select all

MCU = attiny85


as well as cutting out the UART related functions.

I would be tempted to say it's not worth it because the chip only has 8K of flash, but hal_st_lld has an __AVT_ATtiny85__ macro, so there's been at least some effort to make it work.

Is there some other piece that I'm missing?

Re: Illegal opcode on ATtiny

Posted: Mon Jun 14, 2021 1:28 pm
by tfAteba
Hello mokenick42,

Can you give me your setting? (ChibiOS version, board, changes made, a patch will be perfect)
so that I can reproduice your error?

Some time ago, I make ChibiOS to work on ATiny85, so it is possible, but it is hard to tell you what is you problem with the given information.

Re: Illegal opcode on ATtiny

Posted: Mon Jun 14, 2021 1:31 pm
by tfAteba
I just found the link to my git hub where I made attiny85 ChibiOS port:
https://github.com/tfateba/chibios-on-attiny85

You can then take a look to this port to do what you need :)