#avr Logs

Jun 15 2017

#avr Calendar

01:56 AM Emil: eh?
01:58 AM wirts-leg: hello Emil
01:58 AM Emil: wirts-leg: morning
04:27 AM polprog: kre10s: is the boot console still present on the hw uart?
06:29 AM kre10s: polprog: got it working. Turns out that on the zero there is no ttyS0 it only has ttyAMA0 so I was just looking for the wrong thing.
06:30 AM kre10s: funny thing is wvdialconfig doesn't let you set what tty to probe, and it only probes the ttySn ... so i made a symlink.
07:12 AM noHitW_work: wiring pi is a good c library for pi
07:12 AM noHitW_work: i used the i2c interface with it
08:00 AM JanC_ is now known as JanC
09:17 AM rue_house: Pi is a proprietory processor or an arm?
09:17 AM rue_house: or is it an arm in a proprietory chip
09:17 AM Lambda_Aurigae: it's an arm SOC
09:17 AM Lambda_Aurigae: with integrated GPU
09:18 AM Lambda_Aurigae: needs a couple of binary blobs to work. One for the GPU and I think another for the boot.
09:46 AM skz81: <noHitW_work> wiring pi is a good c library for pi >> ArPino ? ^^
09:46 AM noHitW_work: ?
09:48 AM skz81: wiring is the base project of the Arduino API. You didn't realize it was very similar ? pinMode(), digitalWrite(), delay(), and so on
09:49 AM skz81: If you look into Arduino lib sources, you'll find a wiring.c file (that contain the implementation of those functions)
09:50 AM noHitW_work: no
09:50 AM noHitW_work: it just uses similar naming convention
09:51 AM noHitW_work: " It’s designed to be familiar to people who have used the Arduino “wiring” system"
09:52 AM noHitW_work: Arduino is really two things; one is a hardware platform, the other software, and part of the software is a package called Wiring. Wiring is the core of the input and output for the Arduino, so I thought it would be good to replicate that functionality (or a good usable subset with Raspberry Pi extensions) on the Raspberry Pi.
09:53 AM noHitW_work: other than that, it has nothing to do with wiring/arduino
10:22 AM skz81: noHitW_work, OK..... But let me rephrase your answer shorter : "no it's totally different ! But actually, it's quite similar". Nah, anyway, I was ironic in the first place. Further I did *NOT* state wiring pi was based on wiring (on which is based Arduino).
10:23 AM skz81: But I must admit, that was my first guess
10:27 AM skz81: <Lambda_Aurigae> needs a couple of binary blobs to work. One for the GPU and I think another for the boot. >> there is an optionnal one for DRM iirc
11:12 AM renn0xtk9: I managed to upload a programm with dragon_isp on an atmega 328P
11:13 AM renn0xtk9: it un well (except it blink a led every 8 seconds instead of every 1) but I guess I got to use a quartz for it.
11:13 AM renn0xtk9: When I wen to reupload a programm on the same chip with the same dragon_isp, same programm same everything it won't work
11:14 AM renn0xtk9: saying avrdude: jtagmkII_setparm(): bad response to set parameter command: RSP_DEBUGWIRE_SYNC_FAILED
11:14 AM LeoNerd: 8 seconds instead of 1 sounds like a CKDIV8 fuse being different to how you imagine
11:15 AM LeoNerd: Isuggset always starting your program with a write into the clock prescalar register, so you're not dependent on that fuse
11:15 AM LeoNerd: I've been upset too often by that now
11:16 AM renn0xtk9: LeoNerd could that also be the reasons why I can not upload a programm on the chip anymore?
11:18 AM LeoNerd: I doubt so
11:18 AM LeoNerd: Oh you're using dW? I've no idea on that
11:20 AM renn0xtk9: LeoNerd, I suspect something like that but don't even understand what is debugWire (i read it everywhere without any explanation) I plug it like that http://www.atmel.com/webdoc/avrdragon/avrdragon.SCKT3200A2.html
11:20 AM LeoNerd: I'd suggest using ISP instead then
11:23 AM renn0xtk9: LeoNerd Figure 12, isn't it ISP already ?
11:24 AM LeoNerd: Iam guessing purely from your error message
11:24 AM LeoNerd: RSP_DEBUGWIRE_SYNC_FAILED <== DEBUGWIRE
11:24 AM LeoNerd: Clue's in the name
11:27 AM renn0xtk9: I am issuing sudo avrdude -pm328p -Pusb -cdragon_isp -B5 -Uflash:w:blink.hex -vvv < is there a way no tell avrdude to do pure isp without debugwire?
11:28 AM LeoNerd: I'd imagine dragon_isp does mean ISP then
11:28 AM LeoNerd: Also why sudo?
11:28 AM LeoNerd: *sigh* nevermind
11:30 AM renn0xtk9: sudo otherwise it says can't access usb port
11:30 AM renn0xtk9: I believe it must be related to the dwen fuse somehow http://www.atmel.com/webdoc/avrdragon/avrdragon.section.gsr_osd_lc.html
11:30 AM renn0xtk9: but don't undersatnd more than that
11:31 AM renn0xtk9: aka how to clear the lockbits or etc
11:31 AM LeoNerd: lockbits aren't fuses
11:33 AM renn0xtk9: don't understand
11:34 AM renn0xtk9: there is nowhere any clear explanation on the web
11:34 AM LeoNerd: AVR chips have a thing called lock bits
11:34 AM LeoNerd: AVR chips have a thing called fuses
11:34 AM LeoNerd: These are two separate things
11:34 AM LeoNerd: Given your command above I personally have no idea why it's even attempting dW given you asked it to perform ISP. Maybe it's a dragon thing. Or an avrdude+dragon thing. No idea
11:35 AM LeoNerd: The usual way I do that sort of programming is straight-up simple ISP with any old ISP-only programmer.. and that works just fine
11:35 AM LeoNerd: What may have happened is that for some odd reason you've bumped the DWEN fuse the wrong way, so now your chip is talking dW inadvertantly, and the dragon has somehow noticed this and is trying to back that out
11:35 AM LeoNerd: Random guess
11:36 AM renn0xtk9: Yes I get from there https://www.mikrocontroller.net/articles/DebugWIRE
11:37 AM renn0xtk9: that is it I programm the fresh mcu in isp mode at first. And somehow it bumped the dwen fuses, indeed an apparently when that fuse is on , the ISP interface is not available anymore on ATMEGA
11:38 AM LeoNerd: That sounds odd
11:38 AM LeoNerd: But also don't forget that fusers are upsidedown
11:39 AM LeoNerd: A fuse whose value is (1) is off, and whose value is (0) is on
11:39 AM renn0xtk9: yeah
11:39 AM renn0xtk9: The only way to rebump it might be high voltage programming no?
11:41 AM LeoNerd: Or dW
11:41 AM LeoNerd: Given you ave the dragon there
11:41 AM LeoNerd: There is a dW command to disable dW again and return to ISP mode
11:41 AM LeoNerd: Which I suspect is exactly what it's attempting tod o
11:46 AM renn0xtk9: yes apparently from the man command
11:46 AM renn0xtk9: and not succeeding for some reason
11:48 AM renn0xtk9: LeonNerd where do you see that dW command? i don't have this on avrdude
12:00 PM LeoNerd: Hmwha?
12:01 PM LeoNerd: I mean the actual debugWire protocol itself has such a command
12:01 PM LeoNerd: Whether or not avrdude gives you access to it I have no idea
12:01 PM LeoNerd: As I already said; I've only ever used avrdude to talk ISP with generic ISP hardware.. or occasionally the avr109 UART method
04:38 PM Emil: LeoNerd: who were you talking to?
04:39 PM Emil: Might as well unignore them
05:37 PM mark4_: so i selected the use rjmp/rcall option in the project config and now bulding gives me an error about unknown command line -mshort-calls
05:37 PM mark4_: wtf
05:42 PM Casper: is that an arduinono question?
05:42 PM Lambda_Aurigae: nowhere..clear...explanation.....someone hasn't read the datasheet...it explains isp and debugwire and fuses and lock bits....and, yes, I'm hours and hours late for the conversation.
05:43 PM mark4_: no
05:44 PM mark4_: casper... me?
05:44 PM Casper: ya you
05:44 PM mark4_: no: im compiling code for an avr and ive selected the "use short jump/call" in the project config
05:44 PM mark4_: under optimizations
05:44 PM mark4_: check the selector box for that and it wont build because gcc does not know the switch that that option adds
05:45 PM mark4_: go into project properties
05:45 PM mark4_: toolchain... gcc... optimizations...
05:45 PM Lambda_Aurigae: hmmm...no project properties on my command line.
05:45 PM Emil: Is mark4_ still using obsole tech?
05:45 PM mark4_: you are not using avr studio
05:45 PM mark4_: emil? what?
05:45 PM Lambda_Aurigae: of course not.
05:45 PM Lambda_Aurigae: it won't run on linux
05:45 PM Emil: mark4_: are you still using an old version of avr studio
05:45 PM mark4_: im using avr studio 7
05:46 PM Emil: Alrighty
05:46 PM Lambda_Aurigae: nope,,,you aren't
05:46 PM Lambda_Aurigae: you are using "Atmel Studio 7"
05:46 PM Lambda_Aurigae: there is no "AVR Studio 7"
05:46 PM mark4_: ya same diff
05:46 PM * Lambda_Aurigae is in the mood to be a royal pain.
05:46 PM Emil: Now move to a cli toolchain :)
05:46 PM mark4_: cant: not my call
05:47 PM mark4_: or i would be doing this from a bash shell in linux
05:47 PM Emil: Just do it
05:47 PM Lambda_Aurigae: so, just don't use the rjmp/rcall option.
05:47 PM Emil: and pretend you are doing it from it
05:47 PM Emil: No one will know
05:47 PM mark4_: no. i want the compiler to NOT use jmp xxxxxxxx when it can use rjmp xxxx
05:48 PM Emil: eh
05:48 PM Emil: are you sure it's generating codel ike that?
05:48 PM Emil: It shouldn't be
05:48 PM Lambda_Aurigae: apparently the compiler version you have installed doesn't support that option.
05:48 PM mark4_: it is
05:48 PM Emil: But realy
05:48 PM Emil: is the perf hit that critical?
05:48 PM mark4_: 0e 94 aa 00 call x0154
05:48 PM Lambda_Aurigae: if it is giving an error on said option.
05:49 PM Lambda_Aurigae: the exact command line being used to call the compiler and the exact error code would help people to figure out the problem too.
05:52 PM mark4_: hang on getting that info
05:53 PM Lambda_Aurigae: like going to the doctor and telling him, "I put on this shoe and my foot hurts."
05:53 PM Lambda_Aurigae: well, what shoe and which foot and where does it hurt?
05:53 PM mark4_: "C:\Program Files (x86)\Atmel\Studio\7.0\toolchain\avr8\avr8-gnu-toolchain\bin\avr-gcc.exe" -x c -funsigned-char -funsigned-bitfields -DDEBUG -I"C:\Program Files (x86)\Atmel\Studio\7.0\Packs\atmel\ATmega_DFP\1.2.132\include" -Os -ffunction-sections -fdata-sections -fpack-struct -fshort-enums -mshort-calls -g2 -Wall -mmcu=atmega324pb -B "C:\Program Files (x86)\Atmel\Studio\7.0\Packs\atmel\ATmega_DFP\1.2.132\gcc\dev\atmega324pb" -c -std=gnu99 -save-temps -MD
05:53 PM mark4_: -MP -MF "eeprom.d" -MT"eeprom.d" -MT"eeprom.o" 7 -o "eeprom.o" ".././eeprom.c"
05:53 PM mark4_: thats the command thats run
05:54 PM mark4_: error is "unrecognized command line option '-mshort-calls'
05:54 PM Lambda_Aurigae: and what version of avr-gcc do you have installed?
05:54 PM mark4_: the -mshort-calls is put into the command line by selecting that optimization
05:54 PM mark4_: erm how do i check?
05:54 PM Lambda_Aurigae: avr-gcc -version
05:54 PM Lambda_Aurigae: same way you would on linux
05:54 PM mark4_: yea i didnt know it was in my path lol
05:54 PM mark4_: hang on
05:55 PM Lambda_Aurigae: sorry
05:55 PM Lambda_Aurigae: avr-gcc --version
05:55 PM Lambda_Aurigae: on linux
05:55 PM mark4_: cant cut and paste but it sayus gcc-4.3.3
05:55 PM Lambda_Aurigae: not sure on the windows thingie
05:55 PM mark4_: ugh no
05:55 PM mark4_: thats winavr wich i thought i had uninstalled
05:55 PM mark4_: thats NOT whats building this
05:55 PM mark4_: hang on
05:56 PM mark4_: winavr now uninstalled. avr-gcc no longer in path on command line. searching for it, adding to path
05:58 PM mark4_: ok avr-gcc is version 5.4.0
05:58 PM Lambda_Aurigae: -mshort-calls is obselete
05:58 PM Lambda_Aurigae: use -mrelax
05:59 PM mark4_: then why are both options still in there
05:59 PM Lambda_Aurigae: or use an older version of avr-gcc with atmel studio
05:59 PM mark4_: let me try that
06:00 PM mark4_: yup that fixed it
06:02 PM Lambda_Aurigae: so, atmel studio is broken.
06:02 PM mark4_: i just made my first ever use of GPIORn in my own code lol
06:03 PM mark4_: i copied the USART_Flush code out of the data sheet which creates a variable to read the uart rx data into and then ever does anything with the received data. that generages a warning. i changed the code to have the rx data be put into gpior0 instead:P~
10:32 PM theBear is now known as theBearBear
10:32 PM theBearBear is now known as theBear
10:49 PM Tachyon` is now known as Tachgrawr
11:52 PM day__ is now known as daey