#avr | Logs for 2016-12-11

Back
[05:37:09] <deepbluv> hi ,I have this code anf faike to comile it.woukd anydone do it foe me please?the target is AT90s1200
[05:37:34] <deepbluv> hi ,I have this code and failed to compile it.woukd anydone do it foe me please?the target is AT90s1200
[05:37:54] <specing> lol if you can't even get it to compile...
[05:38:45] <deepbluv> specing: so what?
[05:43:17] <deepbluv> specing: here http://www.avr-tutorials.com/projects/atmega16-based-digital-clock
[05:45:17] <deepbluv> specing: no,I can dot the rest.only compilation is needed
[05:45:27] <deepbluv> do *
[05:45:59] <antto> i don't think that'll work on your chip
[05:47:36] <deepbluv> antto: I read in avr-gcc manual that thei is othe options though the chip is s not supported by gcc
[05:49:10] <deepbluv> antto: at least you can make an assembly out of it,I guess
[05:49:30] <antto> and then what?
[05:49:51] <deepbluv> te assembler supports the chip
[05:50:17] <antto> well no idea about that
[05:50:29] <deepbluv> it's in the manual
[05:50:34] <antto> isn't it just easier to use another chip?
[05:50:55] <antto> for example, the chip which the code is meant for
[05:51:03] <deepbluv> no,their is no other chip available
[05:51:50] <specing> Ah, you are the one from egypt that wanted to save money by using an obsolete AT90?
[05:51:58] <deepbluv> tght
[05:52:02] <deepbluv> yep
[05:52:08] <deepbluv> it's me
[05:52:12] <specing> I guess it was cheap for a reason :)
[05:52:37] <deepbluv> we're kindof stupid at my olace :)
[05:52:46] <deepbluv> we're kindof stupid at my place :)
[05:53:11] <specing> you don't say
[05:53:52] <antto> i also work at a place where we tend to do stupid things
[05:54:06] <deepbluv> no,really I mean it.if you can't get a peice of code compiked then this is what you are
[05:54:26] <antto> this should compile with avrgcc
[05:54:58] <antto> you'll get a .elf file, from which you can get a .hex
[05:54:58] <deepbluv> I tried but only to get errors.and a lot of it
[05:55:13] <antto> then it needs some adjustments
[05:55:34] <antto> but even if you compile it - you'll have to flash the hex onto the proper chip
[05:55:41] <antto> so that won't really help you
[05:56:20] <antto> in your situation, you're better of finding someone who can code ASM and get him to write a program for your chip from scratch
[05:56:51] <antto> trying to adapt this existing piece of code will probably only get you nowhere
[05:56:53] <deepbluv> antto: what does an elf fike contain?
[05:57:25] <antto> many things, i'm not familiar with the structure
[05:57:31] <antto> check wikipedia
[06:13:41] <deepbluv> antto: here the error message
[06:14:10] <deepbluv> https://paste.debian.net/901670/
[06:20:19] <deepbluv> specing: here the error message: https://paste.debian.net/901670/
[06:40:54] <specing> its the PEBKAC problem again
[06:41:00] <specing> as I expected all along
[06:48:53] <rue_shop3> someone trying to port a clock?
[06:55:20] <carabia> use Ada :D
[06:56:09] <carabia> ada, fubar and marginality both combined in a single unit
[09:04:41] <Lambda_Aurigae> rue_shop3, yeah,,,and it uses output compare which his chip doesn't seem to have.
[10:25:49] <Lambda_Aurigae> just something I found
[10:26:09] <Tom_itx> zlog
[10:31:50] <tunage> Lambda_Aurigae: yeah, my gcc looks a little tangled.
[10:32:48] <Lambda_Aurigae> like, wrong version or something
[10:34:11] <tunage> it looks like a conflict with qt-creator and libqt5-creator. I think I got it.
[10:41:28] <tunage> nope. I got that untangled and same error
[10:48:31] <Lambda_Aurigae> umm...qt shouldn't have anything to do with avr-gcc
[10:54:06] <tunage> I've reinstalled all of avr, gcc and gdb. no conflicts that I can see
[11:00:57] <Lambda_Aurigae> libc and binutils too?
[11:02:57] <tunage> libc isn't even installed. nothing complained about it.. ? o.0
[11:03:03] <Lambda_Aurigae> umm
[11:03:06] <tunage> avr-libc
[11:03:13] <Lambda_Aurigae> how can you compile C without avr-libc installed?
[11:03:51] <Lambda_Aurigae> aahh..you are doing assembly
[11:03:59] <Lambda_Aurigae> ok..how about binutils-avr?
[11:04:00] <tunage> yup
[11:05:01] <tunage> cross-avr-binutils is installed
[11:05:25] <tunage> and binutils
[11:05:36] <Lambda_Aurigae> linux or windows?
[11:05:42] <tunage> linux
[11:05:49] <Lambda_Aurigae> why not use avrasm or avra?
[11:05:49] <tunage> suse 42.1
[11:07:02] <Lambda_Aurigae> I've found using avr-as from avr-gcc set is kinda,,,,not good.
[11:07:57] <tunage> https://bpaste.net/show/617121e6c454
[11:08:50] <Lambda_Aurigae> somehow I think that cross binutils is not the right version.
[11:09:04] <Lambda_Aurigae> for mine I have avr-libc, avr-gcc, and binutils-avr
[11:09:15] <Lambda_Aurigae> I don't see binutils-avr or avr-binutils on your list.
[11:09:49] <Lambda_Aurigae> I use debian and ubuntu...so it might have different names.
[11:10:11] <Lambda_Aurigae> but,,,you should have a comparable binutils-avr or avr-binutils install....the cross versions are different I think.
[11:11:12] <tunage> https://bpaste.net/show/a7df96f8d63b
[11:11:58] * Lambda_Aurigae shrugs
[11:12:37] <Lambda_Aurigae> from your error, there is a compatibility issue between avr-as and avr-ld
[11:16:06] <tunage> why it would be blowing errors from a package manager install, blows my mind. I did do a manual install of Arduino about a week ago, but it only has 1 single asm relevent file. nothing cross related in the entire download
[11:16:37] <Lambda_Aurigae> could cause issues possibly as it installs its own compiler toolchain.
[11:17:06] <tunage> the package manager reinstall 'should' of caught it. any thoughts on how to verify?
[11:17:33] <Lambda_Aurigae> not on suse.
[11:17:48] <Lambda_Aurigae> check versions maybe?
[11:19:32] <tunage> gcc (SUSE Linux) 4.8.5 but how do I check what gcc avr is looking for?
[11:19:34] <Lambda_Aurigae> my avr-as and avr-ld are both the same version
[11:19:42] <Lambda_Aurigae> you aren't using gcc.
[11:19:48] <Lambda_Aurigae> just avr-as and avr-ld
[11:19:52] <Lambda_Aurigae> what are the versions of those?
[11:21:52] <tunage> avr-gcc (GCC) 4.8.3 -> https://bpaste.net/show/d6adadfb471c
[11:22:04] <Lambda_Aurigae> avr-ls -v
[11:22:09] <Lambda_Aurigae> avr-ld -v
[11:22:23] <_ami_> how good is orange pi? i am looking for a cheap media center using orange pi
[11:22:40] <Lambda_Aurigae> _ami_, good as any I suppose....at least from the reviews...
[11:22:48] <Lambda_Aurigae> raspberry pi has more support
[11:22:53] <Lambda_Aurigae> orange pi has more bang I think.
[11:22:57] <tunage> https://bpaste.net/show/d1d443b1920f
[11:23:41] <Lambda_Aurigae> sorry..
[11:23:42] <Lambda_Aurigae> avr-as
[11:23:55] <tunage> I have to bolt for about 30 min brother.
[11:23:57] <_ami_> Lambda_Aurigae: you own a orange pi?
[11:24:31] <_ami_> it has so many models. confusing a bit initially.
[11:24:51] <_ami_> i heard one of model can provide 4k video.
[11:25:09] <Lambda_Aurigae> you seem to have a problem with relro
[11:25:09] <tunage> https://bpaste.net/show/e6418c230f7f
[11:25:57] <Lambda_Aurigae> _ami_, I have an rPI
[11:26:04] <Lambda_Aurigae> have researched the orange version though
[11:27:03] <_ami_> Lambda_Aurigae: aha, ok.
[11:27:43] <_ami_> Lambda_Aurigae: https://www.aliexpress.com/item/Orange-Pi-Plus-2-E-H3-Quad-Core-1-6GHZ-2GB-RAM-4K-Open-source-development/32665196281.html?spm=2114.13010208.99999999.264.6RyUdT
[11:27:49] <_ami_> this seems 4k video one.
[11:28:18] <_ami_> just wonder why its not mentioned in item description sections.
[11:28:21] <_ami_> confusing..
[11:28:21] <Lambda_Aurigae> looks fun
[11:29:31] <Lambda_Aurigae> check the orange pi website directly for that model.
[11:30:51] <Lambda_Aurigae> annd, it looks like it doesn't say anything about it.
[11:31:03] <_ami_> yeah, that makes me wonder.
[11:31:34] <_ami_> i saw one of youtube video and the presenter was claiming that orange pi PC has 4k video support.
[11:31:35] <Lambda_Aurigae> the chip supports 4k
[11:31:40] <Lambda_Aurigae> the system only supports 1080p
[11:31:55] <_ami_> :(
[11:32:12] <_ami_> heard lot of negative reviews abt software support for orange pi.
[11:32:55] <Lambda_Aurigae> again, rPI has more support
[11:33:04] <Lambda_Aurigae> orange has some nifty features rPI doesn't
[11:33:41] <_ami_> Lambda_Aurigae: i won't need much software support i guess. can figure out software stuffs by myself.
[11:33:52] <_ami_> its just that i want following things to work with orange pi atleast.
[11:34:00] <_ami_> 1. a FASTER cpu
[11:34:03] <Lambda_Aurigae> well, 4k doesn't.
[11:34:10] <_ami_> 2. 4k video
[11:34:13] <Lambda_Aurigae> even though the chip supports it.
[11:34:17] <Lambda_Aurigae> the rest of the system does not.
[11:34:40] <_ami_> 3. can compile linux kernel and run my custom modules on it.
[11:35:00] <Lambda_Aurigae> not enough memory for 4K video
[11:35:04] <Lambda_Aurigae> or even 4K dispay
[11:35:13] <_ami_> hmm,
[11:37:18] <Lambda_Aurigae> you need 256MB just to display a 4K frame
[11:37:23] <_ami_> Lambda_Aurigae: btw i had fun with writing framebuffer driver for 1.8" ST7735r TFT on rpi2. :D https://twitter.com/amitesh_singh/status/807694966013075456
[11:37:24] <Lambda_Aurigae> how much video memory does that have?
[11:37:26] <Lambda_Aurigae> 128K?
[11:38:01] <_ami_> Lambda_Aurigae: GPU is inbuild into processor in orange pi?
[11:38:05] <_ami_> inbuilt*
[11:38:18] <Lambda_Aurigae> yes
[11:38:25] <Lambda_Aurigae> but it uses main memory for video memory.
[11:38:29] <Lambda_Aurigae> so it only uses part of it.
[11:38:34] <_ami_> yeah, its shared
[11:38:36] <_ami_> right.
[11:38:47] <_ami_> need to check DS then.
[11:39:12] <_ami_> the item description page only says " 2GB DDR3 (shared with GPU)"
[11:39:15] <Lambda_Aurigae> I'm not finding anything right off
[11:39:22] <Lambda_Aurigae> yes,,,some of it is shared...not all of it.
[11:39:43] <Lambda_Aurigae> you need a 1GB video card at the MINIMUM to display 4K video.
[11:40:42] <Lambda_Aurigae> I'm betting that thing has 128MB or at most 256MB shared with the GPU
[11:41:52] <_ami_> Lambda_Aurigae: https://www.youtube.com/watch?v=ifcKHb_gQbU
[11:42:22] <Lambda_Aurigae> good luck then.
[11:42:24] <_ami_> according to that youtuber, 4k works on 1GB board
[11:42:52] <Lambda_Aurigae> but that's not the same board you posted the purchase link for.
[11:43:54] <_ami_> the one which is was refering has 2GB DDR3
[11:43:56] <_ami_> RAM
[11:44:07] <Lambda_Aurigae> yup..and a different processor.
[11:44:53] <Lambda_Aurigae> hmm
[11:44:57] <Lambda_Aurigae> ok..same processor
[11:45:11] <_ami_> https://www.aliexpress.com/store/product/Orange-Pi-PC-linux-and-android-mini-PC-Beyond-Raspberry-Pi-2/1553371_32448079125.html -> thats orange pc version.
[11:45:25] <Lambda_Aurigae> fo for it.
[11:45:51] <Lambda_Aurigae> go
[11:46:01] <_ami_> the 2GB one :)
[11:46:03] <_ami_> ?
[11:46:08] * Lambda_Aurigae shrugs.
[11:46:19] <_ami_> :)
[11:46:22] <Lambda_Aurigae> they seem to be pretty much the same at the core.
[11:46:38] <_ami_> only the difference is RAM i guess.
[11:46:44] <Lambda_Aurigae> and peripherals.
[11:46:51] <_ami_> so if you more RAM, does it increase the video memory?
[11:46:52] <Lambda_Aurigae> added sata and gigabit ethernet
[11:47:03] <Lambda_Aurigae> dunno on the video ram thing
[11:50:07] <_ami_> ok, i should try with the cheaper one first. 15$ orange pi pc with 1GB RAM.
[12:05:55] <_ami_> https://www.pine64.org/
[12:06:00] <_ami_> this is also promising.
[12:08:33] <Lambda_Aurigae> lots of them out there.
[12:10:55] <Lambda_Aurigae> I am leaning toward the odroid line myself
[12:11:03] <Lambda_Aurigae> but never had one to play with
[12:11:07] <Lambda_Aurigae> and not sure on the video
[12:12:24] <_ami_> i have a odroid board at work. and it runs Tizen flawlessly :)
[12:12:39] <_ami_> as it is reference board for Tizen Samsung Tv.
[12:12:51] <Lambda_Aurigae> http://www.hardkernel.com/main/products/prdt_info.php?g_code=G145457216438
[12:12:52] <Lambda_Aurigae> 4k
[12:13:03] <Lambda_Aurigae> odroid C2
[12:13:49] <_ami_> i have this one: xu4
[12:13:50] <_ami_> http://www.hardkernel.com/main/products/prdt_info.php?g_code=G143452239825
[12:17:28] <_ami_> C2 has 4k, nice.
[12:20:59] <hetii> Hi :)
[12:21:13] <Lambda_Aurigae> hello hetii
[12:24:55] <hetii> Well ... for today I decide to use PWM to control fan from PC, its BLDC motor with 3 pins headers. I use phase correct mode in attiny45 and i`m able to control speed. The issue is that fan makes some noises
[12:25:22] <Lambda_Aurigae> yup
[12:25:33] <Lambda_Aurigae> it's not designed to be PWM controlled
[12:25:50] <Lambda_Aurigae> with a little work you can make notes and music.
[12:26:36] <Lambda_Aurigae> you will have to play with the pwm frequency to find where it doesn't resonate.
[12:28:05] <hetii> well I check all prescaler settings and get those noises in all modes
[12:28:28] <Lambda_Aurigae> you have changed your pwm frequency then?
[12:28:42] <hetii> yep
[12:28:53] <Lambda_Aurigae> then the fan just won't play nice.
[12:29:10] <hetii> I test it with two different one and act the same
[12:29:15] <hetii> :(
[12:29:30] <Lambda_Aurigae> higher frequencies might be better.
[12:30:06] <hetii> both of them have some external thermistor that I short to get maximum speed
[12:30:18] <hetii> so looks like they have internal pwm
[12:30:32] <Lambda_Aurigae> so, you are taking a fan past its rated specs and expect it to play nice?
[12:31:10] <hetii> I take what I have :)
[12:31:18] <Lambda_Aurigae> well,,,bldc doesn't need pwm
[12:31:44] <Lambda_Aurigae> you just pulse the individual coils in sequence.
[12:32:03] <Lambda_Aurigae> change the speed of the pulse round robin to change the speed.
[12:33:10] <hetii> ok but then I would need to add additional driver to my existing PSU board to be able to control my fan, make no sense for this project so probably I will end to use original thermistor to control fan speed
[12:33:37] <Lambda_Aurigae> so, put a digital pot across where the thermistor is.
[12:34:04] <hetii> and use attiny with ds18b20 (already have it on my psu board) just to enable fan then temperature be above 50*C
[12:37:14] <tunage> Lambda_Aurigae: any thought on my version conflict? https://bpaste.net/show/e6418c230f7f
[12:37:30] <Lambda_Aurigae> look at that warning when you do the avr-ld -v
[12:38:08] <Lambda_Aurigae> looks like a problem with some patch.
[12:38:37] <tunage> this? avr-ld: warning: -z relro ignored.
[12:38:41] <Lambda_Aurigae> yup
[12:38:47] <Lambda_Aurigae> google is your friend there.
[12:39:11] <tunage> Lambda_Aurigae: let me dig. Thank you for pointing me in the right direction
[12:39:29] <Lambda_Aurigae> it looks like a patch for avr-ld from what I saw.
[17:59:30] <Vikinger> should my F_CPU the frequency with or without the prescale
[18:00:15] <Lambda_Aurigae> it is the frequency that the main clock runs
[18:00:29] <Lambda_Aurigae> so, with main clock prescaler calculated in.
[18:01:13] <Vikinger> so i have my attiny13a coming by default with a 9.6MHZ, my F_CPU should be 1.2MHZ ?
[18:01:29] <Lambda_Aurigae> where are you getting 9.6 and 1.2?
[18:01:31] <Vikinger> the prescaler is /8
[18:01:38] <Vikinger> datasheet
[18:01:54] <Lambda_Aurigae> if the datasheet says so, then, yes
[18:02:18] <Lambda_Aurigae> I thought they ran at 8MHz by default but never played with a tiny13.
[18:02:37] <Vikinger> yes, i never seen such a value either
[18:03:44] <Vikinger> but, i have then set the F_CPU to 1.2MHZ and flashed an LED, then i put a cronometer on my phone and watched the seconds, and it deviates
[18:04:16] <Vikinger> does my phone suck ?
[18:09:20] <Lambda_Aurigae> deviates how much?
[18:09:31] <Lambda_Aurigae> and how are you flashing it?
[18:12:31] <Vikinger> just basic hello world rotine with _delay_ms(1000)
[18:12:52] <Lambda_Aurigae> and you realize that delay_ms routine isn't real accurate, yes?
[18:13:00] <Vikinger> no
[18:13:24] <Lambda_Aurigae> it comes up in here about once every other week..someone tries to use them for precision timing but they are not precision.
[18:14:02] <Vikinger> i can understand its not precision but it deviates a lot
[18:14:15] <Lambda_Aurigae> how much?
[18:15:00] <Vikinger> i was measuring by eye, but after like 10 flahses its probably half what it should be
[18:15:14] <Vikinger> so it deviates quite quickly
[18:15:53] <Vikinger> but now i know
[18:16:08] <Lambda_Aurigae> the internal RC oscillator isn't real accurate either.....however, it shouldn't be that bad.
[18:16:21] <Vikinger> i thought so
[18:17:23] <Vikinger> ok but still F_CPU is with prescaler in account right ?
[18:17:47] <Lambda_Aurigae> yes.
[18:17:51] <Vikinger> ill go from there
[18:17:56] <Vikinger> thank you
[18:17:57] <Lambda_Aurigae> it is the frequency that the main cpu runs at...
[18:18:10] <Vikinger> ok i understand
[18:18:14] <Jartza> Lambda_Aurigae: darn, I'm having hard time replicating my attiny5 setup on breadboard D
[18:18:17] <Jartza> :D
[18:18:26] <Lambda_Aurigae> Jartza, aawwww.
[18:18:29] <Jartza> but I had to dig it from naftaline to maybe make something with it
[18:18:48] <Lambda_Aurigae> breadboards do shove some capacitance into the equation.
[18:19:18] <Jartza> well. of course, it's not THAT hard to replicate the thing as the chip only has 6 pins, but I can't remember what diode+resistor+whatnot combination I used to get 8-color vga out from 3 pins
[18:20:20] <Jartza> I think I should make it more visually appealing
[18:20:31] <Jartza> maybe something along the lines of "raster bars" in old demos or something
[18:20:37] <Jartza> not much to do in those 150 opcodes
[18:20:55] <Jartza> as the basic vga routine takes about 100 opcodes
[19:16:03] <Jartza> well
[19:16:06] <Jartza> got it
[19:17:06] <Lambda_Aurigae> good
[19:17:17] <Jartza> as expected, picture quality is crap
[19:17:30] <Jartza> but got both high voltage programming circuit and the vga running :)
[19:18:52] <Jartza> https://drive.google.com/file/d/0B2dTzW9TMeBxQVRMOEhrR3Zzem8/view
[19:19:20] <Lambda_Aurigae> 62Hz?
[19:20:09] <Jartza> https://drive.google.com/file/d/0B2dTzW9TMeBxOU9MTTN4YkxpUkk/view
[19:20:16] <Jartza> yeah, seems that the oscillator is a bit off
[19:20:36] <Lambda_Aurigae> interesting that the monitor will sync it like that.
[19:20:39] <Jartza> original code was made with 12MHz oscillator, but this oscillator chip I'm now having on the board seems to run at 12.4MHz
[19:21:12] <Jartza> so timings are bit off, the menu actually shows 61Hz or 62Hz :)
[19:21:21] <Jartza> so it's somewhere in between 61 and 62 I guess
[19:21:26] <Jartza> but no biggie right now
[19:22:16] <Jartza> easy to adjust from firmware itself
[19:30:43] <Jartza> but now I again have dev-env for it
[19:30:44] <Jartza> :)
[19:31:38] <Jartza> https://drive.google.com/file/d/0B2dTzW9TMeBxYXQ1bmEzNndKRVE/view
[19:35:37] <Jartza> hellish noise on board to be expected
[19:35:45] <Jartza> s/board/screen/
[19:36:08] <Jartza> the latest pic, scrolls that slowly up in repeating loop
[19:36:27] <Jartza> Assembly complete with no errors.
[19:36:27] <Jartza> Segment usage: Code : 112 words (224 bytes) Data : 32 bytes EEPROM : 0 bytes
[19:36:31] <Lambda_Aurigae> kewl.
[19:37:57] <Jartza> base code now, that creates hsync, vsync and draws pixels from the massive 32 bytes of ram is now 186 bytes
[19:38:14] <Jartza> although, alone it only of course draws black pixels as that code doesn't populate anything toram
[20:25:29] <Jartza> lollers
[20:26:17] <Jartza> https://drive.google.com/file/d/0B2dTzW9TMeBxSWZ5UWo3VHR1SnM/view?usp=sharing
[20:26:33] <Jartza> Segment usage:
[20:26:36] <Jartza> Code : 81 words (162 bytes)
[20:26:41] <Jartza> Data : 32 bytes
[20:26:45] <Jartza> :D
[20:28:14] <Lambda_Aurigae> what? no text?
[20:28:18] <Lambda_Aurigae> :}
[20:28:36] <Jartza> hehe
[20:28:49] <Jartza> nah. I thought that I optimize the base routine first
[20:28:59] <Jartza> then see how much I have space for anything fancy
[20:29:56] <Jartza> of that 81 words, 11 words is spent on filling ram with something so I can actually see something on screen
[20:30:05] <Jartza> so the base vga is now 70 words, 140 bytes
[20:30:46] <Jartza> and the routine draws 64 horizontal pixels from 32 bytes of ram
[20:30:53] <Jartza> so, one pixel per each nibble of byte
[20:31:03] <Jartza> "pixel" in this case of course is pretty big
[20:31:12] <Lambda_Aurigae> very tall pixels
[20:31:23] <Jartza> indeed
[20:31:26] <Jartza> but doesn't matter
[20:32:04] <Jartza> probably I end up doing something different anyway, just now trying to shave code
[20:32:22] <Jartza> not sure how much there is to shave anything anymore, though
[20:32:49] <FL4SHK> Try a new razor
[20:38:19] <Jartza> well. one opcode less.
[20:40:11] <Jartza> Code : 80 words (160 bytes)
[20:40:15] <Jartza> yay
[21:01:43] <Jartza> Code : 76 words (152 bytes)
[21:53:36] <Jartza> Code : 75 words (150 bytes)
[21:56:11] <Tom_itx> pfft you can do better than that
[22:12:07] <Jartza> Code : 74 words (148 bytes)
[22:12:18] <Jartza> Tom_itx: true, it seems :)
[22:13:34] <Tom_itx> heh