#avr Logs

Mar 16 2018

#avr Calendar

12:19 AM day__ is now known as day
12:50 AM polprog: morning
01:30 AM nohitzzz: morning
01:57 AM rue_bed: no I have 5 more minutes till its morning
01:57 AM rue_bed: and I need to be asleep
03:02 AM gnom: https://i.imgur.com/ljK2pz9.gif
03:06 AM Haohmaru: counting the seconds before the buird becomes cat dinner
03:06 AM Haohmaru: * bird
03:15 AM polprog: hehe. thats a big bird :o
04:45 AM day__ is now known as day
04:49 AM jsoft: I am using a 328p and its 3.3v @ 8mhz. I am using the example code here: https://appelsiini.net/2011/simple-usart-with-avr-libc/ to set up usart, but its half the speed. I am trying for 115200 but its 57600. Any ideas?
04:50 AM LeoNerd: U2X bit?
04:51 AM jsoft: UCSR0A |= _BV(U2X0); ?
04:55 AM _ami_: no, this bit should be set to 0 if you are doing sync operation.
04:56 AM _ami_: jsoft, show us the full code. pastebin?
04:58 AM Emil: no one uses sync usart
04:58 AM polprog: UCSR0A &= ~(1<<U2X0);
04:58 AM polprog: and what Emil said :D
04:58 AM Haohmaru: Emil >:(
04:58 AM polprog: not even a sun bootloader
04:58 AM Haohmaru: I DO!
04:58 AM Emil: emil.fi/d/streamer.c
04:59 AM * Haohmaru shakes Emil violently untill his eyes desynchronize
04:59 AM _ami_: jsoft, did you modify F_CPU defined in Makefile to 8e6?
05:00 AM jsoft: Argh
05:00 AM jsoft: I don't think a 328 can do 115200 @ 8Mhz
05:00 AM jsoft: _ami_, and yes, 8mhz F_CPU.
05:01 AM _ami_: it can.. its just that error rate would be high.
05:02 AM _ami_: jsoft, check this chart: http://wormfood.net/avrbaudcalc.php
05:02 AM Haohmaru: with synchronous usart - bitrate exactness is no issue
05:05 AM nohitzzz: i should get my m7 nucleo on monday
05:08 AM polprog: i should go back to microcontrollers
05:08 AM polprog: do some m4 assembly
05:11 AM Haohmaru: i'll go back to carving stones >:(
05:11 AM Emil: polprog: m4?
05:11 AM polprog: m3*
05:11 AM Emil: bluepill?
05:11 AM polprog: yeah
05:11 AM Emil: You're doing bluepill asm?
05:11 AM Emil: Cool
05:11 AM polprog: "doing"
05:12 AM polprog: so far ive read the programming manual
05:12 AM polprog: i like the conditional instructions.
05:12 AM polprog: IT/ITT/ITTT
05:18 AM _ami_: polprog, why ASM?
05:18 AM _ami_: why not C?
05:18 AM _ami_: that thing has plenty of flash/RAM?
05:18 AM Haohmaru: people with lots of spare time who like things to be harder than usual ;P~
05:19 AM jsoft: Yeah asm is a pain in the ass for big stuff
05:19 AM jsoft: Or even small stuff
05:19 AM jsoft: Why bother
05:20 AM jsoft: Also, brain fart team
05:20 AM jsoft: USART was not working because I was not calling the function which actually sets up usart registers... duuuuuuuh
05:21 AM _ami_: and most important thing.. life is SHORT.
05:22 AM Haohmaru: it's so short it fits in a uint8_t
05:22 AM * Haohmaru slaps polprog with reality
05:25 AM polprog: _ami_: im not gonna write everything in asm
05:25 AM polprog: obviously
05:26 AM polprog: just small snippets
05:26 AM Haohmaru: you'll write just one thing, and for that you'll have to read teh whole manual ;P~
05:26 AM Haohmaru: and then read it again when that small thing doesn't quite do what you intended ;P~
05:26 AM polprog: lel
05:32 AM Emil: But then polprog has acquired such valuable knowledge and skills that he can move onto upper management
05:35 AM polprog: the case is
05:36 AM polprog: someone has to do it
05:36 AM polprog: :D
05:37 AM polprog: apropos uk running its nuclear powerplants on pdp computers till 2030.
05:37 AM polprog: and it may turn out all the people who know them are retired or dead :p
05:38 AM polprog: im not gonna mess with a pdp tho
05:50 AM FrozenDroid: Hi, what can cause PINx to return the correct value once, and then after that one time it will just return 0x00?
05:52 AM Emil: FrozenDroid: hm?
05:52 AM Emil: FrozenDroid: what do you have conencted to that pin
05:52 AM FrozenDroid: Emil 4.1 volts
05:53 AM FrozenDroid: even if I use those pins as ADC and read the value, it reads that correctly
05:53 AM FrozenDroid: but using the ADC for something digital would be a bit ridiculous no?
05:53 AM Emil: eh?
05:53 AM FrozenDroid: https://gist.github.com/FrozenDroid/6c2f4d9e504bf3787188f64a2101b7b6
05:54 AM Emil: FrozenDroid: what mcu are you using?
05:54 AM FrozenDroid: Emil atmega2560
05:55 AM skz81: jsoft, mine is 115200 : https://github.com/SKZ81/kicad-openPowerSwitch/blob/20170222_blog/avr_uart.c
05:55 AM skz81: hu, sorry, it's 16MHz, that's why
05:55 AM skz81: (i guess)
05:55 AM Emil: FrozenDroid: Do a minimal example of just reading the pin and pushing the value out of uart
05:56 AM -!- #avr mode set to -o by Tom_L
05:57 AM FrozenDroid: Emil that's already what I'm doing pretty much
05:59 AM Emil: are you sure you are on the correct pin?
05:59 AM FrozenDroid: Yes because reading the ADC value shows the correct value
06:01 AM FrozenDroid: I'm reading ADC0 and ADC11 and it seems fine
06:02 AM FrozenDroid: 1005 and 1009 respectively
06:02 AM FrozenDroid: which should be considered logic high no?
06:03 AM Emil: yes
06:03 AM Emil: if we are on 10 bit
06:04 AM FrozenDroid: mhm, we are
06:06 AM FrozenDroid: at this rate I might just read the adc instead... stupid but it works :/
06:07 AM _ami_: polprog, ok. good to know. it was good opportunity for me to troll you. :)
06:07 AM * _ami_ tries not to miss a chance. ;)
06:07 AM skz81: FrozenDroid, can you provide the myLog_P source code ? What you posted so far reads definitly good to me, i guess the problem is elsewhere
06:07 AM FrozenDroid: skz81 the myLog_P function is fine, it works everywhere
06:09 AM FrozenDroid: and not logging it but instead using ifs shows the same result
06:09 AM * polprog smacks _ami_ with an assembler trout
06:09 AM skz81: FrozenDroid, I agree it would be surprizing the fault is in it, but, just being curious... Also TaskCheckKey() is probably the only RTOS task you launch, but reading main() would help to be sure...
06:10 AM _ami_: polprog, btw, do change the R10 resistor on blue pill. 0603 size.
06:10 AM _ami_: chnage it to 1.5k.
06:10 AM FrozenDroid: skz81 https://gist.github.com/FrozenDroid/a12efab54993b0f835138b2ce8923f9f
06:11 AM FrozenDroid: PRINT_STATS is false so that task doesn't run
06:11 AM polprog: _ami_: i know. need to get around to doing that
06:12 AM _ami_: polprog, also let me know if you find it interesting and have questions. happy to help you.
06:13 AM FrozenDroid: this is so weird honestly. It's the most simple thing ever and I can't understand what can go wronghere
06:13 AM polprog: _ami_: sure thing :) thanks <3
06:14 AM _ami_: ok, time to go home. enjoy weekend guys!
06:16 AM skz81: FrozenDroid, yup, really everything looks OK :( super simple...
06:16 AM FrozenDroid: weird..
06:17 AM FrozenDroid: maybe this is a bug in my freertos port somehow
06:17 AM FrozenDroid: I doubt it
06:18 AM skz81: FrozenDroid, maybe try to dump the DDRx and PORTx, maybe something messing with it ? If PORTx == 0x00, and DDRx messed, PINx would read 0x00 too
06:18 AM FrozenDroid: hmm
06:19 AM skz81: and/or plug wires on other port if you can (not definitly, just to yeild clues)
06:20 AM FrozenDroid: can't really, custom pcb
06:20 AM skz81: ok
06:21 AM FrozenDroid: skz81 https://gist.github.com/FrozenDroid/7b410b6da8c3b31af8e5908494904b8f
06:21 AM FrozenDroid: as you can see, the dump it shows the value correctly
06:21 AM FrozenDroid: the first*
06:22 AM Emil: FrozenDroid: do the simplest test case
06:22 AM FrozenDroid: meh let's take FreeRTOS out of the equation yeah
06:22 AM Emil: int main(void){printf("%d\n", PINx);}
06:22 AM Emil: int main(void){while(1){printf("%d\n", PINx);}}
06:23 AM FrozenDroid: yeah printf won't do but np I'll use a test LED
06:23 AM Emil: printf is a placeholder for whatever function you want to use
06:26 AM FrozenDroid: huh
06:26 AM FrozenDroid: that works
06:26 AM FrozenDroid: please don't tell me it's in FreeRTOS lol
06:28 AM skz81: and to be sure, just comment vTaskStartScheduler(); and replace by a while(1) {TaskCheckKey(NULL);}
06:28 AM FrozenDroid: hm
06:28 AM skz81: If it works, there's definitively something about the scheduler
06:29 AM skz81: Emil, nice shot BTW :)
06:29 AM FrozenDroid: I have the feeling it might be the idle task hook
06:29 AM skz81: Maybe also, it doesn't just 'NOP' ?
06:30 AM FrozenDroid: oooh okay I think it is the idle task
06:30 AM FrozenDroid: because as soon as I introduce a task delay it breaks
06:30 AM FrozenDroid: if I put my simple test case with the test led it works
06:30 AM FrozenDroid: but if I put a delay there it breaks
06:32 AM Emil: skz81: hm?
06:32 AM Emil: FrozenDroid: https://emil.fi/d/testcase.c
06:32 AM Emil: FrozenDroid: using Freetos on avr is stupid btw
06:33 AM Emil: skz81: what shot? :D
06:33 AM FrozenDroid: well I do need a RTOS
06:34 AM FrozenDroid: and if I had known about STM32 a year ago I would've used those
06:34 AM FrozenDroid: but that ship has sailed already
06:34 AM FrozenDroid: Emil I pinpointed the problem to vTaskDelay
06:34 AM FrozenDroid: and therefore probably idle hook
06:38 AM FrozenDroid: oh man
06:38 AM FrozenDroid: found it
06:39 AM Emil: skz81: mate pls
06:39 AM Emil: skz81: whatcha talking about
06:42 AM polprog: what would freertos actually give you on avr
06:42 AM polprog: i mean... it doesnt support running from ram, and flashing the program and the system look kinda pointless to me
06:43 AM polprog: unless its just a library
06:43 AM polprog: you can just use a library to do that and flash the program itself only
06:44 AM FrozenDroid: preemption
06:44 AM FrozenDroid: makes for much nicer code
06:44 AM Emil: skz81: nawwww
06:47 AM FrozenDroid: polprog what did you mean by that though?
06:48 AM polprog: im thinking of freertos like of an operating system
06:48 AM polprog: that can usually load program from storage and run it
06:48 AM FrozenDroid: oh
06:48 AM FrozenDroid: it's not neccesarily that imo
06:49 AM polprog: are you using it more like a "library"? meaning that you compile and flash it alongside, and then your code uses its functions/isrs etc
06:49 AM Haohmaru: i know! run registry_booster.exe on it!
06:49 AM Haohmaru: it's 100% not a virus!
06:49 AM FrozenDroid: yeah, library
06:49 AM polprog: bonzibuddy.exe
06:49 AM FrozenDroid: I only really use it for the fact it can do preemption for me
06:50 AM polprog: nice
06:50 AM Haohmaru: naked_girl.jpg.exe
06:50 AM FrozenDroid: so I can write nice code instead of having huge state machines that are hard to maintain
06:50 AM polprog: i dont know what are you doing so im not sure if its an overkill, but have fun ;)
06:50 AM polprog: good point
06:50 AM FrozenDroid: it's not a good choice everywhere but I think it's okay for what I use it for
06:51 AM FrozenDroid: still, using an rtos on an avr is probably stupid but the hardware can't be changed at this stage
06:52 AM Haohmaru: what if you run out of RAM ;P~
06:52 AM Haohmaru: are you using "big enough" avr?
06:52 AM FrozenDroid: yeah I don't have tons of RAM but it's enough
06:52 AM FrozenDroid: atmega2560 so 8K ram
06:53 AM FrozenDroid: I just make sure to put all the strings I can in program space :D
06:53 AM Haohmaru: avoid strings ;P~
06:54 AM Haohmaru: humans should learn to read binary!
06:56 AM skz81: <Emil> skz81: what shot? :D >> idea of not using the scheduler in the first place
06:56 AM skz81: Sorry I was cooking
06:57 AM Haohmaru: what'cha cookin', doc?
06:57 AM skz81: (oops I almost wrote 'cocking' :P)
06:57 AM Haohmaru: (you just did)
06:59 AM Emil: skz81: wat
07:00 AM Haohmaru: ah, a conversation between two very distracted people..
07:00 AM * Haohmaru grabs the popc0rn
07:00 AM * skz81 is eating anyway
07:02 AM * polprog is hungry
07:04 AM * Haohmaru already ate
07:22 AM day__ is now known as day
07:45 AM FrozenDroid: and now my task is not waiting on the semaphore
07:45 AM FrozenDroid: what the hell?
07:52 AM Emil_: hmm I should unignore /me messages
07:54 AM * Emil_ test
07:54 AM Haohmaru: * fail on every possible level
07:55 AM * Emil_ test2
07:55 AM Emil: Alrighty, seems to work
07:55 AM Emil: Unignored ACTIONS
07:56 AM Haohmaru: congratulations, u r now fully equipped to IRC like teh pros
08:21 AM polprog: wait what kinda sociopath blocks ACTIONs
08:21 AM polprog: lol
08:21 AM polprog: :D
08:25 AM Emil: a sociopath would like to know everything
08:25 AM Emil: it just got on my "block all crap command I have
08:37 AM polprog: i have parts and joins blocked on activity bar
08:37 AM polprog: ignored*
08:53 AM rue_: yea, I ignore join part and nickchange
08:53 AM rue_: makes things readable
08:54 AM skz81: nickchange can sometimes useful to be aware of, to avoid "Who the Hell is this guy" moments :p
08:58 AM skz81: total off-topic : I'm realizing, "challenging" has no (sastifying) one-word translation into french... :(
09:03 AM day__ is now known as day
09:12 AM polprog: its snowing again
09:12 AM polprog: https://puu.sh/zIRXD/45fa8c966f.jpg
09:14 AM Casper: polprog: not yet here, but -5°C :(
09:14 AM rue_: pff
09:14 AM rue_: thats not snow
09:14 AM rue_: snow is 20cm on the ground and it comming down so hard you cant see 12m
09:16 AM day__ is now known as day
09:21 AM Casper: rue_: yes I agree with you for once!
09:27 AM Haohmaru: what kinda sociopath filters anything from irc
09:27 AM Haohmaru: ;P~
09:28 AM rue_: one thats been on irc for 16 years now
09:29 AM rue_: maybe 18
09:29 AM rue_: hmm
09:29 AM Haohmaru: i'm on irc since 18 years
09:30 AM Haohmaru: never filter anything, never /ignore
09:30 AM rue_: I tried 24 yeras ago, but nobody told me what server/channel they were on
09:30 AM Haohmaru: sh*t i'm old ;P~
09:32 AM polprog: shit im 18
09:32 AM cehteh: lol
09:34 AM Haohmaru: joins/quits/etc can be made a different color than actual chat messages.. you know, like syntax highlight in code
09:34 AM polprog: i should go back to ignoring joins/quits
09:34 AM Haohmaru: do you hide comment lines? ;P~
09:35 AM polprog: right now i have them in a different color so they stand out (joins green, parts/quits red) and messages and actions white
09:36 AM Haohmaru: mine are with cold, dark-ish colors (blue, dark cyan, dark gray)
09:36 AM polprog: with nickcolor.pl my irssi looks like a rainbow puke
09:36 AM Haohmaru: while actual chat is with electro-green color
09:36 AM rue_: it dosnt' matter if all that happens in a day are join and parts
09:36 AM polprog: i think i have an old screenshot somewhere
09:37 AM polprog: yeah
09:37 AM rue_: and the rest of us have ignored them and pick on a conversation 2 days old and finish it
09:37 AM rue_: cause, in irc, time dosn't really exist
09:37 AM polprog: rue_: those are the best channels.
09:37 AM Haohmaru: you know you could also scroll up
09:38 AM polprog: not the one where you have 10 messages per minute
09:38 AM polprog: :P
09:38 AM polprog: http://puu.sh/zjmDL/046d6bfe2e.jpg
09:38 AM rue_: Haohmaru, your underestimating the number of joins and parts we see
09:38 AM polprog: literally "nick hilight"
09:38 AM rue_: that rotating door goes continious
09:39 AM Haohmaru: rue_ dude, YOU're ignoring the joins/parts, don't tell ME how many they are ;P~
09:39 AM rue_: every time I install a new machine I need to turn them all off again
09:39 AM rue_: all I see are join/parts
09:39 AM Haohmaru: oh noes! teh h0rr0r!
09:39 AM rue_: cant tell whats actually going on
09:40 AM rue_: just laugh when I start answering someone who left 2 mins after they asked a question
09:40 AM polprog: true
09:40 AM rue_: so I just ignore newb questions
09:40 AM Haohmaru: i don't have a screenshot here, but my code syntax highlight theme is similar-ish: https://i.imgur.com/AkGsfPH.png
09:41 AM polprog: hmm codeblocks
09:42 AM rue_: hmm, expand and collapse conversation threads?
09:44 AM polprog: no, thats 4 chan not irc
09:45 AM Haohmaru: there are no "threads" on irc, wtf are you smoking ;P~
09:46 AM Haohmaru: rue_ weren't you a noob once?
09:46 AM Haohmaru: if your teachers were like you now.. ;P~
09:46 AM Haohmaru: or parents
09:47 AM Haohmaru: "mom, mom, why is the sky blue?" "huh, noob.."
09:47 AM Haohmaru: "mom? u there? :~("
09:47 AM polprog: everyone was born nooob
09:48 AM Haohmaru: * mom has quit irc (ping timeout 256 seconds)
09:49 AM polprog: push %eax mov %eax, %ebx ;; Go ahead but always remember where you came from
09:49 AM polprog: :p
09:49 AM Haohmaru: wut is this? some kind of asm joke?
09:49 AM polprog: weird words and symbols
09:49 AM polprog: so asm or perl
09:49 AM polprog: never did perl - so that must be assembly
09:50 AM rue_: here: goto there ; loup again
09:50 AM polprog: put that there
09:51 AM rue_: cause, loop is an instruction.
09:51 AM Haohmaru: can't touch *this; TAA_NA_NA_NA
09:51 AM polprog: chmod -w this
09:51 AM rue_: hey I got an AD9833 DSS chip, anyone done any code for one of those?
09:52 AM Haohmaru: no
09:52 AM Haohmaru: now throw it away ;P~
09:53 AM rue_: I was more excited before I knew its 12.5Mhz output was only two samples repeated
09:53 AM rue_: it should be able to generate audio tones nicely
09:54 AM polprog: at 6 mhz you could generate long wave radio
09:54 AM rue_: I need to turn myself into a robot, what avr can I use to emulate my brain functions?
09:54 AM Haohmaru: pic10C
09:54 AM * Haohmaru runs
09:54 AM rue_: haha
09:55 AM Ameisen: _still_ trying to build this danged toolchain
09:55 AM Ameisen: keep running into an odd error. Sometimes it goes away randomlyl
09:55 AM polprog: loop: call eat call sleep call rave rjmp loop
09:55 AM Ameisen: I will get a 'killed' signal on make
09:55 AM Ameisen: no errors
09:55 AM Ameisen: if I run that make command myself, it runs fine
09:55 AM rue_: I was all excited cause I got a remote that looked like it used a blobtop avr, after a lot of digging it does not seemt o be an avr
09:55 AM Ameisen: [09:39:38] <Haohmaru> i don't have a screenshot here, but my code syntax highlight theme is similar-ish: https://i.imgur.com/AkGsfPH.png
09:55 AM rue_: I actually think its a 8051
09:55 AM Ameisen: Mine is in VC++
09:55 AM Ameisen: so... I get syntax highlighting.
09:56 AM rue_: 6 pin programming header, but not atmel
09:56 AM Ameisen: intellisense too
09:56 AM Ameisen: which works like 95% with AVR and ARM
09:56 AM Ameisen: though gets confused by type sizes
09:56 AM rue_: if you dont use stdint, there are no type sizes
09:56 AM Haohmaru: does it run on linux? ;P~
09:57 AM Ameisen: rue_ - pretty sure sizeof(int) still has meaning.
09:57 AM rue_: yes, but the int dont' have a fixed size
09:57 AM Ameisen: on AVR?
09:57 AM Ameisen: int is always 16-bit.
09:57 AM Ameisen: it's part of the AVR ISA
09:57 AM Ameisen: err
09:57 AM Ameisen: ABI
09:57 AM rue_: I was shocked a few years ago to find out that char on my system is 16 bits
09:57 AM Ameisen: rather
09:57 AM Haohmaru: how about avr32?
09:57 AM rue_: its like ARG
09:57 AM Ameisen: nobody talks about avr32.
09:57 AM Haohmaru: it's still avr
09:58 AM rue_: int is 32 on some systems
09:58 AM Ameisen: Yes... but that isn't really applicable to my point
09:58 AM Ameisen: which was that VC++ Intellisense gets confused by the type sizes on AVR.
09:58 AM rue_: Ameisen, thats cause after 8 bit avrs you go to arm processors
09:58 AM rue_: standard arch
09:58 AM Ameisen: :|
09:58 AM Ameisen: it expects int to be 32-bit, and pointers to be 32-bit
09:58 AM Haohmaru: Ameisen isn't VC++ made for coding windows programs? ;P~
09:59 AM Ameisen: gets really confused by 16-bit/24-bit pointers
09:59 AM Ameisen: VC++ can also do EFI
09:59 AM Ameisen: and thus is also designed to do kernel-level work
09:59 AM Haohmaru: efi?
09:59 AM skz81: <polprog> http://puu.sh/zjmDL/046d6bfe2e.jpg >> shit, even you're window manager seems older than you :)
09:59 AM Ameisen: https://en.wikipedia.org/wiki/Unified_Extensible_Firmware_Interface
09:59 AM Ameisen: I've written x86 bootloaders and kernels using VC++. it's a little odd, but works
09:59 AM Ameisen: obviously, I can't use VC++'s _compiler_ for AVR, though
10:00 AM Ameisen: can certainly use the IDE
10:00 AM rue_: modern software sucks, they managed to make it take 3x as much clicking to do the same stuff
10:00 AM Ameisen: just you can't reroute intellisense's compiler, so it can get confused sometimes
10:00 AM rue_: and whats with maximizing every app?
10:00 AM Ameisen: I have an entire toolchain built around using Visual C++ for embedded work
10:00 AM rue_: back in 93 we had mac programs that were all full screen everything, and you could only do 1 program at a time
10:01 AM rue_: were back to that?
10:01 AM Ameisen: it's to play nice with tablet folks
10:01 AM Ameisen: problem is, designers seem to have forgotten that desktops != tablets
10:01 AM rue_: yea, tablets are not PC's there is no one answer
10:01 AM Ameisen: The Microsoft designers at least seem to have figured that out
10:01 AM rue_: when is THAT gonna click in?
10:01 AM Ameisen: and removed most of the tablety stuff from Windows 10 on PC
10:01 AM Ameisen: which is what people hated in 8
10:02 AM Ameisen: Of course, 10 introduced its own annoyances
10:02 AM Ameisen: like the fact that there are basically 3 fucking control panel apps
10:02 AM rue_: like NSA manditory upgrades
10:02 AM Ameisen: and 3 different 'networking' control panels
10:02 AM Ameisen: that each do different annoying things
10:02 AM Ameisen: takes like 10 clicks to get to the old, traditional screen for altering adapter settings
10:02 AM Ameisen: it's not intuitive
10:03 AM Ameisen: which is annoying, because intuitive UI was one of the reasons Windows was successful, then MS shat all over it
10:03 AM rue_: I just want to sleep
10:03 AM Ameisen: they need to get rid of _all_ the metro designers and go back to the Windows 7 UI design
10:03 AM Ameisen: hopefully GCC 7.3 builds this time
10:04 AM Ameisen: I had an ARM toolchain I built including GCC 8 (trunk)
10:04 AM Ameisen: I was getting an ICE in the LTO compiler
10:04 AM Ameisen: so... gonna try it in 7.3.0, maybe it works there/
10:04 AM rue_: what kinda avr stuff are you making?
10:04 AM Ameisen: Right now I'm doing ARM
10:04 AM Ameisen: my AVR stuff is mainly my printer
10:04 AM rue_: ah
10:04 AM rue_: stm32?
10:04 AM rue_: ah
10:04 AM Ameisen: this is a teensy, so NXP
10:04 AM Ameisen: I have two STM boards that I'll get around to, though
10:05 AM rue_: I thought nxp got bought?
10:05 AM Ameisen: they did
10:05 AM Ameisen: not sure what else to call it.
10:05 AM Ameisen: it's an NXP Kinetis
10:05 AM Ameisen: K66
10:05 AM Ameisen: not particularly weak
10:05 AM Ameisen: the ST chips are faster, though
10:05 AM rue_: ok, I was sad, I was gonna use the hgih performance 8051 to run my 12' mecha servo loops
10:05 AM Ameisen: more to the point, the ST chips actually have higher level features like branch prediction
10:06 AM Ameisen: well
10:06 AM rue_: I wonder what the reliability of a atmega32 is like compared to an stm32
10:06 AM Ameisen: you could use an x86 processor, and if you really want RISC, run my MIPS emulator on it
10:06 AM Ameisen: though that seems silly.
10:06 AM Ameisen: how do you qualify 'reliability'?
10:06 AM rue_: lifespan
10:06 AM Ameisen: ARM is exceedingly popular. Good chance the chips have the issues worked out more than Atmel ones
10:06 AM rue_: the io controllers on a 12' mecha do not get upgraded every 2 years
10:07 AM * Haohmaru throws some spectre attacks on Ameisen's ST chips ;P~
10:07 AM Ameisen: the branch prediction mechanism is far simpler on ST-ARM than on x86
10:07 AM skz81: <Haohmaru> can't touch *this; TAA_NA_NA_NA >> I like C++, because you can allow freind to touch your private parts (did I really said that ?)
10:07 AM Ameisen: and ST-ARM is missing everything else like OOE (which is critical for things like that), register renaming, etc
10:07 AM skz81: friends*
10:08 AM Haohmaru: ;]
10:08 AM Ameisen: It would actually be interesting to see a chip with the raw features of, say, a Skylake-X x86-64, but with the ARM ISA
10:08 AM Ameisen: or RISC-V
10:08 AM Ameisen: curious how it would perfor
10:08 AM Ameisen: perform
10:09 AM rue_: I told my printer to do a print with 0.08mm layers, I'm gonna go see if its having a fit. then I'm going to work
10:09 AM rue_: bye
10:09 AM Ameisen: I just want this to build and work
10:09 AM Ameisen: I want libc and libc++ to be LTO, damn it
10:10 AM Haohmaru: lto?
10:11 AM Ameisen: https://en.wikipedia.org/wiki/Interprocedural_optimization
10:15 AM Haohmaru: does that mean like.. instead of linking to the libs, you build them (from source) together with your program so the whole thing can be optimized?
10:15 AM Ameisen: your compiler emits middle-end bitcode instead of machine code
10:15 AM Ameisen: the linker merges the bitcode into one compilation unit, finishes compilation, and then links
10:16 AM Haohmaru: okay, that's too complex to understand ;P~
10:16 AM Ameisen: thus optimizations can be performed over compilation unit boundaries
10:16 AM Haohmaru: compilers are dark magic ;P~
10:24 AM polprog: skz81: its just a theme for xfce :D
10:24 AM polprog: i kinda like FVWM as well though
10:24 AM polprog: Ameisen: any good reads about writing x86 bootloaders for efi?
10:25 AM polprog: blog pots, pdfs?
10:25 AM polprog: im curious
10:31 AM skz81: polprog, I beleived it was GEM : https://winworldpc.com/res/img/screenshots/f7f34a2e81fa90987bda0759e945908ff1cdb7f0f228535fdbeec47ae535110b.png ^^ BTW ; I have pot, but not for blog...
10:31 AM polprog: mmm
10:31 AM polprog: nice!
10:32 AM Haohmaru: good old bitmap fonts
10:33 AM polprog: terminus ftw
10:33 AM Haohmaru: "fixed 8" ftw
10:33 AM Haohmaru: and FixedSys \o/
10:35 AM Ameisen: off-hand, no
10:35 AM Ameisen: could read over the osdev wiki
10:52 AM Ameisen: if I get around to it, I will try rebuilding the AVR toolchain with LTO as well
10:53 AM Ameisen: never been keen on linking to runtime libraries that arne't LTO
11:43 AM skz81: runtime libs ? On AVR ??
11:43 AM polprog: its the year of the avr desktop
11:44 AM skz81: héhé... Anyway, see you guyz, time to drink... May be see you tommorow (with an headache... :p)
11:44 AM polprog: cya
12:00 PM Tom_itx is now known as Tom_L
12:53 PM Ameisen: err
12:53 PM Ameisen: what do you call libc?
12:53 PM Ameisen: it's the c runtime library
12:54 PM Ameisen: libm is the math runtime library
01:12 PM Tom_L: http://www.amelek.gda.pl/avr/libc/avr-libc-reference.html
02:13 PM Ameisen: Why are you linking that?
02:34 PM Tom_L: i felt the urge to do so
02:35 PM Ameisen: Since gcc+newlib is giving me a hard time with arm
02:35 PM Ameisen: I might try using clang instead
02:43 PM * nuxil has a hunch that Ameisen likes to over complicate things. :p
02:43 PM Ameisen: You don't want your libraries to be 70% their linked size and about 20% faster?
02:43 PM nuxil: dont we all :)
02:44 PM Ameisen: Why do you think I'm trying to get LTO functional?
02:47 PM nuxil: CFLAGS += -flto ?
02:47 PM Ameisen: That will enable LTO for your sources.
02:47 PM nuxil: i use that. and it removes about 200bytes of crap in my current project :)
02:47 PM Ameisen: Won't make the libraries you're linking in from elsewhere like libc and libm be LTO
02:47 PM Ameisen: since they weren't built for LTO support
02:48 PM Ameisen: ideally you have full IPO over everything.
02:48 PM nuxil: oh youre compilling the toolchaing
02:48 PM Ameisen: yes
02:49 PM nuxil: hf with that :D
02:55 PM nuxil: Ameisen, whats wrong with the "toolchain" comming with your distro? why must you compile it yourself ?
02:55 PM Ameisen: No LTO in the libraries.
02:55 PM Ameisen: I'm trying to get LTO libc/libc++
02:55 PM nuxil: ah.
02:55 PM nuxil: Ameisen> if I get around to it, I will try rebuilding the AVR toolchain with LTO as well
02:56 PM nuxil: just saw that
02:58 PM polprog: if you wont have to use any amphetamines during compilation i think ill give it a go as well
02:59 PM MrFahrenheit_ is now known as MrFahrenheit
03:00 PM Ameisen: I'm trying to get the ARM Embedded toolchain doing it
03:00 PM Ameisen: AVR should be waaaay simpler
03:00 PM Ameisen: big problem is that it uses newlib for libc
03:00 PM Ameisen: newlib has its own build system altogether which isn't LTO-aware
03:00 PM Ameisen: so I'm ending up with libraries that don't want to link
03:01 PM Ameisen: get weird errors I've literally never seen
03:01 PM polprog: if im thinking about it right you would have to make one huge library object right?
03:01 PM Ameisen: no
03:01 PM Ameisen: .a are just archive files, whcih contain object files (unless they're thin archives)
03:01 PM Ameisen: the object files contain LTO bitcode (and if they're fat, machine code as well)
03:01 PM Ameisen: you can have infinity billion of 'em
03:02 PM polprog: oh. but they wont be cross linked?
03:02 PM Ameisen: when you link it all togeher it will merge them into what is functionally one CU (in reality it chunks it up because that would sometimes take a LOT of memory)
03:02 PM Ameisen: they will be. But as libraries they can be whatever
03:02 PM polprog: oh ok
03:02 PM polprog: in theory it should work i guess
03:02 PM Ameisen: the only time they're truly linked is when you end up linking your program.
03:02 PM polprog: it really makes a lot of sense to me
03:03 PM Ameisen: I have a sneaking suspicion that newlib is trying to do a pre-link on it to shrink down the library
03:03 PM polprog: imma give it a try
03:03 PM Ameisen: which is going to cause issues like symbols disappearing
03:03 PM Ameisen: you need to compile/link with -flto and -fuse-linker-plugin
03:03 PM Ameisen: and ar/nm/ranlib need to be mapped as gcc-ar/gcc-nm/gcc-ranlib
03:05 PM polprog: no idea whats nm and ranlib
03:06 PM polprog: wanted to try and get codeblocks to work but no luck :D ill stick to my makefiles
03:08 PM Ameisen: I don't use makefiles
03:08 PM Ameisen: changing flags is very easy for my own projects
03:09 PM polprog: lol. enabling those options in my stepper project sheared off whole TWO bytes :D. and added 8 to data. lol
03:10 PM polprog: wait
03:10 PM polprog: other way around
03:10 PM polprog: 8 bytes of data freed
03:10 PM polprog: https://puu.sh/zJ4a1/6773c6b7b3.png
03:11 PM Casper: oh this is a song I hasn't hear in a long time!
03:11 PM Casper: Currently playing on Spotify: The Big Bopper - The Big Bopper's Greatest Hits - 1 - Chantilly Lace
03:11 PM Casper: :D
03:16 PM polprog: wow thats an interesting callgraph
03:16 PM polprog: https://puu.sh/zJ4vv/ab15f9fd6f.png
03:21 PM polprog: its pretty isnt it
03:55 PM Ameisen: polprog - try my options
03:55 PM Ameisen: also, LTO won't do anything if you only have one source file
03:55 PM Ameisen: your object file will be slightly larger since it will have an LTO section
03:55 PM Ameisen: but once you link it will end up basically the same.
03:56 PM Ameisen: LTO is there so you can have inter-CU optimization
03:56 PM Ameisen: https://github.com/ameisen/Tuna-i3-Plus/blob/master/Tuna/rbbuild/gcc_buildhandler.rb
03:56 PM Ameisen: that has roughly all the options that end up relevant
03:56 PM Ameisen: including linker options
04:01 PM Jartza: polprog:
04:01 PM Jartza: Program: 5736 bytes (70.0% Full)
04:01 PM Jartza: vs. LTO
04:01 PM Jartza: Program: 5464 bytes (66.7% Full)
04:02 PM polprog: yeah. i dont have much programs that are bigger than one file
04:02 PM polprog: just wanted to take a look
04:02 PM Jartza: that's tagsu firmware
04:03 PM Emil: polprog: what program is that?
04:03 PM polprog: Emil: my stepper driver
04:03 PM Emil: no I mean
04:03 PM polprog: ag
04:03 PM Emil: what program did you use for the call graph
04:03 PM polprog: radare2
04:03 PM Emil: ag is a search tool :D
04:03 PM Emil: radare2 alrighty
04:03 PM polprog: im trying to use it as a debugger
04:03 PM polprog: it has worse keybindings than Vi
04:03 PM polprog: but its awesome
04:04 PM Emil: Seems nice
04:04 PM polprog: yeah. it is
04:08 PM polprog: i have my terminal emulator stretched over two monitors jesus
04:08 PM Emil: polprog: it's spreading
04:08 PM Emil: similarly I just noticed that I need to buy moar space on my vps :D
04:09 PM polprog: lol
04:09 PM polprog: i need one of those 21:9 monitors
04:10 PM polprog: mount it vertically so a whole function can fit at once
04:10 PM Emil: It's not my fault that the fucking data on Finland from strava heatmap is 25GB :D
04:10 PM Emil: nice
04:10 PM polprog: im afraid id have to stand or crouch depending on where the PC is
04:10 PM polprog: or %rip as its called in AT&T syntax :D
04:11 PM Emil: :D
04:11 PM Emil: Hmm, I should go shopping tomorrow or on Sunday
04:11 PM Emil: new work starts on Monday
04:12 PM Emil: Junior Slave in Test and Engineering (lol super basic entry level job but with a chance of working on IOT development)
04:12 PM Emil: The place seems nice though :)
04:13 PM Tom_L: first official job?
04:13 PM polprog: nice
04:13 PM polprog: hope the people are ok
04:14 PM Tom_L: yeah that can make or break a job
04:17 PM polprog: damn... cant get radare to display floating point registers
04:17 PM polprog: in theory it supports gdb protocol
04:18 PM polprog: so i could use that with openocd to step programs on AVR/STM32
04:35 PM Emil: Tom_L: well, first one that's for a "real company"
04:36 PM Emil: mostly because I couldn't have been bothered with actually finding work and working for the school has been cool :D
04:36 PM Emil: The pay is shit but the place and work awesome
04:36 PM Emil: but now I need some money so :D
04:39 PM polprog: hehe. used radare to replace piece of my program (x86 C++ with some inline asm) with nops
04:39 PM polprog: :D
04:39 PM polprog: it works
04:49 PM Ameisen: ok
04:49 PM Ameisen: figured out this build failure
04:50 PM Ameisen: newlib 3.0.0, the actual stamped and shipped tar.gz of source, has a typo in it.
04:50 PM Ameisen: :|
04:50 PM polprog: what?
04:50 PM Ameisen: has a )) instead of a ) on a line
04:50 PM Ameisen: which was killing the compile
04:50 PM Ameisen: not entirely sure how they OKed that.
04:50 PM polprog: rofl
04:51 PM * polprog is literally chuckling loud
04:51 PM Ameisen: Jartza - if libc/et LTO-built as well, your side would be even smaller.
04:51 PM Ameisen: size*
05:01 PM Jartza: Ameisen: sure. I actually haven't ever checked if it is
05:02 PM Ameisen: It almost certainly is not
05:02 PM Ameisen: I have never seen runtime libs be built with LTO for some reason
05:03 PM Emil: Makes debugging "impossible"
05:03 PM Ameisen: Usually, you don't turn on optimizations for debugging.
05:09 PM Jartza: yea, prolly it's not. need to compile it myself :)
05:18 PM polprog: cya tomorrow
09:06 PM jsoft: #define PIN_RESET_SET_OUTPUT() DDRC |= ( 1 << 3 ) // PORTC 3
09:06 PM jsoft: and then
09:06 PM jsoft: warning: implicit declaration of function ‘PIN_RESET_SET_OUPTUT’
09:06 PM jsoft: When I try to use it like PIN_RESET_SET_OUTPUT();
09:06 PM jsoft: I am in the middle of refactoring a bunch of code, could that just be some other error/thing somewhere else causing that ?
09:07 PM jsoft: Or am I missing something captain obvious here
09:21 PM rue_bed: you cant have that comment in there, probably
09:21 PM rue_bed: how did you call it
09:22 PM rue_bed: I'm going to gues you made a typo in it
09:56 PM jsoft: literally PIN_RESET_SET_OUTPUT(); is how I called it
09:56 PM jsoft: I also moved the comments
09:56 PM jsoft: Very odd.
09:56 PM jsoft: Has to be something stupid I am missing
11:57 PM nuxil: jsoft,
11:57 PM nuxil: check your flags in the make file. CFLAGS += -Wstrict-prototypes and|or add a void to the fuction
11:58 PM nuxil: oh a macro