#avr | Logs for 2016-07-09

Back
[03:56:00] <shevek> I'm writing a program in atmel avr assembly and am assembling it with avr-gcc on Debian GNU/Linux. I can convert it to a .o file, but it doesn't put in the references (all are internal), so I think I need to link it, but the linker complains: "avr-ld: avr:6 architecture of input file `logic-analyzer.o' is incompatible with avr output". How can I get a file with working references?
[03:56:10] <shevek> "file logic-analizer.o" gives "logic-analyzer.o: ELF 32-bit LSB relocatable, Atmel AVR 8-bit, version 1 (SYSV), not stripped"
[04:04:46] <DKordic> shevek: Pastes?
[04:15:22] <shevek> DKordic: Sure; what do you want to see?
[04:15:31] <shevek> The output of make?
[04:16:56] <shevek> http://pastebin.com/kLDU87wQ
[04:21:47] <shevek> Note that I don't actually want to link anything; I just added the avr-ld step in the hope that it would resolve my references. But the file is standalone, all references are internal.
[04:22:03] <shevek> And I'm using .org statements, so there is also no relocatable code in there.
[04:22:52] <shevek> If I skip the avr-ld command and use avr-objcopy to convert it to an intel hex file, the output looks good, except the jumps are all zero.
[04:31:13] <DKordic> shevek: Try ``$ avr-gcc -mmcu=atmega2560 -c logic-analyzer.S''. What ``$ file logic-analyzer.o'' returns?
[04:31:51] <DKordic> Of course rename ``logic-analyzer.asm'' to ``logic-analyzer.S''.
[04:32:01] <DKordic> What is ``avr-cpp''?
[04:32:45] <shevek> I did that, but then make used internal rules and I cheated this way to avoid that.
[04:33:06] <shevek> avr-cpp is the preprocessor, it removes // and /* */ comments and implements #define.
[04:33:22] <shevek> It's the same preprocessor that is used for C programs.
[04:35:42] <DKordic> shevek: So what is the result?
[04:36:32] <shevek> The same file as the input, with all #defined constants substituted, #included files inlined and comments removed.
[04:37:14] <DKordic> shevek: So You can do it without `make'?
[04:37:44] <shevek> Sure, make is just a tool to run the commands for me. It says what it does, if I run the commands it prints manually, there is no difference.
[04:38:47] * l9 hates strangers using his computer.
[04:38:50] <DKordic> Where is the problem, then?
[04:39:25] <DKordic> l9: What happened?
[04:39:39] <DKordic> l9: Did You solved the loader problem?
[04:41:17] <shevek> DKordic: If I don't use avr-ld, I get a file which starts with 0xc000, which is rjmp .+0, while the code says it should jump to the reset function. If I do try to use ld, it gives the error.
[04:41:24] <DKordic> shevek: Does ``$ avr-gcc -mmcu=atmega2560 logic-analyzer.S'' work? If not, I You could paste `logic-analyzer.S'.
[04:42:03] <shevek> DKordic: it doesn't, the file doesn't have a main function and shouldn't be linked to any libraries. Sure, I'll paste the code, one moment.
[04:43:21] <l9> DKordic: well my ex wifes hubby was over and he touched my computer for a hour today i had too reboot, no i didnt solve the problem wonder why it is happening. I had it up on a raspberry and it now see the chip tho
[04:44:00] <shevek> DKordic: http://pastebin.com/0YAqesJM
[04:44:35] <l9> do not ever let anyone use your desktop i have learned today. my computer rebels against stupid people i think :P
[04:48:53] <shevek> DKordic: running avr-gcc gives "(.text+0xe0): relocation truncated to fit: R_AVR_7_PCREL against `no symbol'". It also gives an undefined reference to main, but I can remove that with -nostdlib.
[04:55:18] <shevek> Hmm, it seems that was just a branch label out of range. The error could be made more clear, but it seems to work now. Thanks!
[07:54:14] <Guest_84742> Allah is doing
[07:54:21] <Guest_84742> sun is not doing Allah is doing
[07:54:28] <Guest_84742> moon is not doing Allah is doing
[07:54:37] <Guest_84742> stars are not doing Allah is doing
[07:54:45] <Guest_84742> planets are not doing Allah is doing
[07:54:53] <Guest_84742> galaxies are not doing Allah is doing
[07:55:00] <Guest_84742> oceans are not doing Allah is doing
[07:55:12] <Guest_84742> mountains are not doing Allah is doing
[07:55:22] <Guest_84742> trees are not doing Allah is doing
[07:55:29] <Guest_84742> mom is not doing Allah is doing
[07:55:37] <Guest_84742> dad is not doing Allah is doing
[07:55:46] <Guest_84742> boss is not doing Allah is doing
[07:55:55] <Guest_84742> job is not doing Allah is doing
[07:56:04] <Guest_84742> dollar is not doing Allah is doing
[07:56:13] <Guest_84742> dollar is not doing Allah is doing
[07:56:23] <Guest_84742> degree is not doing Allah is doing
[07:56:31] <Guest_84742> medicine is not doing Allah is doing
[07:56:55] <Guest_84742> customers are not doing Allah is doing
[07:57:45] <Guest_84742> you can not get a job without the permission of allah
[07:58:03] <Guest_84742> you can not get married without the permission of allah
[07:58:26] <Guest_84742> nobody can get angry at you without the permission of allah
[07:58:41] <Guest_84742> light is not doing Allah is doing
[07:58:51] <Guest_84742> fan is not doing Allah is doing
[07:58:53] <l9> yeah and my mom speaks with your mom
[07:59:05] <Guest_84742> businessess are not doing Allah is doing
[07:59:21] <Guest_84742> america is not doing Allah is doing
[07:59:30] * l9 op ?
[07:59:37] <Lambda_Aurigae> what the fuck is going on?
[08:00:43] <Guest_84742> fire can not burn without the permission of allah
[08:00:49] <Lambda_Aurigae> you claim allah is doing something
[08:00:52] <l9> something isnt doing allah is doing
[08:00:54] <Lambda_Aurigae> PROVE IT!
[08:00:57] <Lambda_Aurigae> or shut the fuck up.
[08:01:13] <l9> bot i recond
[08:01:41] <Guest_84742> knife can not cut without the permission of allah
[08:02:08] <Lambda_Aurigae> someone ban this idiot please?
[08:02:28] <l9> 14:32:33 ** l9 op ?
[08:02:43] <l9> why did you think i asked after one?
[08:03:06] <Guest_84742> rulers are not doing Allah is doing
[08:04:12] <Snert> fuck mohammed. and allah.
[08:04:20] <Snert> and YOU.
[08:04:26] <Guest_84742> governments are not doing Allah is doing
[08:05:37] <Guest_84742> sleep is not doing Allah is doing
[08:05:46] <Guest_84742> hunger is not doing Allah is doing
[08:05:50] <l9> Allah is doing no good in this channel. Snert is
[08:06:41] <Guest_84742> food does not take away the hunger allah takes away the hunger
[08:07:02] <Guest_84742> water does not take away the thirst Allah takes away the thirst
[08:07:06] <Snert> suck my fucking cock, mohammed.
[08:07:14] <Guest_84742> seeing is not doing Allah is doing
[08:07:26] <Guest_84742> hearing is not doing Allah is doing
[08:07:35] <Guest_84742> seasons are not doing Allah is doing
[08:07:45] <Guest_84742> weather is not doing Allah is doing
[08:07:55] <Guest_84742> humans are not doing Allah is doing
[08:08:04] <Guest_84742> animals are not doing Allah is doing
[08:08:20] <Guest_84742> the best amongst you are those who learn and teach quran
[08:09:02] <Guest_84742> one letter read from book of Allah amounts to one good deed and Allah multiplies one good deed ten times
[08:09:39] <Snert> go blow yourself up, asswipe.
[08:09:51] <LeoNerd> Oh it's this chap. Was spamming in #neovim the other day
[08:09:58] <LeoNerd> Looks like the same script too
[08:10:00] <Guest_84742> hearts get rusted as does iron with water to remove rust from heart recitation of Quran and rememberance of death
[08:10:25] <Lambda_Aurigae> reported to Swant in #freenode
[08:11:24] <Guest_84742> heart is likened to a mirror
[08:11:41] <Guest_84742> when a person commits one sin a black dot sustains the heart
[08:13:43] <Guest_84742> to accept Islam say that i bear witness that there is no deity worthy of worship except Allah and Muhammad peace be upon him is his slave and messenger
[08:15:30] <osteri> it's absolutely haram to spam
[08:17:00] <Guest_84742> read book http://www.fazaileamaal.com
[08:17:22] <Guest_84742> read book http://www.muntakhabahadith.com
[08:18:21] <Lambda_Aurigae> morning guys.
[08:18:22] <Guest_84742> need spiritual teacher visit http://www.alhaadi.org.za
[08:19:00] <Guest_84742> allah created the sky without any pillars
[08:19:11] <e> are you sure you're not a bot
[08:19:24] <Lambda_Aurigae> I'm definitely a bot...tried and true.
[08:19:56] <Lambda_Aurigae> wrote my code myself even!
[08:20:03] <e> that's quite the feat
[08:20:05] <Lambda_Aurigae> :}
[08:20:09] <e> have you ever fallen on your batteries
[08:20:27] <Lambda_Aurigae> no, but put my recharger plug in the wrong orifice once...that was shocking!
[08:20:42] * e laughs reluctantly
[08:21:03] <Guest_84742> Allah makes the sun rise from the east and Allah makes the sun set in the west
[08:21:27] <e> sorry Guest_84742 but if you don't let me know you are not a bot i will have to kill you with fire
[08:21:30] <e> i hate doing that
[08:21:36] <e> hurts me more than it hurts you and all that
[08:21:41] <Lambda_Aurigae> hehe.
[08:21:55] <Lambda_Aurigae> we have been getting those posts for half an hour now.
[08:22:13] <Lambda_Aurigae> thank you muchly.
[08:27:02] <antto> o_O
[08:32:58] <antto> allah is not doing, santa claus is doing
[08:33:03] <antto> am i doin it rite?
[08:33:52] <antto> now, what to use to protect a digital IO pin from outside?
[08:34:42] <antto> ehm, i'm asking for ins and outs, but not both at the same time
[08:40:14] <Lambda_Aurigae> antto, use allah.
[08:40:39] <antto> where do i buy? i need like.. 6 or 8 maybe
[08:40:48] <LeoNerd> antto: if it doesn't have to source/sink much current and it's connected externally, I usually put a smallish resistor on there
[08:40:51] <LeoNerd> 220R or so
[08:40:57] <Lambda_Aurigae> apparently you only need 1...it's multi-i/o
[08:41:28] <antto> for the output case, i need it to drive
[08:41:48] <LeoNerd> Output via a transistor maybe? or some logic buffer chip?
[08:42:25] <antto> ah, i forgot to mention that i'll be using it on clock/data signals.. well, for driving 74hc165 shift registers
[08:42:25] <Lambda_Aurigae> there are bi-directional bus driver chips.
[08:43:16] <antto> the shift registers are on an external board, and bad things might happen there, so connecting that to the main board tends to fry the pins on the poor xmega
[08:43:36] <antto> i'd rather fry something else instead
[08:43:37] <Lambda_Aurigae> do you have any pins that are both input and output?
[08:43:44] <LeoNerd> If you're just talking SPI-alike to shift registers, you're not driving large currents
[08:43:45] <antto> nope
[08:43:48] <LeoNerd> So an inline resistor is fine
[08:43:54] <Lambda_Aurigae> then it's easy.
[08:44:03] <LeoNerd> 220R inline at 5V means at most abut 3mA, which is well within what the xmega port can drive
[08:44:07] <Lambda_Aurigae> uln2804
[08:45:12] <Lambda_Aurigae> or any of a number of buffer chips.
[08:46:14] <Lambda_Aurigae> 74244, 74125
[08:46:26] <Lambda_Aurigae> I use those for protecting parallel port on PC.
[08:46:33] <antto> nice
[08:46:46] <antto> btw, xmega can't do 5V, so it's 3V
[08:46:47] <Lambda_Aurigae> 7407 if you just need buffer/driver without tri state
[08:46:54] <Lambda_Aurigae> so get 3.3V versions.
[08:46:55] <LeoNerd> OK so at 3V it's even *less* current
[08:47:01] <LeoNerd> Seriously
[08:47:04] <LeoNerd> Are you even listening to me?
[08:47:25] <antto> LeoNerd i am, but i think putting a resistor might make this more prone to noise
[08:47:34] <LeoNerd> Shouldn't do
[08:47:55] <LeoNerd> 220R or even 100R is still very small resistance as compared to induced EMF
[08:48:33] <LeoNerd> You'd have to be up in the 10s or even 100s of kohm before any amount of induced noise is going to get past that
[08:48:51] <LeoNerd> Well.. maybe unless your signal cable is miles long and wrapped around a power station or something
[08:49:01] <Lambda_Aurigae> sn74ac244...down to 2V
[08:49:22] <LeoNerd> Putting a buffer chip alone in the way doesn't really change the problem
[08:49:32] <LeoNerd> Now a short will just destroy the buffer chip -instead- of the xmega
[08:49:48] <Lambda_Aurigae> true.
[08:49:49] <LeoNerd> Whereas, that 100R resistor means that a short is now only capable of sourcing/sinking 3mA which won't destroy anything
[08:50:02] <Lambda_Aurigae> you could do an opto-iso in place.
[08:50:25] <LeoNerd> ... OK so now a short destroys the opto :)
[08:50:29] <antto> there's up to 12V on the other board and relays with 220V
[08:50:46] <Lambda_Aurigae> ok, so 2 inch air gap opto!
[08:51:01] <antto> that's an option too
[08:51:10] <antto> i'll think about all of these, much thanks
[08:51:16] <Lambda_Aurigae> laser diode, fiber cable, phototransistor.
[09:31:18] <LeoNerd> Hrm.. four "identical" HVSP adapter boards here. I say "identical", because of the four only three actually work.
[09:33:17] <LeoNerd> Last board reads random junk as the signature of a tiny85. Mooostly works on a tiny84, but sometimes reads all zeroes
[10:04:03] <Casper> maybe the boost converter is marginal on them
[10:04:10] <Casper> on the faulty one that's it
[10:05:46] <LeoNerd> Yah.. a number of possible thoughts. I may have to get the scope on it and watch
[10:08:08] <Casper> side note: a client came to the store this morning: "My laptop fan is faulty, how much and when"... check... fan is available only in the usa, so a big 2 week
[10:08:48] <Casper> the store close for 2 week, we take the last of this month and the next week after it (construction break here)
[10:08:57] <Casper> that leave exactly 2 week for it to come...
[10:09:37] <Casper> but wait, the picture of the fan look very simmilar to this one I have stock... guess what! order error back then, it is the right fan!
[10:36:09] <julius_> hi
[10:37:42] <julius_> i remember talking to somebody here (german) that he does work in the computer security field. avr as a hobby and for "device penetration" testing of what that is called...anybody knows who im talking about? just need some book advice for my thesis
[11:00:47] <doev> hi
[11:01:43] <doev> I like to use a isp programmer without the power source. What exactly do I need to change? Only remove the connectors for VCC and GND?
[11:08:01] <LeoNerd> Mmm?
[11:13:20] <Casper> doev: only VCC
[11:13:45] <Casper> GND is also the reference voltage for the signals
[11:17:11] * l9 thanks e
[11:25:09] <doev> Casper, hmm read it to late. It works without VCC and GND ... but connection GND is recommend?
[11:39:06] <Casper> gnd is mandatory
[11:39:32] <Casper> it may work without due to the protections in the avr
[11:40:51] <Casper> basically, there is some diodes on the signal lines, if a voltage is lower than gnd then it redirect it to gnd to avoid damage. Indirectly, it provide your ground... via the clock or reset line or something... not good...
[11:42:52] <doev> ok, thx
[11:59:07] <doev> _delay_ms is not very accurate.
[11:59:40] <antto> it's better than nothing tho
[12:01:26] <doev> can I adjust it with an external clock?
[12:01:58] <doev> 60s are 63s in real
[15:33:21] <l9> changed from ubuntu too raspbian and the print out changed too this http://paste.debian.net/779941/
[15:35:10] <l9> do i need too drag the board outside and show my friggen shotgun to it? and get a new one or ?
[15:35:56] <inkjetunito> l9: programmer not working when plugged on an rpi?
[15:36:14] <l9> yeha
[15:36:24] <l9> even worse on ubuntu
[15:36:35] <inkjetunito> could it be a power issue?
[15:36:56] <l9> vcc gnd 4.99
[15:40:44] <l9> that unknown status 0x00 where is it coming from the chip or the mkII
[15:42:58] * l9 gone for a deep state of meditation
[15:43:34] <inkjetunito> maybe you'll meet your programmer there :D
[16:13:03] <Jartza> allo
[16:15:15] <inkjetunito> hej
[18:52:44] <Jartza> hmm
[19:02:18] <Lambda_Aurigae> B flat...have another pot of coffee...we need a C#
[19:13:28] <Thrashbarg> lol