#avr | Logs for 2013-07-24

Back
[00:01:50] <inflex> heh
[00:01:59] * inflex looks at his Toshiba mainboard... bleh
[02:53:06] <Roklobsta> damn, can anyone tell me why a global volatile variable is Optimized away in the frickin' watch window?
[02:54:22] <theBear> nah, and i dunno what a watch window is, but i DO know that gcc has various known issues with optimizations on avr
[02:54:44] <Roklobsta> the variable watch window in AVRSTudio
[02:54:59] <theBear> i still don't know what that is :)
[02:55:26] <Roklobsta> I appreciate local variables being optimised out or put out of scope within functions but a global should always be addressable and watchatble
[02:55:42] <Roklobsta> oh you can look at varioables in their native type
[02:55:57] <Roklobsta> useful for structures and so on
[02:55:58] <theBear> it's not optimised out, it's broken
[02:56:25] <Roklobsta> no, volatile global != optimised out ever. The debooger seems to have lost track of it
[02:56:30] <Roklobsta> which is plain wrong
[02:56:47] <theBear> that's what i'm saying, broken compiler means doing things that are wrong !
[02:57:14] <Roklobsta> do i need to use -g3 instead of the default -g2
[02:57:25] <Roklobsta> ass
[02:57:27] <theBear> err, -O? is optimization level
[02:57:36] <theBear> i dunno what g i
[02:57:37] <theBear> is
[02:57:44] <Roklobsta> -g? gives debug info
[02:57:56] <Roklobsta> i have to RTFM
[02:57:59] <Roklobsta> FT
[02:59:05] <theBear> when yer do make sure you ain't reading cpu/arch specific stuff other than the avr section, if you just search for various options you'll often land in the middle of several pages of info specific to something you don't have
[03:06:23] <Roklobsta> mmm, like the DEC Alpha
[04:58:18] <skroon> hi all
[04:59:57] <w|zzy> hi
[05:16:56] <specing> Did ATMEL nuke the chip selector they had on their site?
[05:17:20] <specing> its either an endless animation of blue dots or my browser freezes
[05:18:32] <twnqx> specing: were you the one who once linked me that spec for automotive electronics power supplies and the peaks they had to withstand?
[05:19:05] <specing> probably not
[05:59:58] <OndraSter_> specing, atmel's website was borked for me few days ago
[06:00:16] <OndraSter_> tried picking up new atmel studio 6.1, which requires registration. I am already registered, but it wouldn't take my password
[06:00:23] <OndraSter_> and reset password did not work
[06:00:33] <OndraSter_> "sent password to my@mail.com" but none arrived
[06:09:08] <Roklobsta> you can get it directly without the blah blah blah
[06:58:40] <twnqx> OndraSter_: i get spammed by atmel twice for every newsletter now
[06:58:49] <twnqx> and i can't find a link that says "stop this"
[07:12:19] <specing> report them to SpamHaus ;P
[08:15:43] <malcom2073> I've found random references about avrdude being lib-ized, but I can't seem to find any code or solid information. I would like to integrate uploading to STK500 bootloader compatible boards in my application, and people seem to say "use the library, don't wrap the command line". So where's the library?
[08:53:16] <MrTrick> Argh... So I set the interrupt flag with sei(); .. and debug. And at the very next statement, it's cleared.
[08:53:29] <MrTrick> Can't figure out why - any ideas?
[08:57:49] <MrTrick> as in, stepping through; https://gist.github.com/anonymous/9a0d3b712dfe391556c7 After running line 4 it activates the I bit of the status register. After running line 6 it clears it.
[08:59:50] <timemage> MrTrick, in a simulator?
[09:00:15] <MrTrick> No, using debugWire on a 328P without a bootloader.
[09:03:04] <RikusW> malcom2073: I never heard of avrdude libs
[09:03:10] <RikusW> not yet
[09:09:10] <timemage> MrTrick, if i'm lucky i have something set up here where i can investigate it. i want to say that it's likely because you're running under debug wire and that were you to break later you'd see the flag change later.
[09:11:26] <MrTrick> ah...
[09:11:43] <MrTrick> timemage: I tried some known-good code.
[09:12:02] <MrTrick> It gave the same behaviour - clearing the interrupt flag on the next arg.
[09:12:11] <MrTrick> (opcode, rather)
[09:13:11] <MrTrick> Interestingly, it seems like if I step on the sei() command it breaks.
[09:13:40] <MrTrick> But if I skip it (because it's inside an init() function) eg runs sei(); and return straight after, it doesn't break.
[09:13:50] <MrTrick> wait, using 'break' in wrong context.
[09:14:02] <timemage> MrTrick, =)
[09:14:05] <MrTrick> As in, going 'step, step, step' the sei() command doesn't seem to 'take'.
[09:14:42] <MrTrick> So, measurably different behaviour between debugging and not debugging. o_O
[09:14:52] <timemage> MrTrick, i'm pretty sure dw is interferring. and it's bothering me because somewhere i know the answer to this. i just haven't played with dw in some time.
[09:15:20] <MrTrick> yeah. I'd miss it if I didn't have it though... I find the atmel simulator pretty unusable.
[09:15:27] <MrTrick> (I'm spoilt - the PIC one is fast)
[09:15:43] <timemage> MrTrick, there are a number of caveats to using it. atmel has some documentation on that. and there is probably a setting for telling dw whether or not you want to set into ISRs, which may be what's cause things. just trying to get me dev env up agaoin.
[09:16:06] <MrTrick> I'd be interested in finding out more about that.
[09:20:14] <timemage> MrTrick, i have a 2313 sitting on a board here from close to year ago that is apparently all set to do dw.
[09:20:57] <MrTrick> oh yeah, it took me quite a while to figure out how to *clear* DW off a chip too. ^_^
[09:21:07] <timemage> MrTrick, yup.
[09:21:27] <timemage> MrTrick, thought i bricked the first one.
[09:24:54] <timemage> MrTrick, well, in a basic test my global interrupt flag stays set. so, maybe i can find the relevant setting, assuming that's what it is.
[09:26:20] <MrTrick> yeah, here's my 'known good' code that I managed to break; https://gist.github.com/anonymous/6f95331691d34c3a38a0
[09:27:31] <MrTrick> If I "Debug and Break", then step *over* the init() it works fine.
[09:28:27] <MrTrick> If I "Debug and Break", then step into and through the init() function, the sei() function sets interrupt enable but it's cleared on the next opcode. And the program stops working.
[09:30:24] <timemage> MrTrick, the thing is, if you find the answer to this, it's going something like the answer to "doctor doctor, it hurts when i..."
[09:30:50] <MrTrick> Sure. I think I'll refactor my code slightly to look more like my known-good example.
[09:31:22] <timemage> MrTrick, any chance this code would run in a disembodied 2313 ?
[09:31:41] <MrTrick> eg keep the sei() call in that init subroutine, instead of where it was - just before the natural place for placing a breakpoint.
[09:31:59] <MrTrick> I've just realised, it won't - I don't think the 2313 has an async timer.
[09:32:15] <MrTrick> and for that matter, you probably don't have a 32khz crystal attached.
[09:32:44] <timemage> MrTrick, nope. just barebones set up. at one point i had an led attached to it. now, not even that.
[09:49:47] * MrTrick gives up for today.
[09:56:46] <timemage> MrTrick, i had a somewhat comprehensive list of dw caveats. can't seem to find it. atmel lists a few on their html documentation for the various dw debuggers. nothing about interrupts near as i can tell though.
[09:57:20] <MrTrick> Okay, well thanks anyway. :-) Maybe I need to wire up the serial pins after all...
[11:11:16] <RikusW> http://www.edn.com/electronics-products/other/4418758/Unified-quad-core-video-processor-uses-1000-times-less-energy-than-a-host-CPU
[11:18:29] <Amadiro> RikusW, http://blogs.nvidia.com/blog/2013/07/24/kepler-to-mobile/ this looks also pretty nice -- lots of progress on the mobile market lately, it appears
[11:19:23] <RikusW> Their OpenCV capable chips looks interesting and at only 2mm2 !
[11:19:46] <RikusW> thats tiny
[11:19:57] <RikusW> 28nm process though
[11:21:05] <RikusW> videantis is codecs and CV
[11:21:10] <RikusW> *is for
[11:24:03] <twnqx> no relevant codecs like every bloody chip on the market, i suppose
[11:25:35] <RikusW> will be VP9 nad h265 capable it seems
[11:26:47] <Amadiro> VP9 is developed by google, I assume?
[11:42:30] <RikusW> yes
[11:43:05] <twnqx> does it support higher end profiles?
[11:43:25] <twnqx> i still haven't seen one that can handle 10bit h.264 in dsp/hardware
[11:44:28] <RikusW> https://lh5.googleusercontent.com/-hgI0eAPnNbU/Ue_RVXrg_kI/AAAAAAAALv0/LyJZbK2uTYA/w506-h750/QvsX6hJ.gif
[11:44:55] <RikusW> comment going with it -> :-) Oh cut it out you two.
[12:16:32] <theBear> lol, reminds me of the one with the concrete finishing/polishing machine :)
[12:16:50] <theBear> and i counter with: https://sphotos-b.xx.fbcdn.net/hphotos-ash4/1012425_634520526568962_1976656709_n.jpg
[13:45:13] <vectory_> the one with the concrete finishing machine or w/e is even more *intense*
[17:53:20] <P3X018> Where do I find the CPU clock of an Atmega8515? I can't seem to find in the data sheet. I guessing it's 3.6864 MHz, but can't confirm it.
[17:55:34] <Amadiro> P3X018, possibly depends on various things such as fuses set and prescaler. Does the compiler pass in any F_CPU macro or so?
[17:58:22] <Tom_itx> that's an old chip
[17:59:13] <P3X018> Amadiro: I'm using AVR Studio, but can't find it on the compiler meesage
[18:00:02] <P3X018> Actually this chip was shipped with the STK500 board that I bought last year... Interesting that they would chip their old chips with it.
[18:00:02] <Tom_itx> i've got the data sheet if you'd like me to post it
[18:00:35] <P3X018> Let me see if I understnad this correct. THe CPU clock is constant or is it set by the user?
[18:01:37] <P3X018> In the "System Clock and CLock Options" section of the datasheet, they are refering to a range of frequencies which can be set. Is this only refering to the external clock options?
[18:02:02] <Tom_itx> http://tom-itx.dyndns.org:81/~webpage/pdf/atmel/m8515_J1006.pdf
[18:02:10] <Tom_itx> there's the data sheet
[18:02:33] <P3X018> Thanks Tom, but I already have it ;)
[18:02:53] <Tom_itx> i misread what you said.. i though you couldn't find it
[18:02:54] <Tom_itx> sry
[18:08:26] <Tom_itx> P.39
[18:08:50] <Tom_itx> internal calibrated rc oscillator 1 2 4 or 8 Mhz
[18:09:37] <P3X018> ohh I see..
[18:09:44] <P3X018> Thanks I'll check it out
[18:40:38] <RikusW> P3X018: be carefull, it setting external clock with no clock present, ISP programming will cease to work
[18:40:47] <RikusW> you'll have to use HVPP mode
[18:41:09] <RikusW> or you could use the STK500's clock generator
[18:41:43] <P3X018> RikusW: I'm just using the internal RC oscillator
[18:42:36] <P3X018> Btw, is an external oscillator included with the STK500 or is it a chip you have to buy?
[18:43:19] <RikusW> there is one on the stk
[18:43:38] <RikusW> you can use the mcu on the stk500 or a crystal plugged into it
[18:44:07] <RikusW> you can also connect an external crystal to the AVR directly and set the fuses for external crystal
[18:44:09] <P3X018> Is it the one called "CRYSTAL"`?
[18:44:47] <RikusW> you have to set the STK500 clock generator from AVR Studio
[18:44:55] <RikusW> or plug in a crystal and set the right jumpers
[18:45:19] <RikusW> AS got the manuals for it
[18:49:23] <P3X018> There are alot of options to set with SUT_CKSEL. Which ones are used to have clocks such as 3.6864 MHz for error serial communication?
[18:50:07] <P3X018> oh wait it's all in the datasheet