#avr | Logs for 2017-01-16

Back
[00:05:13] <Levitator> Ceteh that's a good point. I'll have to look.
[00:30:17] <carabia> you could just flash in a new one...
[01:19:03] <_ami_> sabor: so far, i am happy with orange pi pc plus :)
[01:19:17] <_ami_> Armbian Legacy image does work well.
[01:21:03] <carabia> are the loonix gpu drivers for all those socs still super shit?
[01:21:49] <carabia> allloser and broadcom, i guess
[01:23:20] <sabor> _ami_: is this the one you gave me the link?
[01:23:53] <sabor> armbian ubuntu image?
[01:24:18] <_ami_> sabor: yeah, i used the desktop one
[01:24:19] <carabia> though i shouldn't say anything, i'm not savvy with this kind of a thing. perhaps it's not the drivers, maybe it's some sort of an inherent inability to optimize debian and the software
[01:24:20] <_ami_> ubuntu one.
[01:24:27] <_ami_> Xenial (16.04)
[01:24:37] <_ami_> but legacy .. 3.4.X kernel :/
[01:24:53] <carabia> and assdroid is just better optimized...java luls
[01:25:02] <_ami_> carabia: :P
[01:25:45] <_ami_> sabor: i do need to test GPIOs though and wifi tests
[01:26:00] <_ami_> hoepfully i2c/spi works out of box.
[01:27:46] <sabor> _ami_: i have to look if i can upgrade the kernel of mine to get ethernet working, some I/O would be nice too ofcourse...
[01:28:19] <carabia> a friend of mine wanted me to make him a temp sensor network with a fucking raspberry pi and a bunch of those esp chips
[01:28:32] <_ami_> sabor: don't upgrade.. as most of the soc chip drivers are binary blob :/ so few things like gpu acceleration won't work
[01:29:06] <carabia> first of all he wasnt paying me anything, and secondly i said i'd use nordic arm/rf-link chips for it, he said naa, and i told him to fuck off
[01:29:22] <_ami_> carabia: haha :)
[01:30:06] <carabia> i haven't used those nordic chips in question, i figured it'd be a nice introduction as he would have paid for the hw, but turns out he was a jew
[01:30:12] <carabia> do we like jews? naa
[01:34:29] <Emil> Levitator: if you dont have a usbasp
[01:34:57] <Emil> you can always reprogram with another avr
[01:35:06] <Emil> or spi manually ":D"
[01:35:29] <Levitator> Emil: That's an idea.
[01:35:57] <Levitator> Is the bootloader guaranteed to be in the bottom 2kB?
[01:36:19] <_ami_> Levitator: yeah! always at bottom
[01:36:39] <Casper> the bootloader is where you write it
[01:36:54] <Casper> and you write it at the bootloader start address
[01:36:56] <_ami_> in case of avr its a bottom?
[01:37:05] <Casper> not bottom of the flash
[01:37:08] <Casper> but near the top
[01:37:28] <Casper> so if you use a 4k bootloader start address, it will be top - 4k
[01:37:43] <Casper> (remember, the address are in words, 2 bytes per words)
[01:39:31] <_ami_> interesting.. in atmega16a, the bootloader start address is 0x3800
[01:39:46] <_ami_> and 2kb size is allocated to bootloader
[01:40:00] <_ami_> >>> (0x3800 + 2 * 1024 )/1024.0
[01:40:00] <_ami_> 16.0 Kb
[01:41:21] <rue_house> calc "(0x3800+2048)/1024"
[01:41:21] <rue_house> (0x3800+2048)/1024 -->> 16
[01:41:26] <_ami_> Wl,--section-start=.text=$(BOOTLOADER_ADDRESS) => this is the bootloader address we pass as LDFLAGS while flashing bootloader
[01:41:41] <Casper> the application start at 0 however (actually, vector table -> application)
[01:41:54] <Casper> the reset address is 0 or bootloader
[01:42:10] <_ami_> Casper: yeah. i wrote bootloader for m16a, m8 and m328p
[01:42:17] <Levitator> Well, thanks for the advice. Time for bed.
[01:42:18] <Casper> and the bootloader can have it's own vector table
[01:42:33] <rue_house> someone writing their own bootloader?
[01:42:51] <_ami_> Casper: we just do jmp 0x000 whenever u want to get out of bootloader and switch to application.
[01:43:06] <rue_house> oh no! are we running out of bootloaders! should I start writing one tooo!!!?!?!?!
[01:43:57] <Casper> rue_house: go to bed, and sleep!
[01:44:20] <rue_house> its one or the other apparently
[01:44:37] <Casper> or find me a new job, or make me food!
[01:46:39] <rue_house> a new job?
[01:46:43] <Casper> yeah
[01:46:46] <rue_house> how are you at 3d modeling?
[01:46:47] <Casper> tired of mine
[01:46:55] <rue_house> nude ladies, from live models?
[01:46:56] <Casper> I can... move the view?
[01:47:23] <rue_house> hmm
[01:48:04] <rue_house> ah, well, I guess that ones not for you then...
[01:48:05] <rue_house> hmmm
[01:48:16] <rue_house> how about scraping barnicles off the bottom of boats?
[01:48:29] <Haohmaru> wat o_O
[01:48:47] <Haohmaru> it's too early in the morning for barnicles
[01:48:53] <rue_house> while their in the water.
[01:49:30] <Casper> I'm looking for a stable job with retirement funds and insurances and all...
[01:49:57] <rue_house> I think US president will be back up for grabs again soon
[01:50:17] <rue_house> aparently any idiot can become the president of the usa
[01:50:45] <Casper> I also don't want an outdoor job, too cold in winter, too hot in summer (I'ld die!)
[01:51:11] <Casper> no
[01:51:27] <Casper> not any idiot, only those who have strong tie with russia and get help from them
[01:51:55] <rue_house> well, what baout becomming a freelance coder?
[01:52:02] <rue_house> oh, right, no bennifits
[01:52:15] <Casper> and I'm really bad, and it's boring
[01:52:26] <rue_house> oh, oh oh oh, I know, Don of a mob!
[01:55:19] <rue_house> to get good benifits and a good retirement package, you would have to kill someone who is gonna get one and take their place
[01:55:31] <rue_house> cause, new ones dont exist
[01:57:58] <Casper> I don't even have an idea what I could take :(
[01:58:55] <rue_house> you wuold have to take out a CEO or someone high
[01:59:37] <rue_house> if you steal the identity of an evil ceo, and your nice, nobody will really care
[02:00:26] <rue_house> (and you terminate them and take their place)
[02:00:36] <Haohmaru> huehue
[08:03:12] <aczid> hmm, has anyone ever successfully disabled the ISP fuse bit over ISP? or am I asking for the impossible
[08:03:28] <aczid> avrdude: safemode: fuse changed! Was 7f, and is now 5f
[08:03:29] <aczid> lol
[08:03:47] <aczid> aha, -u
[08:03:48] <aczid> nm
[08:03:54] <toddpratt> did u killed a chip?
[08:04:02] <LeoNerd> The chip will let you do it. avrdude will try to save you from doing it accidentally
[08:04:24] <toddpratt> i killed an attiny13 a couple weeks ago
[08:04:37] <LeoNerd> You can HVSP it back again
[08:04:50] <toddpratt> 0.5USD down the drain
[08:05:02] <toddpratt> I don't have one of those programmers
[08:05:05] <LeoNerd> Physical damage aside, it's impossible to permanetnyl brick a chip
[08:05:10] <LeoNerd> I sell them for $30 ;)
[08:05:46] <toddpratt> I got a 40-pack of 13a's last summer
[08:06:22] <LeoNerd> Perhaps just keep your de-ISP'ed ones in a box, and if you end up with a big stack of them it might be worth getting the HVSP programmer anyway to restore them
[08:06:38] <LeoNerd> Having HVSP is useful also for talking dW, or turning off the reset pin so you get one more GPIO pin
[08:06:46] <LeoNerd> Very useful on those little 8pin devices - having 6 GPIOs instead of 5
[08:07:07] <LeoNerd> Or 12 instead of 11 on the 'tinyN4 range
[08:07:49] <specing> isn't tiny13 6 pin?
[08:08:08] <specing> does it even have normal ISP (SPI)?
[08:08:09] <LeoNerd> ATtiny13 is an earlier step of the ATtinyN5 range. 8pin DIP/SOIC/... device
[08:08:15] <specing> ah ok
[08:08:17] <LeoNerd> You're thinking of the tiny11
[08:08:36] <aczid> I am trying to lock it down :)
[08:08:40] <Lambda_Aurigae> or tiny5
[08:08:41] <aczid> have killed a few by accident in the past
[08:08:46] <toddpratt> specing: dip8
[08:08:54] <toddpratt> (well, the one I have)
[08:09:00] <toddpratt> (ones)
[08:09:01] <aczid> this chip also doesn't have HV programming
[08:09:01] <LeoNerd> Ah - well yes, if you ask avrdude enough you can do that intentionally. Though of course you only get one shot at it if you don't have HVSP
[08:09:23] <aczid> yep this makes sense, thanks :)
[08:09:31] <specing> toddpratt: pretty sure they come in other packages as well
[08:09:36] <aczid> still haven't managed to convince avrdude to blow it up
[08:09:55] <toddpratt> specing: yes, that's why I said it's the one I have
[08:10:21] <LeoNerd> I'm not aware of an ATtiny chip that *doesn't* have some form of HVxP
[08:10:46] <Lambda_Aurigae> most tinys have HVSP.
[08:10:46] <toddpratt> LeoNerd: money is tight right now, but I might buy one at some point. I'd like to use that reset pin as GPIO maybe. I have a bunch of 85's too
[08:10:56] <Lambda_Aurigae> I think many of the megas have HVPP rather than HVSP.
[08:10:57] * LeoNerd nod
[08:11:00] <LeoNerd> That's exactly why I made mine
[08:11:26] <LeoNerd> It's a full programmer, not just a fuse resetter, so you can just turn off the RESET pin and then burn the program using it
[08:11:56] <Lambda_Aurigae> lacking something like that there is always the fuse doctor...can just reset the fuses using hvsp mode.
[08:12:00] <Lambda_Aurigae> those are easy to make.
[08:12:40] <LeoNerd> Yes but if your intention is to develop in non-ISP mode that gets very tedious
[08:13:06] <Lambda_Aurigae> yup yup.
[08:13:26] <Lambda_Aurigae> I made one..used it a few times...don't have much need for it these days.
[10:55:04] <PolishProgrammer> in practice what's the fastest adc sampling rate achievable on something like mega16
[10:55:06] <PolishProgrammer> ?
[10:58:27] <Lambda_Aurigae> hmmm..have you looked at sample speed in the datasheet?
[10:59:44] <PolishProgrammer> i will, but that is probably bigger than practice
[11:00:13] <Lambda_Aurigae> atmega328p says up to 76.9 Ksps...so, downrate that by 20% and you have a good rule of thumb.
[11:00:19] <Lambda_Aurigae> 60Ksps
[11:00:52] <Lambda_Aurigae> now, just because it can capture that fast doesn't mean a lot....beyond that, what you are doing with that data has to be taken into account.
[11:01:42] <Lambda_Aurigae> as it can process up to 20 million instructions per second,,, if we guess at 200 instructions of processing per sample, that's 100K samples processed per second.
[11:01:51] <Lambda_Aurigae> so, generally, 60K is not a bad number.
[11:02:07] <PolishProgrammer> thanks ;)
[11:02:23] <Emil> Lambda_Aurigae: eh? what's that downgrade of 20#
[11:02:24] <Emil> 20%
[11:02:43] <Lambda_Aurigae> Emil, just a wtf number pulled out of my arse for overhead that nobody bothers to think about.
[11:03:00] <Lambda_Aurigae> in theory, you could get the full 76.9 Ksps and process it just fine
[11:03:24] <Emil> AVRs have a maximum ADC clock of 1MHz and in continuous acquisition mode it takes 13.5 cycles to get a new sample
[11:03:40] <Lambda_Aurigae> I was going by the datasheet for that 76.9
[11:04:26] <Emil> That's 74ks/s
[11:04:39] <Lambda_Aurigae> so, within the limits of my 20% wtf number.
[11:04:54] <Emil> If you code in asm one might achieve that if you perfectly time your things
[11:04:57] <Lambda_Aurigae> after pulling numbers out of the datasheet.
[11:06:49] <Lambda_Aurigae> so, still doable.
[11:06:58] <Emil> PolishProgrammer: but keep in mind that if you need dat 10 (really not 10) bits of resolution you can run at 250Khz ADC clock, which means 18kHz
[11:07:06] <Lambda_Aurigae> 50Ksps would more along the line of easily doable.
[11:07:21] <Emil> But in that case you have to scale your system clock to give you that 250kHz
[11:07:32] <PolishProgrammer> yeah
[11:07:47] <Emil> at 1MHz ADC clock your resolution is 8 (or that's what they say)
[11:07:50] <Lambda_Aurigae> then again, what overhead do you have for processing that data?
[11:08:01] <Emil> You really need to quantify it yourself
[11:08:25] <PolishProgrammer> i was thinking about capturing them to ram and then sending off via i2c to a raspi
[11:10:29] <Emil> Yeah, no
[11:10:35] <Emil> At least not at those speeds
[11:10:56] <Emil> If you can use SPI then it's easy as fuck
[11:10:57] <PolishProgrammer> not like non stop
[11:11:21] <Emil> I recommend using SPI
[11:11:38] <PolishProgrammer> why spi?
[11:11:41] <Lambda_Aurigae> i2c has nasty overhead and speed issues.
[11:11:51] <Lambda_Aurigae> spi is better for 1 to 1 communications.
[11:11:53] <PolishProgrammer> even the hardware i2c
[11:11:53] <Emil> PolishProgrammer: faaaaaaaaaaaaaar easier, you can actually send at those speeds and overall better
[11:12:13] <Lambda_Aurigae> i2c is good for multidrop bus
[11:12:17] <_ami_> carabia: i kind of figure out how to work on windows and feel like working on linux. :) https://t.co/vNc4p4tRVE
[11:12:51] <PolishProgrammer> i just have an ultrasonic transducer and i want to make a simple echosounder
[11:13:02] <Emil> PolishProgrammer: use SPI then
[11:13:14] <Lambda_Aurigae> i2c can do 1Mb/s comms, yes...getting that stable and working well is,,,not fun...plus that 1Mb/s isn't 1Mb/s throughput...there is overhead in there.
[11:13:47] <PolishProgrammer> getting spi and i2c to work is still on my to-do list
[11:13:56] <Lambda_Aurigae> _ami_, I did something to make me work under windows and linux at the same time...put my desk under a window.
[11:14:00] <_ami_> PolishProgrammer: spi is easier for sure. :D
[11:14:18] <Emil> Lambda_Aurigae: can the avr do 1Mb/s i2c?
[11:14:43] <Lambda_Aurigae> Emil, ummm...lemme check.
[11:14:44] <Emil> Datashit specs at 400kHz and capacitance becomes a bitch pita
[11:14:54] <PolishProgrammer> thanks, i'll try ;) i consider myself still a beginner tho (although more than theese arduino guys)
[11:14:54] <Emil> SPI is god tier <3
[11:14:55] <_ami_> Lambda_Aurigae: i needed to find a way to work on windows since this is installed on my laptop which i prefer to keep with me while travelling. :)
[11:14:58] <Lambda_Aurigae> nope
[11:15:09] <Lambda_Aurigae> 400Khz max
[11:15:19] <Emil> Lambda_Aurigae: thought so
[11:15:38] <Emil> I mean, one could place arbitrary values into the register but the fukken stray capacitance
[11:15:59] <Emil> PolishProgrammer: What was you uc?
[11:16:03] <Emil> Or what board did you use?
[11:16:33] <Lambda_Aurigae> he did mention atmega16 earlier....gonna be lower specs than what I'm looking at which is atmega328
[11:16:37] <PolishProgrammer> i cutrently have either mega8 or 16 but im looking forward to learning assembly on an attiny
[11:17:35] <Lambda_Aurigae> with the 328, you can go as fast as fOSC/2 or up to 10Mb/s
[11:18:11] <Lambda_Aurigae> just happened to be the first datasheet I opened.
[11:19:09] <PolishProgrammer> other topic
[11:19:10] <_ami_> atmega16 has lower specs.. it can run upto 16Mhz only.. so 8 mhz spi speed at max.
[11:19:27] <PolishProgrammer> good to know that
[11:19:40] <_ami_> PolishProgrammer: why not asm on mega :) ?
[11:19:47] <_ami_> attiny is a bitch...
[11:20:02] <PolishProgrammer> _ami_: to be honest i dont know
[11:20:12] <PolishProgrammer> i will try
[11:20:15] <PolishProgrammer> :D
[11:20:56] <Lambda_Aurigae> avr asm is avr asm...mega just has a few more commands and lots more flash and ram.
[11:21:05] <PolishProgrammer> other topic: what would you do with 300 74hct573 8 bit latches?
[11:21:34] <Lambda_Aurigae> buy a few thousand LEDs and make a big honking display!
[11:22:52] <Lambda_Aurigae> or build my own ram board for the fun of it.
[11:23:03] <Lambda_Aurigae> something like a fifo ram board.
[11:23:26] <Lambda_Aurigae> but, I'm strange
[11:23:52] <Emil> PolishProgrammer: https://emil.fi/jako/spimic.c
[11:24:03] <Emil> It also contains a serial possibility
[11:24:18] <Lambda_Aurigae> when I was a kid I ripped apart several dozens of logic boards from old xerox devices(given to me by a xerox repair tech) and used them to build a 4-bit computer.
[11:24:22] <Emil> Oh and that's for the m328p
[11:26:29] <Emil> PolishProgrammer: so that program sends bytes out of either spi or serial at 48kHz
[11:26:34] <Emil> you can easily adapt it to your needs
[11:27:02] <PolishProgrammer> thanks :)
[11:27:16] <Emil> If you want to make it synchronous you need test if the selected peripheral is ready to transmit, though
[11:27:41] <_ami_> Emil: no offence, i know you are a good programmer. but your code is extremely hard to understand. why not use (1 << GPIO_NO) instead
[11:27:43] <_ami_> ?
[11:27:45] <Emil> PolishProgrammer: AVRs have awesome datasheets and you pretty much only need to look at the register descriptions
[11:27:59] <PolishProgrammer> i know :)
[11:28:10] <PolishProgrammer> nice to read
[11:28:24] <Emil> _ami_: no, the code is extremely easy to understand. I like the binary expressions better when coding for myself.
[11:28:26] <Lambda_Aurigae> _ami_, works fine for me...but I'm all about reading the docs and knowing what the register bits are for.
[11:28:29] <PolishProgrammer> so blinlenlights it is then
[11:28:50] <Emil> and besides, those 1<<DEFINED instructions rarely tell you anything at all
[11:29:09] <Emil> it is easier to look at the datasheet than try to cram all those defines and what they mean to your head
[11:29:19] <Lambda_Aurigae> now, if he had used register addresses instead of names, yeah, then it would be a bitch to read.
[11:29:25] <_ami_> DDRB=0b00100000; ===> DDRB |= (1 << PB5);
[11:29:33] <PolishProgrammer> ill make a huge 7seg display or a big serial terminal with 16 segs
[11:29:38] <Emil> _ami_: THOSE ARE NOT THE SAME
[11:30:04] <PolishProgrammer> i was expecting (1<<x) vs _BV(x)
[11:30:19] <PolishProgrammer> they arent the same indeed
[11:30:20] <Emil> _ami_: DDRB|=0b0010000 <==> DDRB|=(1<<PB5)
[11:30:29] <_ami_> oh.. yeah.
[11:30:31] <PolishProgrammer> ^
[11:30:33] <Emil> _ami_: DDRB|=0b00100000 <==> DDRB|=(1<<PB5)
[11:30:38] <Lambda_Aurigae> _ami_, he is setting the entire register,,,all the bits..not just ORing in a bit.
[11:31:05] <_ami_> yeah, i understand that..
[11:31:09] <Emil> But sure, I could use those defines
[11:31:23] <Emil> Somewhat gravitating towards them actually
[11:31:40] <Lambda_Aurigae> you do get more expected operations that way as you know exactly what every bit in the register is set to.
[11:31:46] <_ami_> At start of the program, DDRB = 0; DDRB |= (1 << PB5); :)
[11:31:48] <Emil> But imho they really just appear more professional (they are perhaps more portable, though)
[11:31:48] <Lambda_Aurigae> operations/behavior
[11:32:38] <_ami_> Emil: your code would force me to refer DS for sure. :D
[11:32:43] <Emil> I hate that _BV(X) macro with passion btw
[11:32:53] <Emil> _ami_: why?
[11:32:54] <Lambda_Aurigae> also, why PB5, PA5, PC5? why not just P5 ? PB5, PA5, and PC5 are all the same thing.
[11:33:04] <PolishProgrammer> i dont use it either
[11:33:11] <Emil> _ami_: Using DEM defines doesn't actually make much easier to read
[11:33:15] <Emil> I should have an example
[11:33:34] <Emil> Lambda_Aurigae: why troll, though? :D
[11:33:36] <_ami_> Lambda_Aurigae: thats for code readibility
[11:33:41] <Lambda_Aurigae> Emil, why not?
[11:33:47] <Emil> Lambda_Aurigae: Oh wait misread
[11:34:32] <Emil> Hmm, I can understand using PB5 and PA5 actually, they might not be at the same location in the register (though who the fuck would design them as such is beyond me)
[11:34:35] <Lambda_Aurigae> if you are using DDRB and (1 << P5)...then you know it is for portB....
[11:34:35] <PolishProgrammer> pastebin
[11:34:39] <PolishProgrammer> ehh
[11:34:56] <Lambda_Aurigae> yeah, ok, will give you that one.
[11:35:26] <PolishProgrammer> what do you think about this random piece of code ? pastebin.com/fAUh3Stx
[11:35:33] <Emil> But still, using binary forces you to actually go look at the datasheet
[11:35:40] <skz81> Emil, _ami_ I find it well-readable with bit values "hardcorded" (spimic.c) but it is maybe also less portable if register map changes ?
[11:35:41] <Emil> instead of relying on defines that may or may not work
[11:35:52] <skz81> from chip to chip, I mean
[11:35:58] <Lambda_Aurigae> PolishProgrammer, where is that writebyte function?
[11:35:58] <Emil> skz81: like I said, less portable indeed
[11:36:20] <Lambda_Aurigae> oh..nevermind..included up there.
[11:36:29] <Lambda_Aurigae> no clue what it does exactly, but,,
[11:36:46] <PolishProgrammer> another file, this was the firmware to a board made for giggles with mega8 and a 595 with leds
[11:36:52] <skz81> Emil, ok if everybody's aware, ok for me :)
[11:37:25] <PolishProgrammer> like, first try with 595s before doing sth bigger
[11:37:39] <Lambda_Aurigae> what do the sith have to do with it?
[11:37:59] <_ami_> Lambda_Aurigae: not all MCU has all 7 GPIO ports..
[11:38:13] <_ami_> so naming them like PA or PB makes sense
[11:39:17] <Lambda_Aurigae> _ami_, just looking at the registers, PA1 and PB1 are the same value...just seems odd to me but I can see if the register for specific pins don't coincide.
[11:39:55] <Lambda_Aurigae> mostly my little ocd about removing unneeded things from my code.
[11:40:27] <PolishProgrammer> unneeded? the compiler resolves the macros anyways.
[11:40:28] <Lambda_Aurigae> and, yes, I know, if they aren't used they go away when compiled.
[11:40:52] <Emil> _ami_: here, compare these: https://emil.fi/jako/scap.c and https://emil.fi/jako/ccap.c
[11:41:00] <Emil> I don't remember if they are functionally exactly the same
[11:41:16] <Emil> But you can see that using the defines actually tells you pretty much nothing, sadly
[11:41:22] <Emil> Some of them you can reason about
[11:41:25] <Emil> Though
[11:42:31] <PolishProgrammer> thanks for all the tips. see you later :)
[11:42:59] <Emil> PolishProgrammer: (oh you quit already) np
[11:43:39] <Emil> I might have removed the redundant parts at least
[11:44:09] <Emil> Lambda_Aurigae: skz81 What do you guys think?
[11:45:10] <Emil> But yeah, the code looks better with those defines and it is more portably
[11:45:21] <Emil> portable*, so I am gravitating towards it
[11:48:08] <Emil> PolishProgrammer: wtf are you doing in your code?
[11:48:48] <Emil> >uint8_t x=0; ... if(x>=0xFF) x=0;
[11:48:55] <_ami_> :P
[11:49:21] <Lambda_Aurigae> I like the 0b00000000 values myself.
[11:49:38] <Lambda_Aurigae> but, I'm sick and twisted in the head.
[12:37:51] <hypermagic> destroyed a pt100 ;>
[12:38:50] <hypermagic> it did not like 400°C, this was a shit device
[12:42:18] <_abc_> Hello. Anyone here knows how to make avr-gcc 's inline asm as honor simple arithmetic on operands? "ldi r30,pm_lo8(label-7)\n\t" -> no error, loads 00 into r30. This is wrong. I tried various things like (()), no luck
[12:44:42] <hypermagic> _abc_, load value then decrement value, otherwise label means address
[12:46:24] <hypermagic> on x86 there is lea for calculating some stuff however in a single clock cycle
[16:13:18] <_abc_> Is anyone here now ? ;) Been very quiet all day long.
[16:21:22] <carabia> no
[16:58:43] <rue_shop3> its only quiet cause nobodys talking
[17:04:36] <Casper> shhhh
[17:06:01] <rue_shop3> aha, this led strip lighting from china was cheap cause the leds were backwards in the smt machine
[17:06:07] <rue_shop3> the + and - are reversed
[17:06:56] <carabia> shh
[17:07:01] <carabia> we're working here
[17:08:58] <Lambda_Aurigae> working?
[17:09:02] <Lambda_Aurigae> I was napping.
[17:09:29] <LeoNerd> Hah
[17:09:55] <specing> rue_shop3: its a feature,not a bug!
[17:16:53] <_abc_> You can sell any faulty doodah as smoke effect device, single use.
[17:16:54] <Lambda_Aurigae> the reversed LEDs are meant to be sold in australia.
[17:21:50] <_abc_> fsck hell even moths are insane here. They sit on plastic (fleece) jumpers and try to eat them. Sicko.
[17:22:09] <_abc_> (to be read in the context of "bugs")
[17:25:11] <antto> feed your moths, damn it!
[17:25:26] <antto> or i'll call the rspca
[17:27:32] <_abc_> I kill bugs all day long
[17:28:06] <_abc_> Wow got the silly timing compensated isr to run for dds, inline asm galore. The inline asm available in avr-gcc is a rarely seen pos.
[17:30:52] <_abc_> just under 60 cycles for timing compensated 32 bit dds
[18:13:56] <Jartza> hmmh
[18:14:00] <glagnar37> _abc_, it's almost like they deliberately tried to make the assembler syntax difficult
[18:14:03] <Jartza> should go to sleep earlier than 4am tonight
[18:19:34] <_abc_> glagnar37: not "almost". And this is not about syntax. Things like "ldi r2, pm_hi8(validasmlabel+7)\n\t" compile without an error and result in ldi r2,00 in the .lst file. I kid you not, it's been uphill both ways, snow, etc.
[18:21:32] <_abc_> Oh, and, never do "nop\r\n" in inline asm. The result in .lst is addr:\n... <- 3 dots. No code there, nothing to see here, move on.
[18:22:06] <_abc_> This is the optimizer I think that does this magic. Nightmares which remind me of coding bootloaders in MASM 6.1 almost 20 years ago.
[18:22:36] <_abc_> There you also had to fight the beast all the way, using cunning, smoke and mirrors, to relocate the damn .com mode to under 0x100.
[18:23:32] <glagnar37> i use a variant of basic called freebasic (yeah yeah laugh all you want)
[18:23:40] <glagnar37> it's good for getting simple stuff done quickly
[18:23:46] <_abc_> I have fbc the compiler therefor
[18:23:56] <_abc_> Err eww
[18:24:00] <glagnar37> it has inline assembler, for which the syntax is fantastic
[18:24:06] <_abc_> oh it does?
[18:24:13] <_abc_> What happens when you move to amd64?
[18:24:41] <glagnar37> eh, it's more of a "hey, we can do this because we aren't an optimizing compiler" thing
[18:25:00] <glagnar37> you say asm, then type your assembly (intel syntax), then end asm.
[18:25:19] * _abc_ goes to #debian to rant a bit about broken live dvds since 8.0 and going strong till now (8.7)
[18:25:59] <glagnar37> i'm rambling, i just got off work and i'm enjoying a beer with nothing to watch.
[18:34:54] <_abc_> http://www.npr.org/sections/thetwo-way/2016/07/21/486910805/tens-of-thousands-of-alpacas-die-in-peruvian-cold-snap wow I'll never complain about the mild blizzard again, I promise </off topic>
[18:35:10] <_abc_> glagnar37: that's okay, letting steam off from time to time
[18:35:22] <_abc_> *the mild blizzard outside.
[18:49:40] <Jartza> I fricking hate gnu as syntax