#avr Logs

Mar 20 2018

#avr Calendar

12:08 AM day__ is now known as day
12:32 AM polprog: rue_bed: i first tried to lift the lid by carefully breaking it off but then in just took a torch and burned the plastic off
01:22 AM dgriffi: anyone see something wrong with this STK500? https://www.ebay.com/itm/361468939186
01:24 AM _ami_: wtf!
01:24 AM _ami_: 836$ fucking dollarts
01:24 AM _ami_: must be typo.
01:24 AM _ami_: should be 8.36$ instead. :P
01:24 AM _ami_: dgriffi, ^
01:25 AM dgriffi: _ami_: I can't help but think that someone might be laundering money.
01:26 AM Casper: lol
01:26 AM Casper: a clone too
01:26 AM dgriffi: would someone please explain to me what could have possibly gone through the minds of people who write software for washing machines to cause them to decide it's a good idea to make the damn appliances play music?
01:26 AM dgriffi: s/software/firmware/g
01:27 AM Casper: no idea
01:27 AM Casper: nobody like it
01:28 AM dgriffi: I've had people tell me "would you rather have it go "BZZZZZZZT!"?
01:29 AM dgriffi: yes, I would.
01:29 AM Casper: I would prefer they go ""
01:29 AM dgriffi: or at the most a simple "ding".
01:30 AM Casper: I still prefer to hear the motor sound
02:01 AM dgriffi: I might wire mine to a mechanical westminster chime just to be an asshole
02:51 AM polprog: dgriffi: make it so a terminal bell plays a carillon
02:52 AM polprog: $ echo -ne "\007" * ding ding ding dong dong dong ding ding*
03:13 AM Haohmaru: oh, 32K ram on some xmegas, nice
03:20 AM nohitzwork: what chip
03:20 AM nohitzwork: im gonna prove to you that it's not nice
03:21 AM Haohmaru: one of the C or D families
03:24 AM Haohmaru: or SDRAM up to 16MB on the xmega A1
03:25 AM Haohmaru: that is, external SDRAM
03:25 AM nohitzwork: can you provide the chip number since this parametric search doenst have anything over 16K
03:26 AM nohitzwork: this actually only has 2 xmegas, wtf
03:27 AM nohitzwork: well never mind, im off to lunch
03:28 AM Haohmaru: https://www.mouser.bg/Semiconductors/Embedded-Processors-Controllers/Microcontrollers-MCU/8-bit-Microcontrollers-MCU/_/N-a85ik?P=1yzbn7r&Keyword=atxmega&FS=True
03:28 AM Haohmaru: not sure if this would work
03:29 AM Haohmaru: ATXMEGA384C3 and ATXMEGA384D3 - 32K RAM
03:33 AM Haohmaru: get back here nohitzwork, it's too early for lunch!
03:49 AM polprog: oh great.
03:49 AM polprog: now im hungry as well :p
03:50 AM polprog: and no lunch in sight
03:50 AM Haohmaru: blame nohitzwork!
04:12 AM nohitzwork: https://www.mouser.fi/ProductDetail/Microchip-Technology-Atmel/ATXMEGA384C3-AU?qs=sGAEpiMZZMvqv2n3s2xjsVQIURldyCCHbavR2777SKE%3d https://www.mouser.fi/ProductDetail/STMicroelectronics/STM32F030RCT6?qs=sGAEpiMZZMuoKKEcg8mMKGHUAmntboesmJKuiyldZcWGWKbCJWGZtw%3d%3d
04:12 AM nohitzwork: see the price difference
04:13 AM nohitzwork: 3rd of the price and with same or better specs
04:13 AM nohitzwork: so why bother with xmegas
04:21 AM Haohmaru: dude, imma slap you
04:21 AM Haohmaru: why do you always bring 32bit chips when i talk about 8bit chips?!
04:22 AM Haohmaru: >:/
04:25 AM polprog: my wordsize is longer than yours
04:26 AM Haohmaru: i'm aware that there are cheaper and "better" chips
04:26 AM nohitzwork: cheaper was the point here
04:26 AM nohitzwork: why pay more for inferior product
04:27 AM Haohmaru: what am i gonna do if i buy this stm?
04:27 AM polprog: i just went ahead and bought it
04:27 AM polprog: :p
04:27 AM nohitzwork: same thing with the xmega ?
04:27 AM Haohmaru: i've to read a ton of stuff before i even get any idea what to do next
04:27 AM polprog: me tooo
04:28 AM polprog: i read the better part of manual
04:28 AM Haohmaru: nohitzwork atmega was UBER easy, atxmega is similar
04:30 AM polprog: shame extended atmega is not called xtmega :p
04:30 AM Haohmaru: extended?
04:30 AM polprog: pc at, pc xt
04:31 AM polprog: oh wait
04:31 AM polprog: its xmega not atxmega
04:31 AM Haohmaru: the chips are atxmega, the name is "xmega"
04:32 AM Haohmaru: ATxmega even.. AT for atmel
04:32 AM Haohmaru: RIP atmel :~(
04:33 AM polprog: oh
04:33 AM polprog: picmega
04:34 AM LeoNerd: mcpmega surely?
04:34 AM Haohmaru: pigmega
04:36 AM polprog: atmega12f16
04:37 AM Haohmaru: atmega12f <- this F really smells bad to my nose
04:37 AM Haohmaru: it smells microchippy
04:40 AM polprog: it is
04:41 AM Haohmaru: i'm scared to open the datasheet
04:41 AM Haohmaru: i'll probably see the gray-red colors of h0rr0r
04:45 AM polprog: i made that name up, dont worry
04:48 AM Haohmaru: why u play with my feelings ;P~
04:50 AM Haohmaru: i scrolled thru the datasheet of that stm chip, 92 pages of info that looks like specifications and requirements, but i have no idea how to use that chip
04:51 AM _ami_: Haohmaru, stm32 datasheets are just voluminous :/
04:52 AM Haohmaru: volu-wat?
04:53 AM _ami_: just big in size without giving concrete information.
04:54 AM Haohmaru: okay, next time someone suggest i switch to an ARM cortex chip for whatever i'm doing - fine, i'll buy the chips, YOU write the firmware for it
04:54 AM Haohmaru: or stfu!
04:54 AM Haohmaru: ;P~
04:54 AM * Haohmaru looks at nohitzwork and rue_bed
04:55 AM * Haohmaru looks very intensely at rue_bed .. so intense that he's starting to fall out of the bed
04:55 AM Haohmaru: >8(
05:00 AM nohitzwork: why are you making things harder than they actually are? this aint rocket science
05:01 AM Haohmaru: it comes down to time and conditions
05:02 AM Haohmaru: i don't have the time and conditions to leave the chips i know and learn new chips
05:02 AM Haohmaru: new chips/tools/whatever
05:03 AM Haohmaru: i learned atmegas a bit as part of my hobby, back in 2010, slowly, as i had time then, and no rush
05:04 AM Haohmaru: then, as part of this job, i had to switch to PIC, it was NASTY, but i had a collegue who was familiar with them (but he was coding only in ASM)
05:04 AM Haohmaru: then i switched to xmega, and that was easy
05:04 AM Haohmaru: it's not like it won't be good to know 32bit chips, sure it will be
05:05 AM Haohmaru: but when do i find time for that?
05:07 AM Haohmaru: i'm also alone now, i'm not just doing the coding, but the pcbs too x_x
05:07 AM Haohmaru: and i ain't good at that
05:08 AM Haohmaru: nohitzwork does this make sense now?
05:08 AM nohitzwork: ye4h
05:10 AM Haohmaru: i've not had a vacation for the last one or two years, other than on the official holidays
05:11 AM Haohmaru: okay, enough complaining
06:15 AM twnqx: Haohmaru: i hope that at least the compensation package is worth it...
06:16 AM twnqx: and you have at least a bit of fun doing what you do
06:16 AM * Haohmaru stays silent
06:18 AM * nux__ sips his coffee
06:18 AM nux__ is now known as nuxil
06:29 AM * polprog is sitting bored on an english lesson
06:33 AM nuxil: guess what
06:33 AM nuxil: i got https://i.gyazo.com/82f8557f8e760ec4d2b2c5d8cd2899a6.jpg today :D
06:34 AM nuxil: started mounting it https://i.gyazo.com/d62c3b9bc038721e2866689f1fab825d.jpg
06:34 AM nuxil: but the manual- lols. i can just set it on fire .
06:36 AM Haohmaru: dafuq is that?
06:52 AM polprog: lol
06:52 AM polprog: a quadricopter?
06:55 AM nuxil: Haohmaru, dafuq is a 3d printer :D
06:56 AM nuxil: tarantula
07:15 AM JanC_ is now known as JanC
08:03 AM polprog: oh didnt notice the name
08:03 AM polprog: Jartza has one i think
11:01 AM Ameisen: I have the LLVM-ARM toolchain... like 90% owrking
11:02 AM Ameisen: though LLD kinda sucks with linker scripts
11:02 AM Ameisen: feel like they need their own linker script format
12:08 PM polprog: i have this function that zeroes the timer, sets the trig up, waits for high state on echo, starts the timer , waits for echo low, stops the timer and returns TCNT1 (16bit value)
12:10 PM Emil: polprog> parentheses everywhere
12:10 PM polprog: for some very odd reason it looks as if either the timer is grossly overflowing (im trying to make it return zero if TOV flag is set - maybe this doesnt work) since the values it returns are very very odd
12:10 PM Emil: ^this right fucking here
12:11 PM Emil: polprog: did you test my code?
12:11 PM Emil: I want to know if my code works :D
12:11 PM polprog: not yet
12:11 PM polprog: i will when mine works
12:11 PM polprog: ;)
12:11 PM Emil: pls
12:11 PM Emil: dolan
12:11 PM polprog: okay, ill test
12:11 PM polprog: emul
12:12 PM polprog: :)
12:12 PM Emil: extended multiply
12:12 PM polprog: which chip has that?
12:12 PM Emil: nothing
12:12 PM Emil: just sounded like imul and I was like :D
12:12 PM polprog: also does any avr have some form of a div instruction ?
12:12 PM Emil: (I didn't instantly get that you just mistyped my name :D)
12:13 PM polprog: hehe
12:13 PM Emil: polprog: avr32 might have
12:13 PM polprog: avr32 that is what? xmega?
12:13 PM Emil: and, well, > is division ;)
12:13 PM polprog: well, yeah
12:13 PM polprog: but if i needed to divide by 13 (ouch)?
12:13 PM Emil: no xmega is different from avr32 iirc
12:14 PM Emil: xmegas might also have div but dunno lol
12:14 PM polprog: let me google that
12:14 PM Emil: already doing it
12:14 PM Emil: you just focus on testing my code :D
12:14 PM Emil: >:D
12:15 PM polprog: The AVR32B cores also support a Java virtual machine in hardware.[3]
12:15 PM polprog: sweet baby jesus what
12:15 PM polprog: also
12:15 PM Emil: used to be all the rage :D
12:15 PM Emil: also "hardware"
12:15 PM Emil: I seriously doubt it was hardware
12:15 PM Emil: well
12:16 PM Emil: same as Atmel advertising their qtouch as being hardware on m328p(b)
12:16 PM polprog: i have a history test tomorrow and if i started messin with the radar robot now i would probably go to bed at 0000
12:16 PM Emil: ssshhh
12:16 PM Emil: no sleep just avr
12:17 PM * polprog snorts a line of 0402 resistors
12:17 PM polprog: brbrbrrrr
12:17 PM polprog: OH YEAH
12:17 PM Emil: anycase just acr ping.c atmega328p "arduino -P /dev/ttyACM0 -b 115200"
12:17 PM Emil: polprog: _nice_
12:17 PM polprog: acr?
12:17 PM polprog: ah i remember
12:18 PM polprog: the script from emil.fi/avr
12:18 PM Emil: yah
12:18 PM Emil: :D
12:18 PM Emil: or make flash if you are a make purist
12:18 PM Emil: or perhaps rather make clean && make && make flash
12:19 PM polprog: nah, seriously. i need to get up earlier so i dont get caught in the bus in the traffic jam nor in the crowd that is at the metro at 0740
12:19 PM polprog: why clean every time?
12:19 PM Emil: matematemate
12:19 PM Emil: it's only 1820 your time :D
12:20 PM nohitzzz2: i think its gonna be a taco night
12:20 PM Emil: just try it bro
12:20 PM Emil: I just want to know if it werks :D
12:20 PM polprog: what tz is finland in?
12:20 PM polprog: okay ill try it
12:20 PM nohitzzz2: +3
12:20 PM Emil: polprog: 1920
12:21 PM polprog: oh. so i am +2 now...
12:21 PM nohitzzz2: no
12:21 PM nohitzzz2: were are +2
12:22 PM nohitzzz2: you are +1
12:22 PM Emil: nohitzzz2: well depends on how you view it
12:22 PM polprog: its 1820 here indeed
12:22 PM Emil: nohitzzz2: we are +3 and polprog is +2
12:22 PM twnqx: in summer you are
12:22 PM nohitzzz2: oh that explains it
12:22 PM twnqx: we are currently in utc+1 (and it's 18:20)
12:22 PM Emil: ah yeah
12:22 PM Emil: totally forgot it's that way
12:23 PM twnqx: just one more week i think ;)
12:23 PM Emil: well summer come in a few weeks and we lose an hour of sleep :D
12:23 PM Emil: twnqx: yeah, the last sunday of March
12:23 PM Emil: at 0300
12:23 PM Tom_L: -6
12:24 PM polprog: Okay Mr. Fihlman, please initiate the code transfer
12:24 PM Emil: polprog: emil.fi/d/ping.c
12:24 PM Emil: polprog https://emil.fi/d/ping.c
12:26 PM polprog: damn
12:27 PM polprog: thats for m328p?
12:27 PM Emil: yeah
12:27 PM Emil: oh you had m8?
12:27 PM polprog: well, ill try to adapt it to m8
12:27 PM Emil: Ah I see where the time sink comes from :D
12:27 PM Emil: can you paste the errors?
12:28 PM polprog: yeah
12:28 PM polprog: just a sec
12:28 PM Emil: I'll help see if it's easily portable
12:28 PM polprog: ah your codes errors
12:29 PM polprog: http://paste.debian.net/1015718/
12:30 PM Emil: Please also add -Wall
12:30 PM Emil: to catch errors that might not be shown without
12:30 PM polprog: http://paste.debian.net/1015719/
12:31 PM Emil: okay so just remove the 0s
12:31 PM Emil: at the end of most registers
12:32 PM Emil: like UCSR0B > UCSRB
12:33 PM Emil: also TCCRB is TCCR1B
12:33 PM polprog: k
12:34 PM polprog: damn i gotta go
12:34 PM polprog: i need to take a look at the car quickly
12:34 PM Emil: :D
12:34 PM polprog: ill be back later
12:34 PM Emil: Alrighty
12:34 PM polprog: dad suspects theres a coolant leak :/
12:34 PM Emil: I could actually see if I can find myself one of those ping sensors too
12:35 PM Emil: TIMSK1 is also just TIMSK
12:47 PM scrumpyjack3 is now known as ScrumpyJack
12:53 PM polprog: fuck
12:53 PM polprog: not goof
12:53 PM polprog: not good*
12:53 PM polprog: the cooland container is empty. it was filled up last month
12:53 PM polprog: cooland*
12:53 PM polprog: coolant*
12:56 PM Casper: polprog: what about that alcohol bottle?
12:56 PM polprog: hm?
12:56 PM polprog: what bottle?
01:04 PM polprog: Emil: ok, got OC1EA, ICIE1, TIMSKR undeclared
01:09 PM Emil: those are still issues?
01:10 PM Emil: OC1EA is not in my code?
01:13 PM Emil: ICIE1 is probably TICIE1
01:13 PM Emil: yeah
01:14 PM Emil: and TIMSKR is probably just TIMSK
01:15 PM Emil: ALso TIMSK1 is TIMSK
01:17 PM Emil: OCIEA1 is OCIE1A
01:18 PM polprog: this bastard is not zeroing my timer
01:18 PM polprog: i caught it red handed
01:18 PM polprog: at the start of the function i put UDR = TCNT1L; UDR = TCNT1H;
01:18 PM polprog: got this on terminal
01:18 PM polprog: $(,048<@DHLPTX\`dhlptx| ¤¨
01:18 PM polprog: its RISIN
01:19 PM Emil: ICIE1 is TICIE1, TIMSK(R) is TIMSK and OC1EA is OCIE1A
01:20 PM Emil: polprog: did you get it to compile?
01:21 PM polprog: TICES1 is the last one odd
01:21 PM Emil: ?
01:21 PM Emil: TICES1?
01:21 PM Emil: No such pattern in my code
01:21 PM polprog: ICES1. my bad
01:21 PM unclenorton: i have a question
01:22 PM Emil: polprog: yeah just add T to the front
01:22 PM Emil: TICIE1
01:22 PM Emil: OH there
01:22 PM Emil: No
01:22 PM Emil: ICES1 should be there on m8
01:23 PM Emil: yeah it's there
01:23 PM Emil: Input capture edge select 1
01:23 PM polprog: okay, it compiled
01:23 PM Emil: uu
01:23 PM polprog: let me adapt the pins now and test it
01:24 PM unclenorton: can i ask a question?
01:24 PM Emil: unclenorton: of course
01:24 PM unclenorton: i have a question about the 'cbi' and 'sbi' instructions, they take 2 instructions so when i set for example bit 5 in PORTB, does pin PB5 go high after 2 clock cycles after executing the instruction or earlier?
01:24 PM Emil: that's what this channel is for
01:24 PM Emil: cbi and sbi are single instruction iirc
01:24 PM polprog: 1 megabaud on 8MHz so thats gonna be.. 125k on 1mhz?
01:24 PM unclenorton: it says "Cycles: 2 Cycles xmega/AVR8L: 1"
01:25 PM Emil: polprog: rc oscillator?
01:25 PM polprog: hmm sbi/cbi are 2 cycles indeed
01:25 PM polprog: Emil: yeah
01:26 PM unclenorton: i just need really precise timing for WS2812s
01:26 PM polprog: i dont have a crystal on hand but ill be using a scope to take a look at the uart
01:27 PM Emil: polprog: pls unfuck your avr and deselect the divide clock by 8 fuse :D
01:27 PM Emil: polprog: or just add the single instruction at the beginning to disable division
01:27 PM polprog: Emil: sec, adapting gpio init
01:29 PM Emil: also it's 62.5k at 1MHz
01:30 PM Emil: unclenorton: have you tried looking at the existing implementations?
01:30 PM Emil: also SBI is single cycle
01:31 PM Emil: and so is CBI
01:31 PM Emil: ah you are on xmega
01:32 PM polprog: on m8 they are 2 cycles as well
01:32 PM Emil: ah
01:32 PM Emil: okay
01:33 PM Emil: wtf
01:33 PM Emil: on XMEGA theya re 1 :D
01:33 PM Emil: and on reduced core tinyavr they are also 1
01:34 PM unclenorton: i'm on attiny
01:34 PM unclenorton: attiny85
01:34 PM unclenorton: that is not the reduced core tinyavr you are talking about, is it?
01:36 PM Emil: I don't think so
01:37 PM Emil: 2 cycles it is
01:38 PM Emil: polprog: how's it going?
01:38 PM unclenorton: but does the pin go high/low after the first or the second cycle?
01:39 PM Emil: probably during the second cycle
01:39 PM polprog: Emil: it does trigger the sensor but i think ill gave to jump the sensor output to the input capture pin on m8
01:39 PM polprog: unclenorton: you asked a very good question
01:40 PM Emil: polprog: ??
01:40 PM polprog: i havent seen the pipeline on avr being explained for 2 cycle instructions
01:40 PM Emil: "I'll gave to jump the sensor"
01:40 PM polprog: my bet is same as Emil's
01:41 PM Emil: whatcha mean polprog with that? :D "I'll gave to jump the sensor output"
01:41 PM polprog: Emil: on my board the ECHO output is connected to INT0 or 1. I have to use a jumper wire to connect it to the input capture pin of the timer :D
01:41 PM polprog: whats the word for using a jumper wire? :D
01:43 PM polprog: aaand my code works !!!!
01:43 PM Emil: doesmycodework
01:43 PM polprog: let me find a jumper wire
01:43 PM Emil: :D
01:43 PM Emil: also share your code
01:43 PM polprog: will do after its done
01:43 PM polprog: okay now let me find the timer trigger input
01:44 PM polprog: ICP1
01:44 PM polprog: okay
01:46 PM polprog: might be the issue with my version
01:47 PM polprog: ie i have a led on icp1
01:47 PM polprog: umm
01:47 PM Emil: :D
01:47 PM polprog: let me think
01:47 PM polprog: i ll reassign that back to pb0...
01:52 PM polprog: Emil: your code outputs somethin
01:52 PM polprog: at a very very slow rate though
01:53 PM polprog: let me copy my uart setup
01:54 PM Emil: my uart setup should be fine
01:54 PM Emil: if the logic borks then it of course produces garbage
01:54 PM Emil: or if you placed the stuff at the wrong place dunno
01:55 PM polprog: k logic borks
01:55 PM polprog: it outputs 00012 all the time
01:57 PM Emil: 00012 is fast
01:57 PM polprog: okay
01:58 PM polprog: changed ICR1 in uart_write_du16(ICR1) to TCNT
01:58 PM polprog: TCNT1*
01:58 PM polprog: now it keeps outputing 7
01:58 PM polprog: looks like its not waiting for the signal to fall
01:58 PM polprog: let me check that
01:59 PM polprog: okay i am officially retarded
02:00 PM polprog: connected the trigger signal to the ICP1 pin
02:00 PM polprog: lol
02:00 PM polprog: so yeah
02:00 PM polprog: your code works
02:00 PM polprog: you just need to output the timer count not that ICR1 pin
02:01 PM polprog: amazing
02:01 PM polprog: :P
02:02 PM unclenorton: why can't i use asm functions in cpp? i have a .h file, .s file and a main.cpp file, both main.cpp and the .s file include the .h file which defines the functions that are in the .s file but when i call them in the main.cpp file it says that they are not defined
02:02 PM Emil: hmmmmmmmmmmm
02:02 PM Emil: polprog: no ICR1 is the right one
02:03 PM polprog: unclenorton: how do you call those functions
02:03 PM polprog: Emil: ley me change it back
02:03 PM Emil: output ICR1 instead of TCNT1, now that the trigger is in the correct place ,)
02:03 PM unclenorton: polprog: what do you mean? in the main.cpp file?
02:03 PM polprog: unclenorton: yes
02:03 PM unclenorton: polprog: function();
02:04 PM Emil: polprog: doesmycodework? :3
02:04 PM antto: polprog keep him on his nails
02:04 PM polprog: Emil: yes <3
02:05 PM Emil: polprog: IMAFUCKINGGOD
02:05 PM Emil: :DDD
02:05 PM polprog: too late antto
02:05 PM polprog: :DD
02:05 PM Emil: antto: DON'T YOU EVER DO THAT TO ME
02:05 PM unclenorton: uuh so does anyone know how to make it work?
02:06 PM polprog: unclenorton: did you define global labels in asm file and extern functions in cpp file
02:06 PM polprog: antto: dont worry, ill fo that next time
02:06 PM polprog: >:)
02:06 PM Emil: wtfstop
02:06 PM antto: >:)
02:06 PM antto: <evil_laugh.mp3>
02:06 PM unclenorton: polprog: do i need to define them in the main.cpp aswell?
02:06 PM polprog: unclenorton: well the c compiler must know they exist somewhere
02:07 PM Casper: <nelsonshaha.wav>
02:07 PM unclenorton: polprog: that's what the .h file is for, right?
02:07 PM polprog: unclenorton: whats in your .h file
02:07 PM * Casper remembers when some irc clients tried to make it's way and had some of those sounds...
02:08 PM unclenorton: idk i'll try to paste it here #ifndef __ASSEMBLER__ void ws_init(); void ws_send(uint8_t byte); #endif
02:08 PM polprog: hmm
02:08 PM Casper: some were quite good, but lacked some functionality, like dcc chat and file transfert... the author just plainly refused to include it
02:08 PM Casper: those died
02:08 PM polprog: hyst a sec let me find an example
02:08 PM polprog: just*
02:09 PM polprog: http://polprog.net/papiery/avr/74hc595/ that doesnt compile i think but look at global labels in .s and extern in .c. you can put that extern in #ifndef block in your header
02:09 PM antto: Casper i wouldn't use such a client
02:09 PM polprog: huehuehue.opus
02:09 PM Casper: that is what happened
02:10 PM Casper: and it was when fserves started to be popular
02:10 PM antto: shift+del, enter
02:10 PM polprog: im sure there are some mirc scripts for that thp
02:10 PM polprog: tho
02:10 PM polprog: 8
02:10 PM polprog: *
02:10 PM polprog: fuck :D
02:10 PM antto: i use my own ;P~
02:10 PM Casper: same, I made my own scripts back then
02:11 PM unclenorton: polprog: i tried that aswell, without .func and .endfunc but it still didnt work
02:11 PM polprog: oh microshit migrades the webdoc
02:11 PM Casper: made a complete fserve and also a graphical fserve browser
02:11 PM polprog: unclenorton: .func and .endfunc? are you using nasm?
02:11 PM Casper: was good time
02:11 PM antto: i even made one which was going to be "public" and named it "EviL<vkc>CKpunT" >:)
02:11 PM unclenorton: polprog: idk what nasm is but i am using atmel studio
02:12 PM polprog: aha
02:12 PM polprog: okay
02:12 PM Emil: polprog: pls post a video of my code outputting the data? :D
02:12 PM polprog: anyway try to add .global [functionlabel] to .s file
02:12 PM polprog: Emil: okay ;D
02:12 PM antto: polprog send me the video, i'll encode it for you
02:12 PM unclenorton: polprog: that's what i had already
02:12 PM antto: then i'll send it back the encoded so you can upload it
02:12 PM antto: >:)
02:12 PM Emil: antto: youshutyourdirtymouth
02:13 PM polprog: ill send it in ascii art
02:13 PM antto: >8)
02:13 PM Emil: hngh
02:13 PM Emil: god damn it
02:13 PM Emil: I got stuck reading and talking avr instead of doing work
02:13 PM antto: okay, i'll write an algo that restores the original video from the ascii art
02:13 PM Emil: now that's pretty good
02:14 PM antto: i'll draw inspiration from CSI Miami
02:14 PM polprog: ENHANCE
02:14 PM antto: ENHANCE TO THE POWER OF ENHANCE, SQUARED!
02:14 PM antto: \o/
02:14 PM polprog: Emil: i added \r to the uart output routine as well so my terminal works
02:15 PM unclenorton: polprog: have any idea why it doesn't work? i can send you all the 3 files
02:15 PM polprog: unclenorton: paste it to, say, paste.debian.net so we all can look at them
02:17 PM unclenorton: polprog: https://pastebin.com/xhfwRyGE https://pastebin.com/4JM8P04A https://pastebin.com/6cFMWSsJ
02:17 PM Emil: polprog: yeah if you look at my code I updated it to print moar
02:18 PM polprog: unclenorton: ok. and what's the compiler message exactly
02:18 PM unclenorton: the full log?
02:19 PM polprog: yeah
02:19 PM unclenorton: the short thing looks something like this: error: undefined reference to `ws_init()' error: undefined reference to `ws_send(unsigned char)' error: undefined reference to `ws_send(unsigned char)' error: undefined reference to `ws_send(unsigned char)'
02:19 PM polprog: ok
02:20 PM polprog: hmm
02:20 PM polprog: actually
02:20 PM polprog: post the whole log
02:20 PM polprog: whether thats the linker error or compiler
02:21 PM unclenorton: https://pastebin.com/6XwbedLH
02:23 PM Emil: polprog: did it upload already?
02:23 PM polprog: for some reason the linker doesnt see the functions
02:23 PM polprog: Emil: give it a minute
02:24 PM polprog: unclenorton: try to move the extern definitions into the CPP file
02:25 PM polprog: no idea why that linker doesnt see the symbols in the object file
02:25 PM unclenorton: nope still no luck
02:27 PM polprog: Emil: https://www.youtube.com/watch?v=pYQglmzEFKc
02:27 PM polprog: antto: ^
02:28 PM Emil: GOd damn it polprog :D
02:28 PM polprog: unclenorton: never used atmel studio. but you know wheres the problem now.
02:28 PM Emil: "Oh, now it doesn't work..."
02:28 PM polprog: :P
02:29 PM polprog: murphy's cruel
02:29 PM Emil: I thought it was going to be one of those low key diss tracks :D
02:29 PM Emil: "Here's your code, what it doesn't work? DUnno whose fault is that..."
02:29 PM polprog: unclenorton: check the map file
02:29 PM polprog: -Wl,-Map="ATtiny85_WS2812.map"
02:29 PM polprog: maybe thats empty
02:31 PM unclenorton: nope not empty
02:31 PM polprog: yo yo, thats a crapy code, hardcoded modes, no control flow, UART takes a whole entirety, palms are sweaty, compilers not ready, total spaghettu
02:31 PM polprog: tti*
02:31 PM polprog: Emil: thats better? ^
02:34 PM polprog: Emil: http://polprog.net/papiery/avr/random/ping.c heres the m8 version
02:35 PM Emil: polprog: I like those comments on gpio_setup :D
02:35 PM Emil: Also dat broken indentation :D
02:36 PM polprog: oh yeah. didnt update comments
02:36 PM Emil: but nice
02:36 PM polprog: and i think 2 spaces is emacs' default
02:36 PM polprog: :D
02:36 PM polprog: good job Emil
02:36 PM polprog: :)
02:36 PM Emil: now there's two versions of this
02:36 PM Emil: which is pretty nice to show to people
02:36 PM Emil: polprog: good job on porting also :)
02:37 PM polprog: im proud my implementation works
02:37 PM Emil: polprog: shareit
02:37 PM polprog: now let me port it to one that uses actual interrupt
02:38 PM polprog: ill share this "blocking" version, just need to commit and clean it up a bit
02:38 PM Emil: polprog: setting UBRRH is also unnecessary
02:38 PM Emil: btw
02:38 PM polprog: yeah but just to be sure
02:38 PM Emil: all registers are cleared to 0 on startup
02:38 PM Emil: true
02:38 PM Emil: it's good defensive programming
02:39 PM polprog: wonder if actually avr-libc has UBRR macro defined
02:39 PM polprog: so you could just to UBRR = xxx;
02:39 PM Emil: yes
02:39 PM Emil: comeone :D
02:39 PM polprog: nice
02:39 PM Emil: All the 16 bit registers have macros
02:40 PM Emil: or rather
02:40 PM Emil: defines
02:41 PM polprog: what the hell
02:41 PM polprog: mine is not printing a 16 bit int
02:41 PM polprog: the read just loops back at 255
02:41 PM Emil: gcc will detect writes to 16 bit registers and replace it with correct code
02:42 PM Emil: read low first high second from temp, write high first, low second
02:43 PM polprog: so is that unnecesary
02:43 PM polprog: uint16_t count = (TCNT1L); count |= TCNT1H << 8;
02:44 PM polprog: ehh ill leave it
02:44 PM Emil: yes
02:44 PM Emil: bro
02:44 PM Emil: :D
02:44 PM Emil: stop
02:44 PM Emil: just
02:44 PM Emil: uint16_t count=TCNT1
02:45 PM Emil: if you do it like first you are literally killing your perf :D
02:45 PM polprog: okay okay
02:51 PM polprog: oh i know why i suddenly spits zeros
02:51 PM polprog: always clean your overflow flag children
02:54 PM polprog: jesus 248 mV ripple on chips VCC
02:54 PM polprog: how the hell does it still work
02:54 PM polprog: moar caps
02:54 PM polprog: rue was right. separate supply :D
02:56 PM Emil: :D
03:02 PM polprog: a w e s o m e
03:02 PM polprog: the HW part of the radar is working
03:02 PM polprog: ill write the computer side tomorrow
03:06 PM Emil: polprog: what project is it?
03:11 PM nohitzzz2: nuxil can you give links to some of your models ? i would like to show them to a friend
03:17 PM polprog: Emil: small radar like distance plotter
03:17 PM Emil: polprog: nice
03:37 PM antto: polprog i've no idea what that was
03:37 PM antto: but i saw kicad in the background
03:38 PM polprog: that was emils code running on my hardware
03:38 PM antto: that sounds like a trojan
03:38 PM polprog: im happy it worke ;)
03:38 PM antto: kill it
03:39 PM antto: or it's too late.. u r so h4x3d
03:39 PM polprog: already reflashed with my code... sheesh
03:39 PM polprog: shellshock over coport
03:39 PM polprog: comport*
03:40 PM antto: you can't be fully sure
03:40 PM antto: it may have explointed undocumented functions and may have deployed itself on a deeper level
03:40 PM antto: now it may be mining bitcoins for Emil
03:41 PM polprog: installed a bootloader
03:41 PM polprog: actually
03:42 PM polprog: there is a way to trigger program memory write from "protected" area (non bootloader)
03:42 PM polprog: i read that somewhere.
03:42 PM polprog: set up a timer interrupt, somehow enter bootloader, now you can use spm commands
03:42 PM antto: yes, there was an exploit allowing to overwrite the bootloader via an innocent firmware
03:43 PM antto: ..for atmega
03:43 PM polprog: i think it still is "unpatched" as its a sillicon bug :p
03:46 PM Emil: antto: stfuillsharetheprofitswithyou
03:46 PM Emil: antto: "innocent"
03:51 PM nuxil: nohitzzz2, i dont have links to model. i have not uploaded them to any site. and nor will i. if you want screenshot of the small spaceship i got it here.
03:51 PM nuxil: https://gyazo.com/6ab3dfd5293ba60a3ae5c0d5d54f3f9f https://gyazo.com/5620c5394fb7c5a6683e745df7c03762 https://gyazo.com/ce56cd270e191ce00a0c294b322fefa5 https://gyazo.com/1e5197bacd3695d955f47d9f967500a8
03:52 PM nuxil: nohitzzz2, its not done and still in wip.
03:57 PM nohitzzz2: thnaks
03:58 PM nuxil: her is my ship.
03:58 PM nuxil: https://gyazo.com/a636417a84a6125a40e32415090faa0c
03:59 PM nuxil: made from pictures of a real ship. knm skjold
03:59 PM nuxil: https://gyazo.com/61cc78434158b8901c3b539735868ac4
03:59 PM nuxil: :p
04:00 PM polprog: oh kewl
04:01 PM polprog: codeblocks is working
04:01 PM antto: breaking news
04:17 PM polprog: niters
05:03 PM polprog: Emil: nohitzzz2: is that true https://www.reddit.com/r/sysadmin/comments/85vo7m/how_not_to_design_a_health_system_in_finland/
05:07 PM learath: polprog: FWIW, that sounds like how the us government does things
05:07 PM learath: no clue about finland.
05:10 PM nohitzzz2: i dont know anything about that
05:30 PM Emil: polprog: pretty much