#avr Logs

Jan 17 2018

#avr Calendar

12:30 AM polymorph_: lel they have this https://cdn.sos.sk/productdata/a3/a1/620ed435/stm32f417vg.pdf for 9 eur, 200 DMIPS
12:44 AM polprog: Emil: i hope ill have time to sit and redo the pcb somtime now
12:45 AM _ami_: polymorph_, cool! :)
12:45 AM polprog: polymorph_: yes they are! my nxp 595 could handle data clock up to 24MHz and theres a company that makes some superfast CMOS
12:45 AM _ami_: buy one of those STM32f103 blue pulls and try hands on it first.
12:45 AM polprog: those are cool
12:45 AM _ami_: pills*
12:45 AM _ami_: i plan to make an oscilloscope based on stm32f1 or f4.
12:46 AM _ami_: will write PC software too to view results.
12:46 AM _ami_: Its in my TODOs
12:46 AM _ami_: may be someday
12:46 AM _ami_: i think its required for learning analog electronics
12:47 AM _ami_: can't afford to buy 1000$ or 2000$ oscilloscope.
12:58 AM Casper: then get a 600$ one
01:43 AM polymorph_: i would really like a 16 bit adc ;/
01:44 AM polymorph_: i can only get lqfp48 like that now
01:45 AM polymorph_: STM32F373CCT6TR
01:45 AM polymorph_: 256K flash, -40°C-85°C, tape&reel, LQFP48 16 bit adcs delta sigma
01:47 AM _ami_: someone is starting to like stm32s ;) polymorph_ ^
01:47 AM polymorph_: STM32F417VG ARM Cortex-M4 STM 32 F4 Mikrovezérlő 32-Bit 168MHz 1MB FLASH LQFP100 3×12-bit, 2.4 MSPS A/D converters: up to 24 channels and 7.2 MSPS in triple interleaved mode 2×12-bit D/A converters
01:48 AM polymorph_: here would be my next pick that is avail easily, but this does not have my 16 bit adc ;<
01:50 AM polymorph_: polprog: this is cool stuff herefor cheap https://cdn.sos.sk/productdata/54/e4/d22eb66f/stm32f373cct6.pdf
01:51 AM polymorph_: 2x price of an atmega168pa
01:53 AM polymorph_: polprog: i dropped the lpc1763 in favor of the more popular stm32
01:53 AM _ami_: :D
01:57 AM polymorph_: btw filling 16kB flash tok me a month of coding on atmega :>
01:57 AM polymorph_: took
01:57 AM polymorph_: and i only did C
01:59 AM polymorph_ is now known as polymorph
01:59 AM _ami_: Casper, may be! :)
02:00 AM _ami_: but like to make one (cheaper and i am sure better! :)
02:01 AM polymorph: if you just want one you can get a used bad from usa?
02:01 AM polymorph: and fix
02:01 AM _ami_: nah,
02:02 AM polymorph: lel STM32F417VG al that stuff but what i really need is superb adcs now
02:03 AM _ami_: i have stm32f407
02:03 AM polymorph: 100 pin?
02:04 AM _ami_: stm32f407zgt6 - i think so.
02:04 AM _ami_: http://amitesh-singh.github.io/stm32/2017/09/02/blinking-leds-on-stm32f407zgt6.html
02:04 AM polymorph: ha 144 pin :)
02:04 AM polymorph: does it blink leds well?
02:04 AM polymorph: 1 led? :)
02:04 AM _ami_: well. the board which i bought has two leds. (i don't know why they put 2 leds)
02:05 AM _ami_: F4 is cm4
02:08 AM _ami_: polymorph, this one has 19 channels (16 outside, 2 internal nd 1 for Vbat)
02:08 AM _ami_: that internal includes a temperature sensor for measuring IC temp.
02:09 AM _ami_: special reg value to enable this.
02:09 AM _ami_: ihave used that before on stm32f1.
02:09 AM _ami_: i overclocked stm32f1 to 128Mhz and was measuring the temp rise.
02:09 AM polymorph: my board is much cooler :) it has an RGB LED on it!
02:10 AM _ami_: so 3 GPIOs are wasted. :P
02:10 AM polymorph: nooo
02:10 AM polymorph: it is visual indicator
02:11 AM polymorph: and can even color mix
02:13 AM _ami_: polymorph, do you have pic of your board?
02:13 AM _ami_: i like to see.
02:13 AM polymorph: i even used it for debug before i wrote the ps2 send dump in my code
02:13 AM polymorph: hm i havent even pictured it
02:14 AM _ami_: ok
02:14 AM polymorph: a minimalistic rectangle with an rgb led and a header for ports
02:15 AM polymorph: single sided with an atmega168pa
02:16 AM polymorph: internal rc osc and a 32768Hz watch crystal from a dead motherboard
02:17 AM polymorph: for more serious stuff i figured it does not have enough ports
02:17 AM polymorph: but it can still do some cool stuff
02:23 AM _ami_: very cool.
02:28 AM polprog: polymorph: thanks for the link
04:57 AM PsySc0rpi0n is now known as HelloShitty
05:07 AM day__ is now known as day
07:14 AM day__ is now known as day
08:03 AM Jartza: 2~¨
08:03 AM Jartza: ¨'å
08:03 AM Jartza: oops
08:04 AM Jartza: note to self: close or unselect active windows when cleaning the keyboard
08:05 AM polprog: http://www.bash.org/?949560
08:05 AM polprog: by the way i have a usb barcode gun.. so if i suddenly send an ean-13 then sorry ;P
08:36 AM nuxil: http://bash.org/?top
08:39 AM nuxil: some of them are hilarious.
08:45 AM polprog: i spent too much time on that site
08:47 AM Jartza: polprog: haha, that VISA magstripe reader :D
10:10 AM day: wow a bash.org post. I haven't seen one of those in a looong time
02:03 PM polymorph: Hello
02:04 PM kl0wn: hi
02:09 PM polymorph: sup
03:31 PM nuxil: messy menus
03:34 PM polprog: messy mediocre menu sets send alerts down hawaii
04:11 PM polprog: how exactly something like this in C translates to human: (*(volatile unsigned int *)(0x1234))
04:11 PM polymorph: Hey
04:11 PM polymorph: :)
04:12 PM polprog: at which point do i start decrypting the grammar
04:12 PM polymorph: In an appnote pdf, ST calls for "Tape and Real" packaging ;) I like Real packaging materials
04:17 PM polymorph: polprog: {"volatile unsigned int*" value at address}(*{typecast to "volatile unsigned int*" type}(volatile unsigned int *)(0x1234))
04:18 PM polymorph: i think it was a trick to make gcc not complain it -Wall
04:18 PM polprog: well my gcc errors at that...
04:18 PM polymorph: oh ok
04:19 PM polprog: damn
04:19 PM polymorph: typecasting a void* is all right i remember
04:21 PM polprog: doesnt let me cast int* to void*
04:22 PM polymorph: no
04:22 PM polymorph: you make a void* and cast that ;>
04:22 PM polprog: ok
04:22 PM polymorph: void means nothing :(
04:23 PM polymorph: or virgin
04:23 PM polprog: void *a = (char *)(0x100); ok so this line compiles... i suppose this makes 'a' a defined place in ram at 0x100
04:24 PM polprog: 0x100 is the value of char* as per grammar
04:25 PM polprog: hmm.. how would i now write something to a
04:25 PM polymorph: how about = (void *)(0x100); ?
04:26 PM polprog: works as well. i think i know what difference it makes as well
04:26 PM polymorph: *a=stuff; ?
04:27 PM polymorph: atmega? ;>
04:27 PM polprog: general c
04:27 PM polprog: attempting to decrypt https://github.com/satoshinm/pill_blink/blob/master/bare-metal/pill_blink.c
04:27 PM polymorph: well on x86 you do malloc/calloc before these
04:28 PM polprog: i suppose so
04:29 PM polprog: so, basically: int x; int *b=&x; *b = 10; last line means "i write 10 wherever b points" ?
04:29 PM polprog: actually a couple of printfs say yes
04:31 PM polprog: ok, things seem to go well
04:32 PM Emil: polprog: original question: unsigned int at address 0x1234
04:33 PM polprog: int *a = (int *)(0x100); since i could not write to a when it was void* (error: ‘void*’ is not a pointer-to-object type); and then *a = something; causes a segfault. thats what i expected on this laptop
04:33 PM Emil: you can add the volatile, too
04:33 PM Emil: volatile unsigned int at address 0x1234
04:33 PM polprog: thanks, thins seem to clear a bit
04:35 PM polymorph: polprog: https://gist.github.com/anonymous/6c683f04bcb9956f6b959f686de65af3
04:35 PM polprog: that github link. a shitton of magic numbers and not a single comment. how the heck am i supposed to learn from that
04:35 PM polprog: (the blink example )
04:35 PM polymorph: y ;)
04:36 PM polprog: polymorph: whats that? its a led blinker for an avr
04:36 PM polymorph: y
04:36 PM polprog: that i know :P
04:36 PM Roomsaver: Hi, I have a GBxCart RW (https://www.insidegadgets.com/projects/gbxcart-rw/) and it's on R2 which cannot be updated through software and needs an AVR. I
04:36 PM polprog: im trying to do the same on an stm (or rahter to get some theory as i have no hardware)
04:36 PM Roomsaver: Oops
04:37 PM Emil: polprog: or even deferenced volatile unsigned int at address 0x1234
04:37 PM Emil: but deferenced is pointless
04:37 PM Roomsaver: I'm trying to use my Arduino Uno as an avr to flash the .hex firmware file to it. I've uploaded the ArduinoISP example sketch to the arduino and hooked up the pins but I'm not sure where to go from there.
04:37 PM polymorph: polprog: you write int in your void* as: *(int*)a = 123; or *((int*)a) = 123;
04:38 PM polprog: polymorph: oh
04:38 PM polymorph: that is typecast
04:38 PM polprog: okay
04:39 PM polprog: so in *(int *)a i cast a to a "pointer to an int pointer", right?
04:40 PM polprog: Roomsaver: start avrdude (the flashing program on the computer) with proper parameters
04:40 PM Emil: a is casted to an int pointer and then derefenced
04:40 PM polprog: "dereferenced"
04:40 PM Emil: that's the word
04:40 PM polprog: so its a pointer to a pointer?
04:40 PM Emil: No
04:41 PM polprog: oh, right, that would be int**
04:41 PM Emil: it's the value at a if a was interpreted as an int pointer
04:41 PM polprog: okay
04:41 PM Emil: int at address a
04:42 PM Emil: *(int *)a=123 => set int at addres a to 123
04:43 PM Roomsaver: Ok thanks, I'll try that in a bit
04:43 PM polprog: if i understand it right i could do a[0] = thing ?
04:43 PM Emil: yes
04:43 PM polprog: \o/
04:43 PM Emil: if a was a pointer
04:43 PM polprog: yes
04:43 PM Emil: comeone :D
04:44 PM polprog: look, its the dark part of C
04:44 PM Emil: wot
04:44 PM Emil: comeone
04:44 PM Emil: u8 *buf=malloc(size);
04:44 PM Emil: b[index]=something;
04:44 PM Emil: you never did that?
04:44 PM polprog: i did. just wanted to make sure
04:44 PM polprog: im a bit tired
04:49 PM polymorph: polprog: check my "examples" ;) Some functional logic in C's macro (gcc) lazycode https://pastebin.com/v1wEu4Xd Macro Magic in C (gcc), functional logic, polymorphism https://pastebin.com/z0sw6hK7 foreach() array in C ;) (gcc) https://pastebin.com/B0DBzNYp Si/IEC prefixes printf(value) and symbol in C https://pastebin.com/eEX68wt9
04:49 PM polprog: polymorph: im afraid of your macros right now
04:51 PM polymorph: macro is just a text replacement tool ;>
04:51 PM polprog: not now im tryig to focus lol
04:51 PM polprog: commiting a blasphemy for Emil now
04:52 PM polymorph: well for example foreach() contains example handling array of pointers for example
04:56 PM polprog: ok i think its ready
05:01 PM polprog: just a second!
05:03 PM polprog: damn github password
05:04 PM polymorph: what you think about this dac? https://www.mikrocontroller.net/topic/293454
05:04 PM polprog: polymorph: Emil: i present you https://gist.github.com/polprog/5d488f18b30dda3f0c8d3ec9981729cf
05:06 PM polymorph: may i interest you in a valueisinrange() ? :)
05:09 PM Roomsaver: Uhh so I downloaded AVRdude and it complained that libusb0.dll wasn't available so I copied that from my Arduino IDE installation folder and now all I get is "The application was unable to start correctly"
05:10 PM Roomsaver: nvm, found avrdude in the Arduino IDE installation as well
05:21 PM Roomsaver: How would I know which processor to specify for avrdude? I'm using an arduino uno as the avr but i'm flashing to an atmega8151L
05:22 PM polprog: thebone you are flashing to
05:23 PM polprog: in that case it will probably be -p m8151 (you can check a list of them with -p ? )
05:24 PM Roomsaver: Okay thanks!
05:30 PM Emil: polprog:
05:30 PM Emil: wat
05:30 PM Emil: >uint64_t is not 4 bytes wide
05:31 PM Emil: literally wat
05:31 PM Emil: (u)int64_t is exactly 64/8=8 bytes wide
05:31 PM Roomsaver: This seems like it'd be a lot simpler on linux so I'm gonna try it on there
05:32 PM polprog: dont make assumptions to things you can easily check Emil :^)
05:32 PM Emil: polprog: mate
05:32 PM Emil: polprog: name a fucking platform
05:32 PM Emil: I dare ypu
05:32 PM polprog: #define __uint64_t char
05:32 PM kl0wn: ban
05:33 PM Emil: /kickban polprog
05:33 PM polymorph: lel
05:33 PM polprog: its valid c, come on
05:33 PM polymorph: that is a standard fixed datatype
05:33 PM Emil: polprog: also wtf is your index a char
05:34 PM polprog: thsi was meant to be bad code
05:35 PM Emil: That concept is not bad in any way
05:35 PM polprog: this is sarcasm in c ;)
05:35 PM Emil: Having a buffer to store any datatype
05:36 PM polprog: meanwhile im thinking if defining a label in one inline asm block and jumping to it in another would make a goto without a goto
05:36 PM polymorph: Emil: check out typedef struct
05:37 PM polymorph: also you can have a stream of your choice if you write functions to use it
05:37 PM polymorph: C is close to ASM
05:38 PM polprog: see what that dark side of C does to people? my face hurts cos im laughing non stop
05:38 PM polymorph: polprog: you could get away using c++ on an arm though
05:38 PM polprog: polymorph: i know a person who uses rust on an arm
05:38 PM polymorph: do you like that moe?
05:39 PM polprog: i dont
05:39 PM polprog: or rather, if using c++ on a micro made stuff easier (like writing a game where OOP is useful) i would do.
05:39 PM polymorph: i don't want rst on my electronics, i spraylacquer it and/or conformal coat/pot it
05:39 PM polymorph: rust
05:40 PM polymorph: c++ might look easier but it will never be better
05:41 PM polprog: in the c64 era games were made in assmebly
05:41 PM polprog: its just whatever tool suits your needs
05:42 PM polymorph: ;/ i have 36 tabs on my browser again ;/
05:47 PM polprog: i will probably program some of it in C and some of it in asm, as usual
05:50 PM Emil: polprog: you think that's dark?
05:51 PM polprog: not the darkest but has enouhgh asterisks and parentheses scattered around
05:51 PM polymorph: that is , good
05:51 PM polymorph: at least if there aren't any unnecessary ones
05:51 PM polymorph: Then you might need methods
05:51 PM polprog: (((sure)))
05:52 PM Emil: polprog: https://emil.fi/d/datatypes.h it's a work in progress
05:52 PM Emil: and lemme show you a macro
05:53 PM polymorph: Secure Connection Failed
05:53 PM Emil: make(x, y) makevar(x, (union container){.x=y})
05:53 PM Emil: polymorph: are you sure
05:53 PM polymorph: ha
05:54 PM polymorph: Emil: is that necessary?
05:54 PM polymorph: i revised my types yesterday...
05:54 PM polprog: implementing C in C
05:54 PM polprog: ?
05:55 PM polprog: on a serios note, whaths that file for
05:55 PM Roomsaver: I have so many chrome tabs open trying to get avrdude set up, i'm surprised my computer is handling this this well
05:55 PM polprog: serious*
05:55 PM Emil: polymorph: >client version too low
05:55 PM Emil: polymorph: bitch please
05:55 PM Emil: what are you using
05:55 PM Emil: TLS 1.0
05:55 PM Emil: get on with the fucking times
05:56 PM Emil: TLS 1.0 is _banned_
05:56 PM polprog: even works in elinks, lol what are you using
05:57 PM Emil: polprog: what is that file for?
05:57 PM Emil: polprog: it's because I'm tired of building certain structures over and over again :D
05:58 PM Emil: And it allows for some neat features like type resolution and tree walking
05:58 PM polprog: nice
05:58 PM polymorph: Emil: lel ;>
05:58 PM polymorph: https://pastebin.com/Vb1XLszP
05:58 PM polymorph: here my point types
05:58 PM polprog: ah thats just a header
05:59 PM polymorph: Emil: nothing is secure, why bitch about it? ;>>
05:59 PM Emil: polymorph: quad_t is not defined
05:59 PM polymorph: you might have to delete that
05:59 PM polprog: yeah, it must be something exotic
05:59 PM polymorph: never worked
05:59 PM polprog: never seen it before
05:59 PM Emil: also
05:59 PM Roomsaver: So I've moved over to using debian and I'm getting an error when i run avrdude –c usbasp –p m8515 –u –U flash:w:/media/roomsaver/FD-SETUP/r7.hex . It says it can't find my USB device
05:59 PM Emil: why
05:59 PM polymorph: it is double double
06:00 PM Emil: why would you do int16_t
06:00 PM Emil: and then double
06:00 PM Emil: mate
06:00 PM LeoNerd: Those look like odd hyphens
06:00 PM polymorph: 128 bit double
06:00 PM LeoNerd: Did you copypaste that from a badly formatted manpage/
06:00 PM polymorph: :)
06:00 PM Emil: Roomsaver: try with sudo and usbasp at a different port
06:01 PM polprog: Roomsaver: its probably a permission issue, write a udev rule or run that as root (better write a rule)
06:01 PM polymorph: 128 bit types do not work in gcc yet ;<
06:01 PM Roomsaver: I'm running it with root tho
06:01 PM Emil: polymorph: they work if you enable them
06:01 PM polprog: double trouble
06:01 PM Emil: Roomsaver: direct root?
06:01 PM Emil: please don't
06:01 PM Emil: what was the -u flag
06:01 PM Roomsaver: Yes I'm using direct root
06:02 PM Emil: ah
06:02 PM Emil: fuse
06:02 PM Emil: thing
06:02 PM Emil: no reason to use -u
06:02 PM Emil: unless changing fuses
06:02 PM Emil: which you aren't
06:02 PM polymorph: it is good to make stuff unreachable without recompile of gcc...
06:03 PM Emil: Roomsaver: anycase, check the connection and change usb port
06:03 PM Emil: usbasp might not work in all ports
06:03 PM Roomsaver: anyway, running without -u yields the same error, but i'll try different usb ports
06:03 PM Emil: Roomsaver: the -u was just about general usability
06:04 PM polymorph: polprog: iceweasel lel
06:04 PM Emil: Oh nice
06:05 PM Roomsaver: i just tried all of my usb ports and they all yield that same error uhh
06:05 PM Emil: m8515 can has external sram
06:05 PM polprog: iceweasel approved
06:06 PM polprog: although i think i use the regular firefox.
06:06 PM Emil: polymorph: m point is
06:06 PM Emil: about that 16bit
06:06 PM Emil: is that you should directly use u64 imho
06:06 PM Emil: since you are already using doubles
06:07 PM Emil: Of course, if your usecase is clear then 16 bit is fine
06:07 PM polymorph: Emil: there are integer number of rows and columns on your monitor ;)
06:08 PM polprog: this reminds me to push lissajous project
06:08 PM Roomsaver: tbh i might just order another gbxcart rw so i can just update w/ tinysafeboot and not deal with all of this lmao
06:08 PM polprog: i shut my computer down, ill do that tomorroe
06:08 PM polprog: w*
06:08 PM Emil: polprog: yeah I thought that was your usecase
06:09 PM Emil: polymorph: *
06:09 PM Emil: issue with that, though, is you will probably experience integer overflow issues
06:09 PM polprog: i also have a usecase for integer coords :(
06:09 PM Emil: that you wouldn't with u64
06:09 PM polymorph: while i don't see any monitors with morphing pixels or >65535 pixel width/height it might be enough
06:09 PM Emil: Roomsaver: eh?
06:09 PM Emil: did you try another usb port?
06:09 PM Roomsaver: I tried all of them
06:10 PM Emil: and did you check your connection?
06:10 PM polprog: polymorph: i think x server doesnt even support screens that big :P
06:10 PM Emil: polprog: what size?
06:10 PM Roomsaver: like physically check it? if so, yes
06:11 PM polprog: Emil: more than 65535. i think on my laptop it reported max sxreen size of 8k x 8k
06:11 PM polymorph: polprog: you could have an offscreen display and display a viewport ;)
06:11 PM Emil: polprog: hmm
06:11 PM Emil: could be
06:11 PM polprog: polymorph: hence why x11 defines a screen and a monitor ;)
06:12 PM Emil: polprog: that's almost 13GB of data :D
06:12 PM polymorph: and integer math is accurate, and might be faster than double precision...
06:12 PM polprog: rip GPU
06:12 PM Roomsaver: anyway, the whole error was "could not find USB device with vid=0x16c0 pid-0x5dc vendor='www.fischl.de' product='USBasp'"
06:12 PM polymorph: i don't really like doubles anyway, bit gcc lacks fixedpoint 64 and 128 bit types
06:13 PM Emil: Roomsaver: yeah a) your usb port doesn't work with b) the device is borked or c) you don't have perms
06:13 PM Emil: Roomsaver: did you check dmesg?
06:13 PM polymorph: Emil: you can have 32 bit per color plus transparency pixels if you want ;)
06:13 PM Emil: d) your connection is bad for some reason
06:14 PM Emil: polymorph: 32bit color is 8,8,8,8
06:14 PM polprog: polymorph: inthink ive seen a 128bit in extensiom a long time ago
06:14 PM Emil: polymorph: 24-bit color + 8 bit alpha
06:14 PM Emil: That's 32bit color
06:14 PM polymorph: Emil: or even CMYK plus transparency... 2m wide printers use that.
06:14 PM Roomsaver: when plugging the arduino in i get this in dmesg: "ch341-uart converter detected" "ch341-uart converter now attatched to ttyUSB0"
06:14 PM Emil: Roomsaver: wait
06:14 PM Emil: Roomsaver: do you have a usbasp?
06:14 PM polprog: wait you are using arduino as programmer
06:15 PM Emil: lulz
06:15 PM Emil: "This does't work"
06:15 PM Roomsaver: ohwow
06:15 PM Emil: You are not even using the programmer :D
06:15 PM Roomsaver: i'm dumb
06:15 PM polymorph: Emil: 16 bit is required to store color values of a good nikon camera raw :)
06:15 PM polprog: lol i forgot, you said you flashed isp sketch :P
06:15 PM Emil: Roomsaver: hahah :D
06:15 PM Roomsaver: yes
06:15 PM Roomsaver: "why doesn't this work, i mean i don't have the hardware but uhhhh"
06:15 PM polprog: were all dumb on this blessed day
06:15 PM Emil: -P port -b baudrate
06:16 PM polymorph: 8 bit is like... 256 levels... are you living in a cave dude? :)
06:16 PM Emil: and -c arduino
06:16 PM polprog: polymorph: not dithering?
06:17 PM Roomsaver: okay well now i get "ser_open(): can't set attributes for device "/dev/ttyS0": Innapropriate ioctl for device"
06:17 PM Emil: is there a not arduino serial port programmer name in avrdude?
06:17 PM Roomsaver: with -c arduino
06:17 PM Emil: Roomsaver: not ttyS0
06:17 PM Emil: That's not where it is attached
06:17 PM Emil: it's ttyUSB0
06:17 PM Emil: Like dmesg said
06:18 PM Emil: "ch341-uart converter now attatched to ttyUSB0"
06:18 PM Emil: ttyUSB0!=ttyS0
06:18 PM Roomsaver: i'm not sure how to change that, all i changed in what i was typing was -c usbasp changed to -c arduino
06:18 PM polymorph: would you build a cluster of 65536 from fast arm mcus interconnected to be a super arm?
06:18 PM Emil: Roomsaver: mate
06:18 PM Emil: like I said
06:18 PM Emil: -P port -b baudarate
06:18 PM Roomsaver: OH
06:19 PM Roomsaver: -P ttyUSB0 right?
06:19 PM Emil: avrdude -p m8515 -c arduino -P /dev/ttyUSB0 -b 115200 (probably) -U flash:w:firmware.hex
06:19 PM Emil: full path bro
06:20 PM Emil: unless you are in the device directory already
06:20 PM polymorph: btw anybody used a xilinx prog or a wiggler for programming avr with avrdude and arm with openocd ?
06:20 PM polymorph: a universal adapter is best
06:21 PM Emil: Roomsaver: does it work now
06:21 PM Roomsaver: welp now avrdude actually runs but i'm getting more errors, so woo progress
06:21 PM Emil: change -b to 38400 or 57600 or something like that
06:22 PM Emil: Those three are the most common bootloader speeds
06:22 PM Emil: for an avr
06:23 PM Roomsaver: 38400 and 57600 gave the same errors that stk500_getsync() wasn't in sync and 115200 gave an error that it expected a different signature
06:23 PM Emil: Roomsaver: then it's 115200
06:24 PM Emil: and you are using the wrong -p
06:24 PM Roomsaver: -p m8515
06:24 PM Roomsaver: -p says that's what it is for an ATmega 8515
06:24 PM Roomsaver: which is the chip im using
06:25 PM Roomsaver: *flashing to
06:25 PM Emil: what's the full error
06:25 PM Emil: you can also use -v
06:25 PM Emil: Though it's rarely useful
06:26 PM Roomsaver: "Device signature = 0xle950f (probably m328p)" "Expected signature for ATmega8515 is 1E 93 06" "Double check chip, or use -F to override this check."
06:26 PM Emil: Yeah so
06:26 PM Emil: does the chip say
06:26 PM Emil: m8515
06:26 PM polymorph: i need to program my avrs ;<
06:26 PM Emil: Or does it say m328
06:26 PM Emil: p
06:26 PM polymorph: i need to build the toolchain again ;/
06:26 PM Emil: because sounds like it's a m328p
06:26 PM Roomsaver: ATMEGA8515L
06:27 PM Emil: Roomsaver: that's what reads on the chip
06:27 PM Emil: Roomsaver: on your device
06:27 PM Roomsaver: Yes
06:27 PM Roomsaver: On the chip
06:27 PM polymorph: i figured if i stuff everything in /avr i find it
06:28 PM Roomsaver: and documentation calls the chip "ATmega8515L" as well
06:28 PM polymorph: but do i need a different directory for all dependencies separately?
06:28 PM Emil: Roomsaver: then try -F
06:28 PM Emil: and hope for the best :D
06:28 PM Emil: Roomsaver: also
06:29 PM polymorph: what is your avr-gcc structure Emil ?
06:29 PM Emil: have you done apt-get update, apt-get upgrade, apt-get dist-upgrade?
06:29 PM Emil: polymorph: hm?
06:29 PM Emil: whatcha mean structure
06:29 PM polymorph: tree?
06:29 PM polymorph: loc?
06:29 PM Emil: Yeah I don't understand
06:29 PM Emil: you mean
06:29 PM Emil: my project structure?
06:29 PM polymorph: prefixes
06:29 PM Roomsaver: "verification error; first mismatch at byte 0x0000" welp
06:29 PM Emil: wat
06:29 PM polymorph: i mean the compiler and tools
06:30 PM Emil: Roomsaver: hey
06:30 PM Emil: AT90S8515
06:30 PM Emil: try that one
06:30 PM Emil: -p AT90S8515
06:30 PM Emil: or all lowercase
06:31 PM Roomsaver: gave same "wrong signature" error from before
06:31 PM Emil: what are the exact commands you are trying?
06:32 PM Roomsaver: avrdude -p AT90S8515 -c arduino -P /dev/ttyUSB0 -b 115200 -U flash:w:/home/roomsaver/Downloads/r7.hex
06:33 PM polymorph: polprog: btw did you check the makefile i showed?
06:33 PM polymorph: you can type make to make the blinker
06:33 PM polymorph: at least on linux...
06:33 PM Emil: Roomsaver: dunnolol then :D what did you use to compile it?
06:34 PM Roomsaver: uhhh i just used sudo apt-get install avrdude
06:34 PM polymorph: polprog: and can do make burn; make burn_fuse; make verify; make read; make chiperase;
06:35 PM Emil: Roomsaver: could be borked, have you fucked with the device?
06:36 PM Roomsaver: the gbxcart rw or my arduino?
06:36 PM Emil: avrdude -p atmega8515 -c arduino -P /dev/ttyUSB0 -b 115200 -U flash:w:/home/roomsaver/Downloads/r7.hex doesn't work?
06:36 PM Emil: Roomsaver: wait wat
06:36 PM Emil: stop
06:36 PM Emil: What are you flashing
06:36 PM Emil: what is connected where
06:36 PM Emil: GBxCart RW has its own serial port on device
06:36 PM Roomsaver: My arduino (flashed with arduinoisp) is plugged into my laptop (running debian) through the usb port
06:36 PM Emil: Roomsaver: and your GBxCart RW?
06:37 PM Roomsaver: my GBxCart RW is plugged into the ISCP port on my arduino
06:37 PM Emil: Bruh
06:37 PM Emil: why
06:37 PM Emil: why the fuck would you do this to me
06:37 PM Emil: :D
06:37 PM Roomsaver: i'm trying my best ;(
06:38 PM polprog: nighto
06:38 PM Emil: Roomsaver: you need to burn the isp sketch onto your arduino first
06:38 PM Emil: but
06:38 PM Emil: you don't even need the arduino
06:38 PM Roomsaver: Because?
06:38 PM Emil: if your GBxCart RW has a bootloader
06:38 PM Emil: dunno if it has
06:38 PM Roomsaver: It doesn't
06:39 PM Emil: lulz shit
06:39 PM Roomsaver: It's fw R2, no bootloader
06:39 PM Emil: Flash the ISP sketch onto your arduino
06:39 PM Emil: you can do it from the arduino ide directly
06:40 PM Emil: then do avrdude -p atmega8515 -c avrisp -P port -b baudrate -U flash:w:/home/roomsaver/Downloads/r7.hex
06:40 PM Roomsaver: okok very very dumb question but i just want to verify: clicking "Upload", is that the same as flashing it....
06:41 PM Emil: yes
06:41 PM Emil: And you need to check that you have the correct board et cetera
06:41 PM Emil: your board is the arduino board
06:42 PM Emil: not the GBxCart RW
06:42 PM Roomsaver: Yes, "Arduino/Genuino Uno"
06:42 PM Emil: Then once it has succesfully flashed the isp software onto your arduino do the command above
06:42 PM Emil: Good
06:42 PM Roomsaver: and should I select "Arduino as ISP" for programmer?
06:42 PM Emil: also wait
06:42 PM Emil: wat
06:43 PM Emil: no
06:43 PM Roomsaver: I was following https://www.arduino.cc/en/Tutorial/ArduinoISP this and it said to change it
06:43 PM Emil: you are just flashing a normal code into your arduino board
06:43 PM Emil: Roomsaver: yeah if you are using the the ide
06:43 PM Roomsaver: so what do i want for programmer
06:43 PM Emil: but we aren't
06:43 PM Emil: nothing
06:43 PM Emil: does't matter
06:44 PM Roomsaver: alright
06:44 PM Roomsaver: that's done, i'll run that command then
06:44 PM Emil: And
06:44 PM Emil: change
06:44 PM Emil: the
06:44 PM Emil: baudrate
06:44 PM Emil: to 19200
06:45 PM Emil: Arduino IDE is retarded in that it _only_ allows you to burn a bootloader with those programmers and after that all must go through the serial port.
06:45 PM Emil: This is why you are using avrdude directly: you must program application code
06:45 PM Emil: through the avrisp
06:46 PM Emil: Roomsaver: does it work?
06:46 PM Roomsaver: so i want -c avrisp and not -c arduino
06:46 PM Emil: yes
06:47 PM Roomsaver: laptop died. amazing. i'll need a few minutes
06:48 PM Emil: Heh
06:52 PM Emil: Does it work?
06:54 PM Roomsaver: I've lost the charger, my luck is amazing
06:59 PM day__ is now known as day
07:01 PM Roomsaver: currently still searching, ill let you know when i find it
07:10 PM Roomsaver: Found one, i'll run the command after it starts up
07:36 PM Emil: Well?
07:49 PM Roomsaver: Not the right charger! Doesn't supply enough current so it dies if i try to turn it on. I've got to go but I'll try the command tomorrow after it charges. I'll try to remember to come on here at 7 PM EST
07:55 PM Roomsaver: Nevermind, that ac adapter wasn't even charging. I'll have to order another one. Thanks so much for your help, I'll try running that command and if it doesn't work then I'll end up just buying a new one
07:58 PM Roomsaver: a new GBxCart RW, that is
09:19 PM day__ is now known as day
11:07 PM day__ is now known as day