#avr Logs

Mar 31 2019

#avr Calendar

09:47 AM gsi__ is now known as gsi_
12:19 PM vmt: --
02:45 PM kiki_lamb: Okay, so I've got this code that compiles and functions correctly on avr-gcc 5.4.0 with '-mmcpu=atmega32p -Os': https://gist.github.com/kiki-lamb/3e6482dbae6704d39d322e89df6da1d0
02:45 PM kiki_lamb: If I try building it with -mmcpu=attiny28, i get 'illegal opcode sts for mcu avr25'. What's happening here?
02:50 PM cehteh: iirc there are some subtle instruction set differences between the tinys
02:52 PM cehteh: i once build something for the tiny13, until it was little more than 1kb, recompiled for tiny45 and suddenly the binary was less than 1kb :D
02:52 PM kiki_lamb: AFAIK they just ack the xMULxx instructions (and so my code should (and as far as I can tell, does) instead use a software implementation included in avr-gcc labelled as __fmulsu instead of the real thing
02:52 PM kiki_lamb: it should have sts, though :/
02:52 PM kiki_lamb: er, ack = lack
02:53 PM cehteh: mul is the biggiest difference between avr's but i think there are some minor differences as well, but you have to look them up
02:53 PM kiki_lamb: I feel like I must be doing something fucky in the definitions of the input/output registers for the ASM block, but I can't quite tell what...
02:53 PM cehteh: iirc some tinys have less registers as well
02:57 PM kiki_lamb: ohhh shit, a proper fmulsu call is sneaking in and being interpreted as some sort of bad sts... hm, i'll have to ifdef around that I guess.
05:02 PM day_ is now known as day
08:13 PM vmt: --
11:51 PM day_ is now known as day