#avr | Logs for 2015-04-22

Back
[01:59:22] <Xark> Does anybody know the difference between Atmel-Ice and Atmel-Ice-Basic?
[01:59:33] <Xark> (besides $40 delta). :)
[02:01:09] <Xark> Ahhh, it seems one comes with all the extra cables (that explained why the specs looked so similar). :)
[02:38:57] <vino> i have small error
[02:39:16] <vino> SELECT * FROM (`site_setting`) WHERE `setting_code` = 'site_status' what is that???
[02:39:35] <vino> no database occurred...
[03:06:29] <Xark> vino: Which AVR COBOL compiler are you using? :)
[04:09:17] <Ad0> is C preferred in AVR?
[04:09:24] <Ad0> are there any drawbacks of using C++ ?
[04:09:34] <Ad0> I think it's nice to have classes etc
[04:10:17] <LeoNerd> For me, I find the main drawback of C++ (anywhere, not just on AVR) is that I generally have no idea what the CPU will be doing
[04:10:32] <LeoNerd> I like the fact that when I see a + b in C, I know exactly what it will do
[04:12:31] <dunz0r> Ad0: On a memory limited platform like AVR C saves quite a bit of memory as opposed to C++
[04:12:36] <dunz0r> It's usually not a problem though
[04:13:14] <Xark> Ad0: If you disable RTTI and exceptions (-fno-rtti and -fno-exceptions IIRC), then it is a fair fight. C++ had a few features that can "optimize" better than C (templates), but mostly a wash (other than more expressive syntax). Be aware "virtual" calls can be expensive on AVR (but if you need them, you need them).
[04:14:40] * Xark doesn't think there is any substantial size difference if you disable those two C++ features from C (perhaps constructor/destructor table overhead, but very minor).
[04:15:04] <Ad0> dunz0r: I see
[04:15:20] <Ad0> yes I am thinking of templates and classes primarely
[04:15:42] <Ad0> RTTI is useful though
[04:15:45] <Xark> Ad0: Static templates are a wash. Same as "equivilent" C code.
[04:15:51] <Xark> No, RTTI is not too useful. :)
[04:16:00] <Ad0> don't I use "this" :)
[04:16:03] <Ad0> or how was it
[04:16:07] <Xark> If you need it, implement your own "GetType" (only on the classes that need that). :)
[04:16:15] <Ad0> oh wait
[04:16:17] <Ad0> yeah
[04:16:42] <dunz0r> Although, I haven't really ran in to any memory problems when I've used C++
[04:16:44] <Ad0> RTTI is useful for polymorphism
[04:16:49] <Ad0> I would have to do that with templates
[04:16:50] <Xark> Not using "this" (and using static member functions when applicable) is recommended.
[04:16:58] <Ad0> that's how it was
[04:17:09] <Xark> Or just add your own "GetType
[04:17:12] <Xark> "
[04:17:19] <Ad0> yeah gettype is not important
[04:17:52] <Ad0> static polymorphism
[04:17:53] * Xark notes RTTI and expections are generally always disabled on AVR (not even sure exceptions are supported...)
[04:18:04] <Ad0> how do I measure how big the image is, and how far I am away from filling it 100%?
[04:18:24] <Xark> Ad0: avr-size works fairly well (other than dynamic allocations)
[04:18:41] <Ad0> that's a tool available from the command prompt right
[04:18:49] <Ad0> I am using atmel studio on windows
[04:19:27] <Xark> Ad0: I think it comes with avr-size (part of GNU toolchain).
[04:19:38] <Xark> You can also look at map file in Atmel studio...
[04:21:57] <Ad0> 98 bytes heh
[04:22:24] <Ad0> avr size comes in the build output
[04:22:44] <Ad0> Program Memory Usage :98 bytes 2,4 % Full
[04:22:47] <Ad0> awesome
[04:22:59] <Ad0> a blinking diode takes 2.4%
[04:23:27] <Ad0> let me open my c++ project
[04:23:53] <Ad0> Program Memory Usage :86 bytes 2,1 % Full
[04:24:00] <Ad0> wat
[04:24:38] <Ad0> how do you guys develop when you need all the pins?
[04:24:45] <Ad0> I guess the programmer connection messes things up right?
[04:26:25] <Ad0> oh different code.
[04:26:33] <Ad0> both are 2.1 % with the same code
[04:27:25] <LeoNerd> *usually* you still run with RSTEN turned on(off?), so the RESET pin is a real reset; which the ISP connection uses to reprogram
[04:27:40] <LeoNerd> You can usually share the ISP SPI pins with other SPI hardware. At least, I do that and it works fine
[04:28:35] <Ad0> ok when I said all PBs were output, the chip seemed to reset for each iteration
[04:28:55] <Ad0> the blinking was irregular since it seemed to restart or something
[04:29:19] <Ad0> but once I directed output only to one PORTB it was fine
[04:32:00] <Ad0> LeoNerd: what libraries did you use for your nrf?
[04:32:13] <LeoNerd> Er.. nothing? I just wrote code
[04:32:23] <LeoNerd> It's just SPI. It's not terribly difficult
[04:32:59] <Ad0> ok
[06:13:04] <Ad0> is ASF worth using?
[06:26:01] <Xark> Not really, from what I have heard (I have not personally tried it).
[06:36:08] <Lambda_Aurigae> if you happen to have a real need for some software in ASF, then, yes.
[06:36:26] <Lambda_Aurigae> but without atmel studio, ASF is a pain in the ass to use,,,or at least, it has been for me.
[06:38:03] <specing> beta aurigae
[06:38:55] * Lambda_Aurigae is far beyond beta stages.
[08:03:42] <LeoNerd> Does anyone have any suggestions for making the usual GNU tools disassembler actually understand the IO registers and names of data symbols?
[08:07:08] <LeoNerd> Currently it doesn't understand the names of any of the machine IO registers (for in/out instructions), or any of my RAM locations
[08:18:02] <zarkone> hello all! i've bought this: http://www.ebay.com/itm/AVR-Minimum-System-Development-Board-ISP-Atmega16-Atmega32-NO-Chip-/400562178584?tfrom=261021924011&tpos=top&ttype=coupon&talgo=undefined and i have atmega8515 micro. It suits into, but is it suitable for flash, etc? i'm afraid to try to flash it =) sorry for such newbie question..
[08:30:51] <twnqx> zarkone: compare the pinouts. i doubt they are compatible enough.
[08:34:01] <zarkone> twnqx:ok, thanks! Does this devboard need external power supply to flash or i just can plug in usbasp to it?
[08:37:33] <zarkone> yes, it's not compartable.. I also tried to read the fuses and got `avrdude: error: programm enable: target doesn't answer. 1 `
[08:40:11] <malinus> zarkone: why would you even buy that? You could just get a normal ISP programmer.
[09:31:27] <zarkone> malinus: example?
[09:32:01] <LeoNerd> http://www.amazon.co.uk/3-3V-USBasp-Downloader-Programmer-Adapter/dp/B00AVRHVPO I have one like that
[09:32:42] <LeoNerd> Annoyingly it seems rare to find one with an ISP6 cable on; they're almost all ISP10; yet almost every dev board has an ISP6 header, not a 10. So you end up needing a socket adapter
[09:33:30] <zarkone> LeoNerd: but this is programmer, isn't it? i've also bought http://www.ebay.com/itm/261021924011
[09:34:15] <LeoNerd> Yes, that is
[09:35:15] <zarkone> my problem is that i've ordered wrong dev board for my micro. I just have to buy suitable one
[09:35:42] <LeoNerd> Or just don't bother?
[09:35:50] <LeoNerd> The "dev board" here is adding pretty minimal functionality to be honest
[09:36:07] <LeoNerd> Just stick the chip on a breadboard, give it power and an ISP header
[09:36:17] <LeoNerd> Maybe a timing crystal if you need one
[09:38:31] <zarkone> i think this "devboard" would be quite enough for my lab works in university.. i just have to process small num keyboard and 7 segment digits (don't know how it called in english, sorry)
[09:39:14] <zarkone> without any soldering, just plug perepherials to "devboard" and flash without unpluging the controller
[09:39:44] <LeoNerd> Yes; same with breadboard
[09:41:02] <zarkone> LeoNerd: yes, seems like it is, thank you very much -- i did't know about this =)
[09:42:24] <LeoNerd> Most of my AVR work tends to be on tiny chips; I have a full set of Botthoughts' eeZeetiny boards for that
[09:42:37] <LeoNerd> It's just a 1:1 chip holder for breadboard, that adds a reset button and ISP6 header
[09:46:52] <zarkone> ... and power, and funky handle to stick the micro :)
[09:47:08] <zarkone> i mean, power socket