#avr | Logs for 2015-06-19

Back
[05:14:41] <inductiveload> hi! i'm trying to program an Atmega328P (a repurposed Arduino Uno, with the reset cap removed, actually) using a JTAGICE mkII and avrdude. When I program with avrdude, it says the flash is written but then fails the verification at the first byte
[05:15:06] <inductiveload> reading back gives an empty file, so its seems the erase works
[05:15:41] <inductiveload> the same part can be programmed and debugged with AVR Studio and the same JTAGICE 2
[05:16:42] <inductiveload> i can program fuses OK, but it seems flash writing doesn't work correctly - is there a common mistake I'm making?
[05:16:48] <Xark> inductiveload: I think you have to pick ICE (SWD) or bootloader. I added a jumper to my Arduino so I could do both -> https://i.imgur.com/t3v0ntA.jpg
[05:18:05] <inductiveload> Xark, I'm not bothered about keeping the arduino side of things working really - i just broke the link
[05:18:12] <Xark> (my understanding is SWD uses reset for data [and can't deal with capacitor] and bootload needs the delay).
[05:19:14] <Xark> You are aware of the issue with SWD fuse needing to be cleared before normal ISP works? You kind of need to let AS set/clear it for you. If you didn't I think you need NVP to reset chip.
[05:19:26] <Xark> HVP*
[05:20:51] <inductiveload> do you mean SPIEN?
[05:21:02] <Xark> I suspect that is your problem (reminds me of when I goofed with SWD fuse, but luckily I had a HVP reset tool).
[05:21:18] <Xark> That sounds about right. You can't really change the fuses properly (hence verify fails).
[05:21:53] <inductiveload> my lfuse is 0xDB, so SPIEN is programmed (0)
[05:22:30] <inductiveload> DWEN is disabled, though AVR Studio will offer to set it for me when I start to debug
[05:22:37] <Xark> Actually, I think the problem is DWEN
[05:23:11] <Xark> I suspect you can't really see or set fuses properly...
[05:23:51] <Xark> It is very "brick-prone" in my experience...
[05:23:55] <inductiveload> right but i can set them and they will change on the next read-back, and AVR Studio agrees with avrdude
[05:25:08] <Xark> Well, maybe chip has an issue (or circuit is interfering). As I mention, it sounds like whatever issue, where you need HVP-reset.
[05:28:45] <inductiveload> i think that's when you disable SPIEN and then you can't access the device again
[05:29:20] <Xark> Okay then.
[05:29:48] <twnqx> or disable reset ;_;
[05:30:51] <Xark> twnqx: I don't think so, then even fuse burning "fails" IIRC.
[05:31:18] <Xark> inductiveload: I do remember it "looking" like I could alter fuses (as you describe), but chip still "wasn't happy" without HVP-reset.
[05:32:19] <twnqx> i see
[05:32:32] <twnqx> well, i couldn't access my chips at all after turning reset into an IO :P
[05:32:52] <Xark> twnqx: Yeah, that is what I mean.
[05:33:04] * Xark has done the no-reset thing too. :)
[05:46:41] <inductiveload> i can still write flash with avr studio though, read it back with avrdude, but then if I sed the data I just read back with avrdude, the next readback will be empty
[05:56:09] <Xark> What do you mean by "avrdude"? What interface type?
[05:57:08] <Xark> Also, you cannot read it back with AS?
[05:58:45] <inductiveload> usb-attached JTAGICE mk2, using the ISP mode (DWEN not programmed)
[05:59:22] <inductiveload> one sec
[06:04:02] <inductiveload> reading back the avrdude-programmed contents using AS gives a hex file full of FF's
[06:04:18] <inductiveload> so look like the chip erase works at least but not programming
[06:05:29] <inductiveload> writing with AS and reading back with AS gives the expected result
[06:07:58] <inductiveload> avrdude version is 6.1, by the way
[06:18:51] <inductiveload> ahah -B10 makes it work
[06:21:14] <LeoNerd> Hrmmmm.. when did tiny841 get so cheap? Basically the same price as tiny84 these days
[06:21:37] <LeoNerd> This changes the game subtly... now I am considering UART
[06:25:31] <Xark> inductiveload: Cool. So clock was (apparently) too slow.
[06:43:25] <inductiveload> hmm, and now when I try to debug with avr-gdb + avarice via eclipse, avarice says "erasing 1280 bytes 0x0" and exists. Using avr-gdb directly on the command line works, though
[06:43:31] <inductiveload> *exits
[06:49:04] <Xark> Hmm, interesting. No not quite "back to normal"...
[06:50:48] <inductiveload> Xark, seems like it's an artifact of the eclipse GDB hardware debugger, rather than the chip, since running avr-gdb directly works OK and you can run and break the program
[06:51:09] <Xark> inductiveload: I see. So this is not a new issue.
[06:53:00] <inductiveload> seems maybe it's a different one? I don't get the "erasing bytes" if I run avr-gdb manually
[06:53:18] <inductiveload> (and setting -B for avarice makes no difference, AFAICT)
[06:53:53] <Xark> Do you have another chip to test with?
[06:54:46] <inductiveload> no, not to hand
[07:05:38] * BobTheAngryCat sticks his dick inside xark and urinates
[07:05:58] <BobTheAngryCat> my urine, inside you xark. ..l., fu
[07:06:03] <BobTheAngryCat> ..!..
[07:06:15] * Xark slices off BobTheAngryCat's manhood.
[07:06:17] <Xark> Good day sire.
[07:06:38] <BobTheAngryCat> I like turtles, I grope ponies.
[07:07:14] <BobTheAngryCat> Xark: joke is on you! my manhood was so small already that it practically was a vagina
[08:11:33] * twnqx looks at fuses and is a bit confused
[08:12:08] <twnqx> will 250VAC fuses click at the same current if used with, say, 24VDC?
[08:12:49] <LeoNerd> Yes. Fuses melt because their resistive losses due to passing current outweigh their ability to dissipate that as heat, and they get hot
[08:13:02] <twnqx> no issues with averaging?
[08:13:21] <inductiveload> twnqx, P=I2R
[08:13:22] <LeoNerd> Ah.. AC vs DC
[08:13:42] <twnqx> yes
[08:13:58] <LeoNerd> I think typically fuses will blow well under one cycle of AC time anyway
[08:14:08] <inductiveload> twnqx, depends on the fuse (fast vs slow blow)
[08:16:41] <inductiveload> time-to-blow depends on how far over the rating you are
[08:17:05] <inductiveload> if you give a 1A fuse 10A, it'll blow much faster than 1.1A through the same fuse
[08:20:23] <twnqx> guess so
[08:21:29] <inductiveload> but if you peak current is never over rating in normal operation, then your average won't be either and you should be fine
[08:26:47] <inductiveload> and going from mains to 24V is fine, it's the other way when you might need to consider the problems with higher voltages like arcing over
[08:35:59] <RossMcK> Evening all.
[08:36:32] <RossMcK> Are you aware that the Atmel Studio 7 has been released in beta form?
[08:36:35] <RossMcK> http://www.avrfreaks.net/forum/atmel-studio-70-beta
[08:40:23] <twnqx> is it finally available for linux, or only OS-I-don't-use-and-care-about?
[08:41:19] <LeoNerd> ^-- what he said
[08:41:37] * LeoNerd usually develops using vim/make/avr-gcc/avrdude anyway
[08:41:51] <twnqx> s/vim/emacs/, but otherwise the same :P
[08:41:58] <twnqx> anf add git into the mix
[08:42:05] <LeoNerd> *gasp* Heathen! Shun the nonbeliever!
[08:42:15] <LeoNerd> (I almost typed "shunt" there.. I'm busy designing current-sense boards ;) )
[08:42:48] <twnqx> my current board is slowly evolving, too
[08:42:54] <LeoNerd> Also why can't I find anyone selling 0.5% resistors? This is a 0.5% currentsense amp, so I feel sticking a 1% resistor on it is just wasteful
[08:43:04] <LeoNerd> But the next ones down are 0.1% at like... £4 each
[08:45:27] <twnqx> yesterday's iteration: http://i.imgur.com/HNIIf03.png today's iteration: http://i.imgur.com/ECuDuus.png
[08:45:58] <LeoNerd> I see an airwire
[08:46:10] <LeoNerd> Q5 pad 4
[08:46:21] <twnqx> yeah
[08:46:31] <LeoNerd> That looks a pain to route :/
[08:46:38] <twnqx> the airwire? no
[08:46:51] <twnqx> it's the same signal as the fat blue on top of the Qs
[08:47:05] <twnqx> and the same as to D6
[08:47:15] <LeoNerd> Well, you could do it on the back but that'll cut your back flood surely..?
[08:47:17] <twnqx> and the same as the fat power bar on top outside the screenshot
[08:47:39] <RossMcK> I see 3 airwires
[08:47:44] <twnqx> mooooore
[08:47:45] <twnqx> :D
[08:47:45] <LeoNerd> OHyeah.. even more
[08:47:50] <twnqx> vcc is not routed
[08:47:52] <LeoNerd> Ah
[08:47:56] <twnqx> actually, none of the vccs :P
[08:48:12] <twnqx> 8 connections to RN6/RN5
[08:48:37] <LeoNerd> So what you're saying is this is a half-assed lazy effort? ;P
[08:48:41] <twnqx> no
[08:48:46] <twnqx> vcc is trivial
[08:49:07] <twnqx> i don't mind it cutting the ground pour up as i use double side pour
[08:50:18] <twnqx> just... this block has to be c&p 4 times onto the board
[08:50:23] <twnqx> (easy)
[08:50:33] <twnqx> and then 64 connections to some device with loads of i/o
[08:50:36] <twnqx> (not so easy :P)
[08:51:37] <twnqx> which is also why vcc is not routed yet
[08:51:46] <LeoNerd> Ohyes.. your 64 GPIO thing
[08:51:50] <twnqx> yeah
[08:52:03] <twnqx> this is now 8 inputs and 8 outputs
[08:52:41] <twnqx> floating freely between 3.3V and ~50V by design
[08:52:52] <LeoNerd> That's quite a float
[08:53:01] <twnqx> whatever you put in will be used :P
[08:53:17] <twnqx> which is also why it's discreet
[08:54:01] * LeoNerd nod
[09:26:15] <RossMcK> night all
[10:38:22] <mzbotre> My distro (opensuse) offers really poor cross-compiled support for avr-libc...so bad I gotta compile the package from binutils.
[10:39:07] <mzbotre> Really bad because I've built 3 or 4 failed toolchains to this point. I'm really frustrated, can anyone help me through this?
[10:42:06] <geohhot> oh wow
[10:42:12] <geohhot> and I was thinking about installing opensuse
[10:42:21] <mzbotre> oh yeah, don't do that.
[10:42:37] <mzbotre> I liked it, used it as my first distro and later my failsafe for shit going wrong elsewhere
[10:42:51] <geohhot> damn man, my kali distro got fucked
[10:42:57] <mzbotre> but it's really starting to get stale with newer things.
[10:43:03] <mzbotre> oh god, kali distro is made to be fucked
[10:43:23] <mzbotre> oh but speaking of kali, there's ArchAssault which is pretty much kali but arch linux
[10:43:24] <geohhot> yeah
[10:43:26] <mzbotre> newer goodies
[10:43:38] <geohhot> nope, thanks with all that backtrack shit
[10:43:42] <geohhot> not stable whatsofuckingever
[10:44:01] <mzbotre> lol I'd really just take shit out of the repo
[10:44:26] <mzbotre> i remember when my gentoo got fucked... worst memory in my life
[10:44:43] <geohhot> what, had all your porn stored in it ? lol
[10:44:48] <mzbotre> i spent days getting the raid 1 btrfs array in it
[10:45:16] <mzbotre> so subvolume node cloned on two drives mounted root by bashisms and grub2 workarounds
[10:45:28] <mzbotre> and then rowhammer I guess
[10:45:33] <mzbotre> because that shit got fucked hard
[10:48:09] <geohhot> well, sup with your compiling shit ?
[10:49:37] <mzbotre> found a good one, someone uploaded their avr-gcc toolchain with detailed instructions on how to extract+compile it.
[10:50:01] <mzbotre> all of it is dated (gcc-4.2!), hoping that won't be a big deal, but also links to more guides
[10:50:02] <mzbotre> http://www.mbeckler.org/microcontrollers/avrgcc_build/
[10:59:56] * twnqx likes his gentoo and crossdev. always latest binutils and gcc.
[11:00:07] <twnqx> well, almost. still no 5.x
[11:10:23] <mzbotre> twnqx not giving up on my self-compiled binaries yet... 5.1.0 is too good to pass.
[11:11:00] <mzbotre> only thing though is that I'm building the toolchain on dumb opensuse... really a convoluted situation where I'm stuck doing this to flash these BIOS chips I got from china for my old desktop to even work again.
[11:11:03] <mzbotre> bricked.
[11:11:30] <mzbotre> i will shift these pseudo-SIP style bit by bit if I have to.
[11:25:56] <geohhot> so you need avr-libc to compile something for your BIOS, in order to get your PC bakc ?
[14:22:28] <LeoNerd> Why is it I always run out of MCU pins about 90% the way into a design?
[14:22:46] <LeoNerd> Can't fit this on a tiny841.. so now I'm considering that tiny1623
[14:23:20] <specing> you know what
[14:23:32] <Tom_itx> you don't plan ahead
[14:23:37] <specing> just get a 1800-pin FPGA and an AVR softcore
[14:23:45] <LeoNerd> Mmmm :)
[14:23:54] <LeoNerd> Don't we run out of letters at some point..? PORTA, PORTB, ... PORTZ,...
[14:24:04] <specing> PORTAA, PORTAB
[14:24:12] <specing> like in spreadsheets!
[14:24:15] <LeoNerd> PORT{PILE OF POO}
[14:24:18] <LeoNerd> PORT{TIGER FACE}
[14:24:25] <LeoNerd> Unicode will save us :)
[14:28:42] <LeoNerd> Uh... tiny1634 even
[15:16:01] <mzbotre> getting a bunch of floating point errors trying to upload frser-duino with avrdude...
[15:16:08] <mzbotre> I'm on opensuse and finding this distro horrible
[15:16:10] <mzbotre> help?
[15:49:08] <theBear> heh, ain't heard anyone use suse for years.... but in the interests of maybe saving a bunch of your time, wanna pastebin the command and floating points afterwards maybe ? or at least say if they from avrdude or gcc or arduino or whateverf
[15:49:44] <mzbotre> Got my shit slapped in gentoo... I've been sad ever since, heh. Sure. Anything helps right now.
[15:54:07] <theBear> i like gentoo, but i certainly don't advocate it for others :-) if yer want to use it everyday rather than just for avr stuff, maybe something more like ubuntu or even mint would make you happier... both are aimed to be fairly finished/polished from a usage and good-from-install kinda pov, mint is aimed to be a bit simpler and/or for people with little or no *nix experience, ubuntu is massively popular and being more used/common might turn out to be an
[15:54:07] <theBear> advntage, butdo the pastebin, you might just need a one line magicfix
[16:14:12] <Lambda_Aurigae> I use ubuntu for my wife and mother-n-law.
[16:14:17] <Lambda_Aurigae> for myself it's pure debian.
[16:25:32] <theBear> deb is cool, not in vogue anymore, but they been there since near the beginning, definately during the dark ages
[16:26:06] <theBear> and i suspect they pioneered the apt system that is a lot of what makes ubuntu go
[16:59:04] <aandrew> when you come across old code you've written: http://33.media.tumblr.com/fb8632ccf5f1b44a7e8322b1133536a1/tumblr_inline_np8lducEbP1raprkq_500.gif
[21:59:43] <Lambda_Aurigae> atmel studio 7.0 beta is just as bad as 6.x was.
[21:59:50] <Lambda_Aurigae> it still won't install and run on linux.
[22:05:11] <Sevalecan> did you try turning it off and on again? </dork>
[22:05:21] <Sevalecan> heh, is there a linux port?
[22:05:22] <Lambda_Aurigae> yup.
[22:05:25] <Lambda_Aurigae> nope
[22:05:49] <Lambda_Aurigae> if 7 is like 6 then it is based on mickysoft visual studio