#avr Logs

May 27 2018

#avr Calendar

02:20 AM rue_mohr: yea, it looks like I'm the only one on the internet
02:27 AM Casper: rue_mohr: nooot quite
02:30 AM rue_mohr: you and me are the only people on the internet right now
02:30 AM rue_mohr: -and the google bots-
02:59 AM Emil: hwy now
02:59 AM Emil: not so fast
03:01 AM rue_mohr: who said the highway was fast?
03:03 AM rue_mohr: so, none of you know what a state machine is, right?
03:04 AM rue_mohr: I do!
03:04 AM rue_mohr: so do I!
03:04 AM rue_mohr: ah, ... rlly?
03:04 AM rue_mohr: yea
03:04 AM rue_mohr: what everyone?
03:04 AM * rue_mohr looks to rue_shop4
03:04 AM * rue_mohr looks to rue_bed
03:04 AM rue_mohr: ok, fine
03:05 AM rue_mohr: so, how do we make a ram based state machine
03:05 AM rue_mohr: you mean like a self learning one?
03:05 AM rue_mohr: maybe
03:05 AM rue_mohr: how else would that work?
03:05 AM rue_mohr: I suppose it would have to be called learning wouldn't it?
03:06 AM rue_mohr: there are two types of state machine targets, sequence generation and sequence detection
03:06 AM rue_mohr: ok
03:06 AM nuxil: did you foget to take your skitsofrenia pills today ?
03:06 AM Casper: now rue has officially went crazy... he talk to himself
03:06 AM rue_mohr: so, how would that work in each casE?
03:06 AM rue_mohr: hmm
03:06 AM Casper: nuxil: if only it was that... what rue have is worse
03:07 AM rue_mohr: well, I suppose the sequence generation case would be able to adjust its output sequence somehow
03:07 AM nuxil: ^^
03:07 AM rue_mohr: based on?
03:07 AM rue_mohr: .. again, not sure
03:07 AM rue_mohr: it kinda sounds like we only have part of the picture
03:07 AM rue_mohr: it does, so, whats missing?
03:08 AM rue_mohr: well, if your adjusting an output sequence, its probably to achive some goal
03:08 AM rue_mohr: yes, and the goal would take the form of a particular input seuqnce, presumadly
03:09 AM rue_mohr: so, its a sequence matcher
03:09 AM rue_mohr: yes, but not neccisarrily a 1:1
03:09 AM rue_mohr: right, it might be trying to match a modified version of the reference sequence
03:09 AM rue_mohr: ok, so, how does it know what to change?
03:10 AM rue_mohr: your state machines have 3 sections, inputs, feedback, and outputs
03:10 AM rue_mohr: I'd suggest only 1 thing is adusted
03:11 AM rue_mohr: so, maybe something like the number of states remains constant and just the transition maps change?
03:11 AM rue_mohr: possibbly
03:11 AM rue_mohr: OR the transition map stays the same and just the outputs change
03:11 AM rue_mohr: remember, that last machine you made used the outputs to throw events
03:11 AM rue_mohr: ok, so?
03:11 AM Casper: rue_mohr: GO TO BED
03:12 AM rue_mohr: dunno, lost my train of thought
03:12 AM rue_mohr: which one?
03:12 AM nuxil: are you drunk ?
03:12 AM rue_mohr: Casper, not now, good conversation!
03:12 AM Casper: rue_mohr: NOW!!!
03:12 AM rue_mohr: a long time ago, rue told me about a state machine that was ram based
03:13 AM rue_mohr: it took the power of a hardware, memory based state machine, and unlocked it from the static machine world
03:13 AM rue_mohr: but I'v never been able to fully comprehend it
03:13 AM rue_mohr: there is only one person I know who really knows state machines
03:13 AM rue_mohr: and its me
03:14 AM rue_mohr: yes, well you
03:14 AM rue_mohr: you
03:14 AM rue_mohr: me
03:14 AM rue_mohr: *whatever*
03:15 AM rue_mohr: so, the only two things that can be changed by a ram based state machine are the next-feedback and the output
03:15 AM Casper: rue_mohr: GO TO BED
03:16 AM Casper: atleast I'm going nite
03:16 AM rue_mohr: both the next-state and the output are bound to a finite number
03:16 AM rue_mohr: so you can choose which of them you use, up to a limit
03:17 AM rue_mohr: lets take a simple machine, that wants to match 2 input states to 2 output states, out of 4 possable states
03:17 AM nuxil: read that and shut up :p https://pdfs.semanticscholar.org/df12/c0c0d4f818a48a6b0022bbc6f26ca16c66be.pdf
03:18 AM rue_mohr: your asking to adjust both
03:23 AM rue_mohr: nuxil, pff, they are just storing a static machine in ram
03:24 AM rue_mohr: and their machines dont seem to throw events or outputs
03:27 AM rue_mohr: so, how does this work
03:27 AM rue_mohr: I suppose it depends on the application
03:27 AM rue_mohr: as to weather you change the next-state or the output
03:27 AM rue_mohr: yes
03:28 AM rue_mohr: so, one of them could be fixed
03:28 AM rue_mohr: the state machine would have to be part of a much larger system
03:28 AM rue_mohr: I suppose
03:28 AM rue_mohr: there is a layer we dont know about over this
03:29 AM rue_mohr: what does it look like
03:29 AM rue_mohr: its taking data from somewhere and its adjusting the machine somehow
03:29 AM rue_mohr: and presumadly its then comparing the machine output against that something
03:29 AM rue_mohr: yes
03:30 AM rue_mohr: monkey C, monkey dodo?
03:31 AM rue_mohr: that could be a model
03:31 AM rue_mohr: like the greymatter, a generic translation layer to make up for whatever the hardware looks like
03:32 AM rue_mohr: there is something wrong with the map
03:32 AM rue_mohr: I was just thinking that
03:32 AM rue_mohr: how did they miss it?
03:33 AM rue_mohr: I still dont know how it works, maybe it cant see
03:33 AM rue_mohr: back to state machines
03:33 AM rue_mohr: yea, so, we need a use-case
03:33 AM rue_mohr: thats not easy
03:34 AM rue_mohr: ok, voice recognition
03:34 AM rue_mohr: hahah sure, ok, DEFINE YOUR EVENTS... hah
03:34 AM rue_mohr: :/
03:35 AM rue_mohr: ok, syhthasized speech repeater
03:35 AM rue_mohr: oo...
03:35 AM rue_mohr: hmm
03:35 AM rue_mohr: yea, it'd sit there babbaling to itself trying to mimmic old inputs
03:35 AM rue_mohr: so its a parrot?
03:35 AM rue_mohr: no, parrots are smarter
03:36 AM rue_mohr: you said we need to make small animals
03:36 AM rue_mohr: not quite, I said if your on the right track, small animals wouldn't be much of a challange
03:37 AM rue_mohr: ah, so when small animals are easy I'm almost ready
03:37 AM rue_mohr: maybe
03:37 AM rue_mohr: hmm
03:37 AM rue_mohr: one hell of a reverse engineering challange isn't it?
03:37 AM rue_mohr: yea, where is a mirror when I need one
03:38 AM rue_mohr: I still dont know if you can reverse engineer yourself
03:38 AM rue_mohr: I think I can, if I can isolate and break it all down into small parts
03:38 AM rue_mohr: and CUDA?
03:38 AM rue_mohr: your the one scared to plug that adapter into the computer
03:39 AM rue_mohr: yea, we should do that on a test machine first
03:39 AM rue_mohr: spare room?
03:39 AM rue_mohr: ooo, yea, thats a good target, think its got a 2x pcie?
03:39 AM rue_mohr: prolly
03:39 AM rue_mohr: hmm
03:39 AM rue_mohr: its sata, must have a few pcie
03:40 AM rue_mohr: its 1am
03:40 AM rue_mohr: that explains
03:40 AM rue_mohr: the eyes
03:40 AM rue_mohr: yes
03:41 AM rue_mohr: shut down shop?
03:41 AM rue_mohr: state machines?
03:41 AM rue_mohr: na, I'm good for the night
03:41 AM rue_mohr: we need to talk about interlinking machines too
03:41 AM rue_mohr: and that brain map
03:42 AM rue_mohr: so you dont think its co-inncodince about the brain and the spinal chord eh?
03:42 AM rue_mohr: not a bit.
03:42 AM rue_mohr: but their backwards
03:42 AM rue_mohr: meh
03:42 AM * Thrashbarg checks his ignore list...
03:53 AM antto: O_-
03:53 AM Thrashbarg: yes
04:44 AM antto: Thrashbarg no need to check your ignore list, he seems to be having a dialog(ue) with himself
04:44 AM antto: or, it could be with someone else thru the bouncer ;P~
04:45 AM antto: (assuming he uses a bouncer)
04:54 AM Thrashbarg: hmm
04:56 AM Thrashbarg: waiting for hours and hours for a simulation to finish here. Chugging along at about 2us/s
04:56 AM antto: wut r u simulating?
04:56 AM Thrashbarg: it's generating a frame of video from a design I'm fiddling with
04:57 AM Thrashbarg: I'm a serial LTspice abuser
04:57 AM antto: kewl
04:57 AM antto: i been rendering some dumb shizzle in Blender all night ;P~
04:57 AM Thrashbarg: hehehe
04:59 AM antto: http://i.imgur.com/H7ffUhV.jpg
04:59 AM Thrashbarg: wow nice
04:59 AM Thrashbarg: a friend of mine uses Blender to do 3D models of old computers heh
05:00 AM antto: i suck at modeling in blender.. i always forget all the hotkeys and techniques
05:01 AM Thrashbarg: yea I have no idea how to use it
05:01 AM Thrashbarg: it's worse than using vi for the first time
05:01 AM antto: basically, you have to watch a bunch of tutorial videos to see how the process looks like
05:01 AM Thrashbarg: yup
05:02 AM antto: this is one of those programs where random-clicking-around doesn't lead to anywhere
05:02 AM Thrashbarg: yup
05:02 AM Thrashbarg: I've tried
05:02 AM Thrashbarg: lol
05:02 AM Thrashbarg: then I just asked my friend to do it xD
05:02 AM antto: librecad is similar ;P~
05:02 AM Thrashbarg: yea not *as* bad
05:03 AM antto: no, there's some logic in librecad, and i even remember how to do things in it
05:03 AM antto: but blender - i forget every time
05:03 AM Thrashbarg: hehe
05:06 AM Emil: This channel is ruled by dictators
05:07 AM antto: oh noes
05:07 AM antto: what are we going to do!?
05:12 AM nuxil: The gui in blenders is anything but intuitive.
05:12 AM nuxil: *-s
05:24 AM nuxil: Emil, is Tom_L a dictator ?
05:25 AM nuxil: afik hes the founder of this channel :)
05:25 AM nuxil: yup
05:26 AM nuxil: Registered : Feb 23 20:54:14 2010 founded by Tom_L
05:26 AM Emil: nuxil: nope
05:26 AM Emil: nuxil: it's rue
05:26 AM Emil: nuxil: Tom_L has ##avr (but we are on #avr)
05:27 AM nuxil: ahh yea.
05:27 AM nuxil: my mistake :p
05:29 AM nuxil: well i dont know hes a dictator or not. but hes been acting verry skitso today :p
05:30 AM antto: maybe he is a sleep-chatter
05:30 AM nuxil: lol
05:30 AM antto: you know, like sleep-walking..
05:30 AM * antto hides
05:33 AM Emil: Can we please have the topic unfucked
05:51 AM antto: no
05:55 AM antto: Emil the topic has been sacrificed
05:55 AM antto: victim of ancient rituals
06:09 AM Emil: -fno-plt
06:09 AM Emil: seems interesting
06:09 AM antto: there's also -fpic and such
06:23 AM polprog: morning
06:24 AM * antto looks at the clock
06:24 AM * antto looks at polprog
06:24 AM antto: o_O
06:27 AM polprog: https://puu.sh/AtOYo/1ed73c8c6b.jpg
06:27 AM polprog: i mean.. its morning somewhere
06:28 AM polprog: east coast in teh states :v
09:35 AM Ameisen: that reminds me
09:35 AM nabil_: I wanna implement a visa card reader, but I'm having hard time finding useful documentation
09:36 AM nabil_: or any project I can start from
09:36 AM nabil_: any ideas ?
09:36 AM Ameisen: I really want to go over GCC's register allocator for AVR at some point
09:57 AM * nuxil wounders why nabil_ wants to do that. pherphaps hes making a skimming device.
09:59 AM antto: nuxil give him your visa card..
09:59 AM antto: "for science" of course
10:01 AM nuxil: nabil_, is it a magnetic card reader youre looking for ? or with Rfid , smartcard ?
10:04 AM nuxil: a 3 track magnetic reader costs around 10bucks on ebay tho.
10:05 AM nuxil: also i dount that visa or mastercard would put up technical documentation about their stuff
10:05 AM nuxil: doubt
10:10 AM Emil: nabil_: you mean the chip reader?
10:20 AM nabil_: lol
10:20 AM nabil_: no I found an implementation of the magnetic card
10:21 AM nabil_: (+ it's cheap)
10:21 AM nabil_: it's just that I've built a device that interfaces with a vending machine
10:22 AM nabil_: and was thinking how hard would it be to add an EMV reader to it
10:22 AM nabil_: so pin card type
10:28 AM nabil_: nuxil antto
10:41 AM NooM: hello
10:44 AM nabil_: Hi
10:44 AM nabil_: NooM any cool projects ?
10:44 AM NooM: not atm, i havent played with uC's for like 3 years, but iam gonna start again
10:45 AM nabil_: busy with job ?
10:45 AM NooM: no, just lost interest :(
10:45 AM nabil_: :( what took its placethen
10:45 AM nabil_: ?
10:46 AM NooM: playing video games
10:46 AM NooM: :D
10:46 AM nabil_: :D its been sometime since I played AOE2
10:46 AM nabil_: or warcraft (frozenthrone)
10:46 AM nabil_: good times ...
10:47 AM NooM: nice, iam playing dota 2.. that was a warcraft mod originally
10:47 AM nabil_: dota isn't quite a strategy game
10:47 AM NooM: i agree
10:47 AM nabil_: I like the war strategy type games
10:48 AM nabil_: age of empire, american conquest are on the list
10:48 AM NooM: and even after 4000 games iam not getting better
10:48 AM NooM: :D
10:48 AM nabil_: tough competition in dota2 I heard
10:49 AM NooM: well u get grouped with people ur skilllevel
10:49 AM nabil_: yeah but there is a global ranking
10:49 AM nabil_: gold, silver etc
10:50 AM NooM: yes but iam never gonna make it onto that list
10:50 AM NooM: iam just slightly above average medal
10:50 AM NooM: and stuck there forever
10:50 AM nabil_: Are you a heavy gamer ?
10:51 AM NooM: i was
10:52 AM NooM: do you play a lot?
10:53 AM nabil_: I don't play at all these days :p
10:53 AM nabil_: only chess
10:53 AM NooM: mhm
10:53 AM NooM: and do you have any cool ave projects?
10:53 AM NooM: avr
10:54 AM nabil_: I had the idea of building a EMV card reader
10:54 AM nabil_: for fun
10:54 AM NooM: emv?
10:54 AM nabil_: pin card *
10:55 AM NooM: had the idea means did it?
10:56 AM nabil_: means I'm looking for doc to be able to
10:56 AM NooM: i see
10:57 AM NooM: iam trying hard to find images/screenshots of my old projects.. cant find any
10:59 AM NooM: right now iam designing a lil board for the 328pb, just the basic connections
11:26 AM NooM: https://imgur.com/a/DTaiUgi thats a few things i made... switching regulators, power meter, temp/hum sensors
11:49 AM NooM is now known as DerNooM
12:32 PM rue_bed: good show
12:32 PM rue_bed: did you open source them and wave them under chinas nose so that they would start making them by the 1000's and you could buy them for pennies?
12:33 PM DerNooM: me?
12:33 PM rue_bed: noom
12:33 PM DerNooM: yes i did, but its nothing special anyway... i use schematics from datasheets
12:35 PM DerNooM: :D
12:40 PM nuxil: -fshort-wchar
12:40 PM nuxil: has no affect on avr right ?
12:42 PM nuxil: and no dont use wchar_t blah
12:48 PM nuxil: Holly shit.. what am i seeing. rue_bed been talking to a person and not himself :p
01:07 PM nuxil: what can i use to convert a float number into a string. when i use "dtostrf" it increases the progam with 2064 Bytes. jumping from 2222 til 4286.
01:07 PM nuxil: is there a better solution that dosent eat up as much space as dtostrf ?
01:08 PM DerNooM: i think arduino library has something that does this
01:10 PM nuxil: dtostrf is real bad. it takes up 25% of the space on my chip :(
01:13 PM nuxil: DerNooM, really ? do you recall its name ?
01:14 PM DerNooM: https://github.com/arduino/Arduino/blob/1.8.5/hardware/arduino/avr/cores/arduino/Print.cpp
01:14 PM DerNooM: line 223
01:14 PM nuxil: thats C++
01:14 PM nuxil: i cant read it :(
01:14 PM nuxil: lol
01:14 PM DerNooM: -.-
01:16 PM DerNooM: i bet its not very hard to make it put the numbers into a string
01:17 PM rue_mohr: it is if you are on a platform that only has 256 bytes of ram
01:17 PM rue_mohr: thats why on systems with 256 bytes of ram you send the characters as soon as you know what they are
01:18 PM rue_mohr: caching is bad
01:19 PM nuxil: DerNooM, also from what i hear arduino libs in general isnt that good. but i dont know .i dont play with arduino.
01:19 PM DerNooM: me neither
01:20 PM rue_mohr: arduino libs are horrid, they usually only work for the demo they came with
01:20 PM rue_mohr: as soon as you try to do anything else, all the bugs show
01:20 PM DerNooM: how is atmel start
01:20 PM DerNooM: ?
01:20 PM rue_mohr: hu?
01:21 PM nuxil: what do you mean ?
01:21 PM DerNooM: start.atmel.com/
01:21 PM nuxil: atmel studio
01:21 PM nuxil: meh
01:21 PM nuxil: notepad++ & makefile ftw :D
01:22 PM DerNooM: :(
01:23 PM nuxil: DerNooM, do you use atmelstudio?
01:24 PM DerNooM: yes
01:24 PM DerNooM: its so nice
01:24 PM DerNooM: <3
01:24 PM DerNooM: i have 2 atmel programmers too
01:24 PM nuxil: i have none :p
01:24 PM DerNooM: ice and the other cheap one for avr's
01:24 PM nuxil: i only got my DIY PI programmer :)
01:24 PM DerNooM: :D
01:26 PM nuxil: anywho rue_mohr got any smart ideas on how "read the adc input" and convert the number into a string reprisenting the voltage on the pin ?
01:26 PM nuxil: dtostrf seem to be out of the question as it eats up to much space.
01:26 PM DerNooM: i played with the arm chips from atmel too
01:27 PM MrFahrenheit: so, debian comes with user private groups enabled, but umask set to 022, the fuck, what's the point of it
01:27 PM nuxil: DerNooM, i only played with avr's- atiny13,85 atmega88 and atmega324
01:27 PM nuxil: no arm.
01:27 PM DerNooM: no 328 ?
01:28 PM nuxil: nop. i like 324 better :p
01:28 PM nuxil: bit ass chip
01:28 PM nuxil: *big
01:28 PM DerNooM: lies, qfn is tiny :P
01:29 PM nuxil: hehe :D
01:29 PM nuxil: i only play with the P's :å
01:29 PM nuxil: :p
01:30 PM DerNooM: what u building ?
01:31 PM DerNooM: show off
01:39 PM nuxil: DerNooM, atm im doing V2 of my DDS with proper PCB and such. Its not much to show off yet.. i had to redesign it as i was not happy with how i made it 1st time.
01:41 PM DerNooM: i see
01:41 PM DerNooM: what program u use for designs?
01:41 PM nuxil: it was a bit of a mess. used a atiny85 as a controll chip that sent spi control signals over i2c to a mcp23008 that handled the signal more.
01:42 PM nuxil: not i replaced the atiny85 and the mcp23008 with a atmega88 and a new keypad
01:42 PM nuxil: i used a r2r keypad.. but now i use a proper 4x4matrix keypad
01:42 PM nuxil: DerNooM, Kicad
01:43 PM DerNooM: ah
01:43 PM DerNooM: iam quite sure i have some 23008/16 around too
01:43 PM DerNooM: :D
01:43 PM nuxil: :)
01:45 PM DerNooM: iam using diptrace... i tried some others but they all seemed overly complicated to me
01:45 PM polprog: hello
01:46 PM nuxil: hi
01:46 PM nuxil: got hangover today?
01:46 PM DerNooM: hi
01:46 PM polprog: nah, i didnt drink
01:46 PM nuxil: i tried diptrace for like 5min. :p
01:53 PM nuxil: DerNooM, my old box. https://gyazo.com/4452fa187791ee34fcde8d2ef3e14e55 you can see the ugly keypad i made up from parts from a old remotecontroll :p
01:53 PM nuxil: it was not good so i bough https://gyazo.com/1eb795f891cd7ae8317257fca2e808cc and made a new template for it https://gyazo.com/20523df7d2741b2f3b314a86ca33feb8 :D
01:54 PM DerNooM: it doesent look too bad tho
01:55 PM DerNooM: i have the same number pad too
01:56 PM nuxil: i kind of liked this pad. simple to get working aswell.
01:56 PM DerNooM: mhm
01:56 PM DerNooM: i never used mine :(
01:56 PM DerNooM: i just bought it .. cos ... why not :D
01:57 PM nuxil: lol yea same here. i bough 10 of them on ebay :p
01:57 PM DerNooM: hehehe
01:57 PM nuxil: they came in a 10x pack for like 5bucks
01:58 PM DerNooM: yeah
01:58 PM polprog: did you work with that generic 4x4/3x4 keypad part?
01:58 PM nuxil: 4x4 yes.
01:58 PM polprog: what kind of arrangement is it? just a switch matrix?
01:59 PM polprog: i was thinking about getting one
01:59 PM nuxil: yea switching matrix
01:59 PM polprog: did you like it?
01:59 PM nuxil: yes.
01:59 PM polprog: thanks
01:59 PM polprog: just wanted to make sure its worth it
02:00 PM nuxil: its way better than my homemade r2r keypad :p
02:01 PM DerNooM: i wonder what an r2r keypad is... i know r2r dac.. but keypad
02:01 PM nuxil: yes same idea
02:02 PM nuxil: you can make these 4x4matrix keypad as a "summer". so you only use 1 pin
02:02 PM nuxil: but i dont like that
02:03 PM DerNooM: i see
02:03 PM DerNooM: creative ^^
02:04 PM polprog: why not use DTMF keypad
02:04 PM polprog: its just two wires (three) and very old and robust tech
02:04 PM DerNooM: why not use input pins for so few keys? :P
02:05 PM polprog: because *engineering*
02:05 PM DerNooM: :P
02:05 PM polprog: what if your idea changed and you suddenly needed 104 keys :D
02:05 PM DerNooM: id cry
02:05 PM nuxil: lol
02:05 PM polprog: id implement a PS/2 port
02:05 PM polprog: nota bene 104 is the number of keys on a standard PC keyboard (i think so)
02:05 PM polprog: :P
02:06 PM DerNooM: i never counted mine
02:06 PM polprog: me neither
02:06 PM polprog: 583 items [2 days + 4:43:10]
02:07 PM polprog: winamp just summed up my music directory
02:07 PM nuxil: people still use winamp?
02:08 PM nuxil: i used to use winamp alot like 15 years ago.
02:08 PM polprog: fankly
02:08 PM nuxil: now i just use musicbee
02:08 PM polprog: frankly*
02:08 PM polprog: i was always using linux
02:09 PM polprog: and VLC on that
02:09 PM polprog: but when i started to use windows as well
02:09 PM polprog: i just downloaded newest winamp and the classic skin for it
02:09 PM polprog: and its probably the best music player ever made
02:09 PM nuxil: vlc plays music. but its inferface as a musicplayer just makes it suck-. i use vlc too. but purly for videos
02:09 PM polprog: a folk who runs internet radio told me winamp is the only thing that will run for 2 weeks without a single crash
02:10 PM polprog: its about 20 years of development i think
02:10 PM polprog: im sure its older than me
02:10 PM nuxil: hehe it is :p
02:10 PM DerNooM: youngster
02:12 PM nuxil: winamp must be getting close to 25-30 years now if im not mistaken to much
02:13 PM polprog: 21 kwietnia 1997
02:13 PM polprog: apr '97
02:13 PM DerNooM: ya i looked it up too
02:13 PM polprog: last stable, 2013
02:13 PM DerNooM: nuxil is lazy, could have looked it up for us and not guess :P
02:14 PM nuxil: :D
02:15 PM DerNooM: cos all the winamp talk i opened it now
02:15 PM * polprog slaps nuxil with a flat flex cable
02:17 PM DerNooM: plz no cable abuse
02:17 PM polprog: behave or ill take out the C13
02:17 PM polprog: https://puu.sh/Au1xj/6d5a447850.jpg
02:18 PM nuxil: omg-. you game me flashback :p
02:18 PM nuxil: *gave
02:18 PM polprog: :P
02:19 PM DerNooM: ur irc looks fancy
02:19 PM polprog: thanks
02:19 PM nuxil: why are you irc'ing ovre putty ? :p
02:19 PM DerNooM: u written it urself?
02:19 PM polprog: nuxil: why not
02:19 PM polprog: DerNooM: nah thats irssi
02:20 PM polprog: nuxil, its running on my server
02:20 PM nuxil: yea but why?
02:20 PM DerNooM: WHY NOT??
02:20 PM nuxil: i mena why not use a proper client on your windaws pc :p
02:20 PM DerNooM: lets write an irc client in c#
02:21 PM nuxil: bounce it to your server :p
02:21 PM polprog: well i use a "proper" client on my phone
02:21 PM polprog: bleh not c flat
02:21 PM DerNooM: :(
02:21 PM polprog: irssiproxy is a cool thing
02:21 PM polprog: that way if you mention me i get a notification on my phone
02:21 PM polprog: so in most cases if im awake ill answer
02:22 PM DerNooM: nice
02:22 PM * nuxil should write a script that mentions polprog's name every 5 min after 12AM :p
02:22 PM DerNooM: lol
02:22 PM DerNooM: i thought the same thing
02:24 PM polprog: could be worse
02:24 PM polprog: http://bash.org/?60025
02:24 PM polprog: DerNooM: by the way, how did you find this channel :(
02:24 PM polprog: :) *
02:25 PM nuxil: :D
02:25 PM DerNooM: i like avr's
02:25 PM DerNooM: and i play to start with electronics/programming again (as a hobby, fun)
02:26 PM DerNooM: plan*
02:26 PM nuxil: yea :)
02:26 PM DerNooM: i played a lot with them a few years ago
02:26 PM nuxil: but you dropped out in favor for gaming..
02:26 PM * nuxil slaps DerNooM
02:26 PM DerNooM: 328p mostly. and 1284p
02:27 PM * MrFahrenheit considers moving to centos cause debian's umask setting is crazy
02:27 PM DerNooM: tried some atmel arm's too.. the samd21 is decent
02:27 PM polprog: nice
02:27 PM polprog: going biking, ttyl
02:27 PM DerNooM: cu
02:27 PM nuxil: I want to try out these new chips that got this configure pin stuff
02:27 PM DerNooM: thats the samd21
02:28 PM nuxil: no.. not arm
02:28 PM nuxil: hold on. let me see if i can find it again.
02:29 PM nuxil: oh. its products to come,. not made yet, ATMEGA4809
02:29 PM DerNooM: ah
02:30 PM nuxil: http://www.microchip.com/wwwproducts/en/ATMEGA4809 will not load :(
02:30 PM DerNooM: it did for me
02:34 PM nuxil: Configurable Custom Logic (CCL) is what im refering to..
02:36 PM DerNooM: hm
02:36 PM nuxil: not sure. but it sounds intresting :p
02:37 PM DerNooM: sounds like more stuff to know :(
02:38 PM DerNooM: thats why i dont stick to the arm's ... just much stuff to know, more complicated to setup.. and its not like i ever really need it :D
02:38 PM Emil: nuxil: m328pb also ccl also
02:38 PM Emil: nuxil: or some part of it
02:38 PM nuxil: DerNooM, indeed. atm i havent even explored all possibilitys you can do with atiny12/85
02:38 PM Emil: I should actually try configuring it
02:38 PM nuxil: *13
02:39 PM DerNooM: u have a pb?
02:39 PM nuxil: DerNooM, https://www.youtube.com/watch?v=Y2gl3R3jzjs thats done on atiny85
02:39 PM Emil: nuxil: that's not realy the case though
02:39 PM Emil: once you know the peripherals you _have_ explored the chip
02:39 PM nuxil: sure if you look at it that way,
02:40 PM nuxil: how does this ccl work on 328 ?
02:40 PM nuxil: have you tried it?
02:40 PM Emil: nope
02:40 PM Emil: lemme
02:40 PM DerNooM: in the 328bp it didnt say anything about ccl
02:40 PM DerNooM: pb
02:40 PM DerNooM: thats the chip i wanna go to
02:41 PM nuxil: 20mips ?
02:41 PM nuxil: or 16
02:41 PM DerNooM: max 20
02:41 PM DerNooM: depends on crystal
02:41 PM nuxil: :)
02:41 PM DerNooM: ill let mine run on 8 or 16 mhz
02:41 PM nuxil: ofc.
02:42 PM Emil: ohwait
02:42 PM Emil: it wasn't actually on m328pb
02:42 PM DerNooM: :P
02:42 PM Emil: you had a new modulator
02:42 PM Emil: but no logic
02:42 PM Emil: https://www.pololu.com/file/0J1464/Atmel-42559-Differences-between-ATmega328P-and-ATmega328PB_ApplicationNote_AT15007.pdf
02:43 PM Emil: I also like how this is put
02:43 PM Emil: >3. Updated features
02:43 PM Emil: >3.1 Full Swing Oscillator
02:43 PM Emil: >Removed
02:43 PM Emil: :D
02:43 PM Emil: ":D"
02:44 PM nuxil: o.O
02:44 PM nuxil: that sucks :p
02:44 PM * antto sees polprog's winamp playlist..
02:44 PM nuxil: what is this NVM programming ? https://gyazo.com/c5184a440cd5a8a90975c844fe8830a7
02:44 PM antto: https://www.youtube.com/watch?v=HbTpbrqOdnw
02:45 PM DerNooM: idk what the means... i can still connect a crystal.. like with the 328p ?
02:45 PM nuxil: none volatile memory ?
02:46 PM DerNooM: https://imgur.com/a/DTaiUgi like the one on the left?
02:46 PM Emil: nuxil: it only means that in very noisy situations your normal crystal doesn't work
02:46 PM Emil: antto: where
02:46 PM Emil: antto: where is winamp playlist
02:46 PM antto: scroll up
02:47 PM Emil: DerNooM: of course you can connect a crystal
02:47 PM Emil: antto: pls link
02:47 PM Emil: https://puu.sh/Au1xj/6d5a447850.jpg
02:47 PM Emil: you mean this one?
02:47 PM nuxil: Emil, k. i guess they limited the driver a bit
02:49 PM antto: Emil yes
02:49 PM antto: "rhythm is a dancer" <le_face_le_palm.jpg>
02:51 PM nuxil: so this NVM thiny? is that something that can be used by the program to store static const and such in ? and save flash or eeprom space?
02:51 PM Emil: nuxil: no
02:52 PM Emil: nuxil: it just means you can change the program memory from debugwire
02:52 PM nuxil: ok.
02:52 PM Emil: or
02:52 PM Emil: there's a very nice (prolly undocumented) feature
02:52 PM Emil: that allows you to write to flash while running normal code
02:52 PM Emil: and _that_would_be_awesome
02:53 PM DerNooM: :D
02:53 PM DerNooM: i never had the need to debug an avr :(
02:54 PM Emil: DerNooM: if you are a competent programmer
02:54 PM Emil: you usually don't have a need to do in system debug
02:54 PM DerNooM: iam not
02:54 PM DerNooM: below average id say
02:54 PM Emil: with jtag
02:54 PM Emil: the nice thing about jatg
02:54 PM Emil: jtag*
02:55 PM Emil: though is that
02:55 PM nuxil: <DerNooM> i never had the need to debug an avr :(
02:55 PM nuxil: why the sad face.. just say i never had the need to debug avr cos i write so damn good code :p
02:55 PM Emil: you don't need a separate output function to tell your literal debugger what variables are
02:55 PM Emil: hmm
02:55 PM Emil: I just realised my "hatred" for jtag is misplaced
02:55 PM DerNooM: i used jatag on the arm's
02:55 PM Emil: kek
02:55 PM Emil: DerNooM: JTAG is industry standard
02:55 PM DerNooM: jtag
02:56 PM DerNooM: yes
02:56 PM nuxil: there is no reason to hate jtag :p
02:56 PM Emil: nuxil: I always looked down on people who wanted to use jtag to debug on avr
02:56 PM Emil: :D
02:56 PM Emil: though
02:56 PM DerNooM: :D
02:56 PM Emil: perhaps I still do
02:56 PM Emil: since they often lazily just print variables instead of analysing program code
02:57 PM DerNooM: :D:D:D:D
02:58 PM DerNooM: the step by step feature is cool
02:58 PM Emil: but yeah
02:58 PM Emil: perhaps I'm just an elitist
02:58 PM Emil: also at the same time a luddite
02:58 PM Emil: which is a kek-worthy combination
02:59 PM DerNooM: :D
03:00 PM nuxil: anywho. time for a cup of coffee and find something else that i can use instead of dtostrf
03:01 PM DerNooM: i still suggest rewriting that arduino code
03:01 PM DerNooM: :D
03:01 PM nuxil: i will take a look at it again.
03:02 PM DerNooM: like use a pointer to a char array wich it fill instead of print
03:04 PM DerNooM: maybr sprintf but i doubt its smaller
03:04 PM nuxil: no its big
03:05 PM nuxil: iirc
03:06 PM Emil: https://zeptobars.com/en/read/AD9361-SDR-Analog-Devices-DAC-ADC-65nm
03:06 PM Emil: _cool_
03:07 PM DerNooM: wow
03:07 PM Ameisen: [12:38:55] <DerNooM> https://github.com/arduino/Arduino/blob/1.8.5/hardware/arduino/avr/cores/arduino/Print.cpp
03:07 PM Ameisen: god I hate their C++
03:07 PM Ameisen: it's awful
03:08 PM Ameisen: it's like someone wanted to use C++, wanted it to be more like C, and ended up with the worst of both
03:08 PM DerNooM: thats what i do :P
03:08 PM Ameisen: that is also the stupidest implementation of printing a float I've ever seen
03:08 PM Ameisen: :|
03:09 PM DerNooM: its small tho
03:09 PM Ameisen: a solution without a 4294967040 limit should be the same size.
03:09 PM Ameisen: the fact that it has an overflow is friggin' weird.
03:09 PM Ameisen: and makes it larger,.
03:10 PM Ameisen: there's absolutely no reason they can't just build the string _in the function_, as they're already pulling out the digits
03:10 PM DerNooM: maybe write him a better function
03:11 PM DerNooM: :P
03:11 PM nuxil: Ameisen, got good ideas how to convert the adc value (0-1023) and represent it as a "float" "Voltage value on pin" (Vcc(5v) / adc)
03:11 PM nuxil: tatic char buffer[4] = {0,0,0,0}; dtostrf( ((VCC / 1024) * adc_peek) , 4, 2, buffer); takes up 2064 Bytes.
03:11 PM Ameisen: what range do you want it in?
03:11 PM Ameisen: 0-1?
03:12 PM Ameisen: rather, what range do you want 0-1023 to represent
03:12 PM DerNooM: 0-vcc
03:12 PM Ameisen: oh
03:12 PM Ameisen: you're converting 0-1023 to a string
03:12 PM nuxil: yes.
03:12 PM Ameisen: [0-1024)
03:13 PM Ameisen: yeah, certainly don't use dtostrf
03:13 PM nuxil: i need it as string for lcd
03:13 PM Ameisen: Are you building as C or C++?
03:13 PM Ameisen: I can write you something really nice and reusable in C++
03:13 PM nuxil: C
03:13 PM Ameisen: less so in C
03:13 PM Ameisen: C isn't my strong point
03:13 PM Ameisen: the algorithms are basically the same though
03:13 PM Ameisen: I just hate having to_string functions for every type all scattered around
03:13 PM DerNooM: my first suggestion would be ofc buy a chip with more space :P
03:14 PM Ameisen: well, one sec
03:14 PM Ameisen: I'll write in C++, then I'll let you decode from there
03:14 PM Ameisen: :|
03:14 PM nuxil: DerNooM, well. tha fact that that takes up more than 2k is BAD, real BAD.
03:15 PM nuxil: ther must be a better way to do it
03:16 PM DerNooM: yeah sry no idea. iam no programmer
03:16 PM nuxil: thouse two lines take up 25% of the space on my chip :p
03:16 PM DerNooM: i wouldnt care as long as there is space left
03:17 PM rue_shop4: maybe you should have coded it in C
03:17 PM DerNooM: i use printf on mine
03:17 PM DerNooM: its big too, but i never reached limit
03:17 PM nuxil: but i have lots more i need to be added.
03:20 PM DerNooM: whats the site called where i can post code?
03:20 PM nuxil: pastebin.com
03:20 PM DerNooM: thx
03:20 PM DerNooM: https://pastebin.com/xscerhqg
03:21 PM DerNooM: thats what i use.. with float enabled
03:21 PM DerNooM: display.Write("cntr: %i", counter++);
03:21 PM DerNooM: ez to use
03:21 PM Emil: eww
03:21 PM Emil: super inefficient code
03:21 PM DerNooM: :(
03:23 PM DerNooM: i think i saw that in valve half-life engine code and just copied it
03:23 PM DerNooM: :D
03:33 PM nuxil: i try to see how dtostrf is made.. its a rabbithole :\
03:34 PM DerNooM: lol
03:36 PM nuxil: https://github.com/vancegroup-mirrors/avr-libc/blob/master/avr-libc/libc/stdlib/dtoa_prf.c
03:36 PM nuxil: thats code :E
03:37 PM nuxil: https://android.googlesource.com/toolchain/avr-libc/+/master/avr-libc-1.7.1/libc/stdlib/dtostrf.c
03:47 PM Ameisen: nuxil - i'll write you something up later that's nice and should perform automatic size reduction of the looped argument in order to reduce instruction count
03:47 PM Ameisen: I have to do some yardwork
03:51 PM polprog: antto: thanks :D
03:51 PM polprog: nuxil: android and avr-libc.. waaat?
03:52 PM nuxil: shh
03:52 PM nuxil: flah your avr with your phone :p
03:52 PM antto: Ameisen some people here are allergic to C++
03:52 PM polprog: lol
03:53 PM polprog: no never. Android is not suitable for C development
03:53 PM antto: and their reasons sux
03:53 PM polprog: antto: heh, neat track
03:53 PM polprog: im thinking about getting a microkorg
03:54 PM antto: mikrokork
03:54 PM polprog: microcork
03:54 PM polprog: microcore
03:55 PM polprog: microcode
03:55 PM polprog: ewwww
03:55 PM polprog: stallman intensifies
03:55 PM * antto sprinkles some proprietary BINARY BLOBs
03:55 PM polprog: also, how can my meter be "true RMS" if the firmware is closed source :^)
03:56 PM antto: polprog u proprietary swine!1oneone
03:57 PM polprog: https://i.imgur.com/fQUMvfU.jpg
03:58 PM polprog: also, antto check out those CG https://www.youtube.com/watch?v=eTv3_OgnEI8
03:58 PM polprog: it reminds me of pov ray
03:59 PM antto: dafuq is that?
03:59 PM antto: i didn't understand a word
03:59 PM polprog: just 90's music videos
04:00 PM polprog: you dont have
04:00 PM polprog: :P
04:00 PM polprog: to
04:02 PM antto: this is teh sh*t: https://www.youtube.com/watch?v=HAhfSkn9ttE
04:03 PM polprog: members of mayday <3
04:03 PM polprog: actually soundtropolis is one of the ones i dont like that much, its nice tho
04:03 PM polprog: ah no
04:03 PM polprog: its Datapop
04:05 PM polprog: https://puu.sh/Au56A/cfbaf7e5f2.jpg
04:05 PM polprog: heh this one is actually neat
05:07 PM nuxil: After googeling a bit there seems to be no efficient algorithm to convert a binary number in floating point format to a decimal number in string format.
05:07 PM nuxil: found some nice reading tho ;o http://kurtstephens.com/files/p372-steele.pdf
05:27 PM Emil: nuxil: wtf
05:27 PM Emil: nuxil: >binary number in float
05:27 PM Emil: you mean
05:28 PM Emil: 0.1001101
05:28 PM Emil: as a single byte?
05:28 PM Emil: nuxil: pls stop
05:28 PM nuxil: no. i meant excatly what i said.
05:28 PM Emil: nuxil: what you said is interpretable in multiple ways
05:29 PM Emil: what exactly do you meaN
05:29 PM Emil: what do you mean you have a float that is representing some binary number?
05:30 PM Emil: or do you mean you have a float and you want to convert that to a decimal string?
05:30 PM nuxil: i mean that there is no effective algorithm to convert a float to a string. esp if the float is of iee754 .. the convesion like dtostrf etc takes up alot of space.
05:30 PM Emil: bruh
05:30 PM Emil: just fucking say "I'm having issues with printing floats"
05:31 PM Emil: jeez
05:31 PM Emil: :D
05:31 PM nuxil: jeez scroll up.. where you been the last hours :p
05:31 PM Emil: watching animu
05:31 PM Emil: duh
05:31 PM nuxil: <nuxil> what can i use to convert a float number into a string. when i use "dtostrf" it increases the progam with 2064 Bytes. jumping from 2222 til 4286.
05:31 PM nuxil: <nuxil> is there a better solution that dosent eat up as much space as dtostrf ?
05:32 PM Emil: of course there is
05:32 PM Emil: a) you need to define limits to your accuracy
05:32 PM nuxil: y u no tell me then :p
05:33 PM Emil: b) just unroll it yourself
05:33 PM Emil: well
05:33 PM Emil: actually
05:33 PM Emil: you don't need to limit accuracy if you just push numbers out as you generate them
05:37 PM nuxil: Emil, ther is lots of ways to convert dtostrf ftoa snprintf etc, and none of these methods is really optimized for small mcu's like avr's imo.
05:38 PM Emil: nuxil: there is no optimisations you can do
05:39 PM cehteh: huh?
05:39 PM nuxil: surly this can be optimized https://github.com/vancegroup-mirrors/avr-libc/blob/master/avr-libc/libc/stdlib/dtoa_prf.c :p
05:39 PM nuxil: thats whats dtostrf is calling
05:39 PM Emil: nuxil: since we are in 8 bit land and minimum addressable unit is 8 bits and we are single cycle pipelined
05:40 PM Emil: nuxil: ah that kind of optimisation
05:40 PM cehteh: i have some stateful/restartable conversions, not for floats but for integer/strings
05:40 PM cehteh: when memory is tight that helps a lot
05:41 PM Emil: cehteh: just use that function alone then
05:41 PM Emil: nuxil: *
05:41 PM cehteh: printing a 32bit integer to uart in decimal with only a 4 byte queue for example
05:41 PM cehteh: Emil: i somewhat planned to use thoe for a printf/scanf api, but didnt do that yet
05:42 PM Emil: you can optimise for cycles or memory or programspace
05:42 PM Emil: usually
05:42 PM cehteh: yesm but the ratio of these might be different :)
05:43 PM cehteh: ideally fast w/o extra memory and least possible code :D
05:45 PM antto: "4 byte queue" ?
05:49 PM cehteh: uart interrupt driven, with a queue holding only 4 bytes but still implementing nonblocking i/o
05:50 PM antto: 4 is too weak
05:51 PM cehteh: why?
05:51 PM cehteh: works for me
05:51 PM antto: i print moar stuff usually
05:51 PM cehteh: thats what i meant
05:52 PM cehteh: i do too still works
05:53 PM jossypoo: hey guys
05:53 PM jossypoo: i have a question
05:53 PM nuxil: we are not mind readers
05:53 PM jossypoo: as far as the self-programmable stuff goes on the attiny85, it looks pretty straightforward on the datasheet but i'm having some issues
05:53 PM cehteh: aka "restartable" prints print("foobar") will send "foob" to the queue and somehow magically notice that it has to continue at "ar"
05:53 PM jossypoo: you are apparently impatiant
05:54 PM jossypoo: first question; i started with the gcc-avr boot.h wrapper. it's not working, and i'm not sure why
05:55 PM antto: cehteh i'm not sure what your magic is, mine would stuff everything to the FIFO, and the FIFO will start blocking when there's no room left
05:55 PM jossypoo: are there constraints to where executable code can be written to and claled?
05:55 PM nuxil: try ask Jartza, hes the atiny854 expert.. not sure if hes around tho.
05:55 PM nuxil: *85
05:55 PM jossypoo: ok.. thanks
05:55 PM jossypoo: i took a look at a few bootloaders but i don't really want to write a bootloader; i just want to replace a few pages
05:56 PM antto: what does your datasheet says?
05:56 PM antto: does this attiny happen to be one of the new ones?
05:56 PM antto: with UPDI
05:57 PM jossypoo: if you're talkin gto me i'm not sure
05:57 PM jossypoo: it's an attiny85
05:57 PM antto: how come?
05:57 PM nuxil: does this help ? https://www.avrfreaks.net/sites/default/files/bootloader_faq.pdf
05:57 PM antto: how do you program it? TPI, ISP, or UPDI?
05:57 PM jossypoo: i'm using ISP
05:57 PM antto: so it's from the old ones
05:58 PM jossypoo: *shrug*
05:58 PM jossypoo: didn't know that correlated to a revision
05:58 PM antto: cuz i'd think that boot.h won't work on the new ones
05:58 PM antto: just like it doesn't work on xmegas
05:59 PM jossypoo: is that because the library is bugged or the datasheet is no longer valid?
06:00 PM antto: no, it's because xmega is different than atmega
06:00 PM jossypoo: just to be clear, isn't the attiny85 always ISP?
06:00 PM antto: and the stuff in boot.h is mostly for the older chips (atmegas and such)
06:00 PM antto: no idea what it is, you have the datasheet
06:01 PM jossypoo: ah okay, i'm definitely using ISP
06:01 PM jossypoo: i thought you meant that attiny85 had multiple revisions under the same name
06:01 PM antto: no
06:01 PM antto: there are a pile of attiny chips, i don't recognize them by their numbers at all
06:02 PM antto: but the most recent ones are "fancy" and they have more in common with xmega than with atmegas
06:02 PM antto: those can be recognized (i think) by the UPDI programming interface
06:02 PM antto: while the "older ones" are either TPI or ISP
06:04 PM antto: so then, you should have a bootloader section, and fuse bits to set the starting address to the boot section
06:04 PM jossypoo: do i have to self-program from the bootloader section?
06:05 PM antto: and from the bootloader, you should generally only write to the "firmware" flash section
06:05 PM antto: you don't want the bootloader to be overwriting itself, right?
06:06 PM jossypoo: i had other means to ensure it wasn't overwriting itself
06:06 PM antto: so what's not working?
06:07 PM jossypoo: anything, even if i just pick a random address and write some machine code to it, then try to execute it, it doesn't execute correctly
06:07 PM antto: hm?
06:07 PM antto: wait, what are you trying to do?
06:07 PM jossypoo: i'm not specifically writing a bootloader in the typical sense
06:08 PM jossypoo: i'm just tying to be able to flash a specific region of flash memory with machine code and run it, just one function that can be overwritten through serial
06:08 PM antto: one function?
06:08 PM antto: o_O
06:09 PM jossypoo: the purpose of my attiny is a man in the middle for something larger, i want to be able to change the logic separate from the busywork of being a man in the middle
06:09 PM antto: what is that function doing?
06:09 PM jossypoo: it just takes in state and reads it and modifies it if it chooses to
06:10 PM antto: and do you actually have a "firmware" or you just run that bootloader all the time?
06:10 PM jossypoo: i guess i run that "bootloader" all the time
06:10 PM jossypoo: the "bootloader" facilities that man in the middle part
06:10 PM jossypoo: and then i want to flash one function
06:10 PM jossypoo: the reason i want to do this is because my serial protocol is really slow, i only want to flash what i need to
06:11 PM antto: o_O
06:11 PM jossypoo: third-party USB device
06:11 PM antto: slow?
06:11 PM antto: my nose tells me there's probably a better way to combat this than what you're doing now
06:11 PM jossypoo: not without like, a lot of effort
06:11 PM jossypoo: ok
06:11 PM jossypoo: full story
06:12 PM jossypoo: proprietary game controller
06:12 PM jossypoo: proprietary USB adapter for game controller
06:12 PM jossypoo: man in the middle chip
06:12 PM jossypoo: USB adapter only has one output to controller; rumble
06:12 PM jossypoo: i have a driver on the PC
06:12 PM jossypoo: i want to be able to flash the man in the middle chip
06:12 PM jossypoo: i use the rumble bit for that
06:12 PM jossypoo: i don't want to take apart the controller every time i flash it (internal man in the middle)
06:12 PM jossypoo: that's the gist of it
06:13 PM jossypoo: so basically i have 1 bit every 30 milliseconds
06:13 PM jossypoo: to communicate with the device
06:14 PM antto: okay, you lost me
06:15 PM antto: but in any case, if you want to run code from one section (boot or firmware), and execute functions that are located in the other section - things can get tricky
06:15 PM antto: i think there were some pages covering that on the avrlibc documentation
06:16 PM antto: also, i'm not sure whether using interrupts makes things even worse
06:17 PM jossypoo: alright, i'll just keep fucking with it
06:17 PM jossypoo: is there any way to dump the entire flash chip with avrdude?
06:18 PM antto: sure
06:18 PM jossypoo: oh nice, that should help me debug where my stuff is actually being written
06:18 PM antto: it's an old attiny, the boot section is basically part of the flash
06:19 PM antto: i mean the firmware and boot sections are part of the same "flash"
06:19 PM antto: (that's not the case on xmega)
06:19 PM antto: so, get the contents of the flash and see "what you've done"
06:20 PM jossypoo: would you know if there's any address translation in terms of jumping the PC to my written region?
06:20 PM jossypoo: like if i write to some address with the boot.h wrapper, do i jump there with the same offset?
06:20 PM jossypoo: or is it translated?
06:21 PM antto: no idea
06:21 PM jossypoo: alrgiht
06:21 PM jossypoo: thanks man you've helped a lot
06:21 PM antto: i only jump to address 0, which is the start of the "firmware" section
06:21 PM jossypoo: yeah that's what most of the bootloaders are doing
06:22 PM jossypoo: maybe i should just rearchitect
06:22 PM antto: but why are you jumping?
06:22 PM antto: shouldn't you be "calling a function" ?
06:22 PM antto: doesn't that function do something and return?
06:22 PM jossypoo: i call it with inline assembly
06:22 PM jossypoo: it doesn't return, it just gets passed a pointer
06:22 PM jossypoo: which it modifies
06:23 PM antto: so it's like main() then?
06:23 PM jossypoo: well i mean it returns, but nothing meaningful. lol
06:23 PM jossypoo: at this point i think dumping flash will help, i've spent a lot of time debugging this already but that's surely the missing link
06:23 PM antto: my point is, if this function returns, then you better make sure you don't mess up the return mechanisms, because it'd have to return to your bootloader, or else who knows what happens
06:24 PM jossypoo: the return mechanisms? you mean like the stack and register state?
06:25 PM antto: you might have to fiddle with gcc __attribute__ stuff, there's stuff like "naked" and such
06:25 PM antto: yes, that
06:25 PM jossypoo: they should be fine, i've disassembled the same function (i just stuck it in normally) and they were identical
06:26 PM antto: also, make sure you are calling the function from the "right" address, ensure the function is really there where you think it is
06:26 PM jossypoo: that's exactly what i was gonna do
06:26 PM jossypoo: i'm pretty sure that's my issue
06:27 PM jossypoo: thanks man, gonna go give it a shot now
06:27 PM jossypoo: later bro
06:27 PM antto: you can make a .map which iirc shows where your function is located in the .elf
06:27 PM jossypoo: you mean with gcc-avr or avrdude?
06:27 PM jossypoo: i am somewhat confused about what avrdude is doing once i give it what to flash
06:27 PM antto: -Wl,<somethingsomething>.map
06:28 PM jossypoo: is there any semantic difference between the different regions of flash?
06:28 PM jossypoo: or does it just all have the same privlieges, etc
06:28 PM antto: it's a gcc argument passed from gcc to the linker, the linker generates the .map file
06:29 PM antto: difference to whom?
06:29 PM antto: to avrdude?
06:29 PM jossypoo: to the microcontroller itself
06:29 PM antto: -Wl-Map=<filename>,--cref
06:29 PM antto: ^ that's the argument
06:30 PM antto: well, for one, if you want interrupts in the bootloader to work, you need to do some extra stuff
06:30 PM jossypoo: welp
06:30 PM antto: and then you have to "undo" it before jumping to the firmware (or interrupts won't work there)
06:30 PM jossypoo: alright, i'll worry about that later.. i've got my problem trimmed down at this point
06:31 PM antto: avr-nm can generate useful stuff too
06:31 PM antto: from your .elf
06:31 PM antto: like, show the sizes of things and also their locations, i think
06:32 PM jossypoo: yeah i've been using avr-nm and avr-objdump to scout things out
06:32 PM jossypoo: anyway, thanks man, you've been super helpful and patient with my odd use case
06:32 PM jossypoo: thanks again
06:33 PM antto: while the above -Wl command goes to avr-gcc at the final (linking) step
06:40 PM antto: was that the same guy who was asking if someone had a specific PC mouse so he cold sniff the usb protocol for him?
08:03 PM rue_shop4: what IS gcc tho, 99% of its tasks are subbed out to other programs
08:03 PM rue_shop4: gpp gas, etc