#avr | Logs for 2014-09-08

Back
[11:43:02] <Dominykas> Hey guys! Which one of these are better? http://lemona.lt/index.php?page=item&b_id=-2&c_id=389&lan=en&toc= or http://lemona.lt/index.php?page=item&i_id=50892 ? The price is almost the same. I want a cheap soldering iron and a station with changeable heat.
[11:52:53] <Getty> i think a soldering station is a very personal decision ;)
[11:53:40] <Dominykas> I just wanted to ask if there is a big difrence between them, like the ammount of heat and maybe company
[11:53:48] <Getty> my dad uses like the oldest crap to make soil anything which has pins, he is just used to it ;)
[11:53:58] <Getty> yeah actuall the first one is not displaying for me at all, so i cant compare
[11:54:18] <Getty> but i am no expert ;)
[11:54:48] <Dominykas> http://pastebin.com/GV2R3zhF
[11:55:19] <Dominykas> yeah, i will probably just get the one that looks the most confortable
[12:56:00] <brabo> i am trying to dump my entire flash with avrdude to analyze it. however, it'll only dump 1988 bytes, which happens to be the exact size my bootloader is. if in avrdude i dump my memory, my bootloader seems to start at 0x0000
[12:56:18] <brabo> i was under impression bootloader should be in the higher address range?
[13:02:11] <specing> thats a huge bootloader
[13:10:23] <antto> mine is about 4kB
[13:11:54] <brabo> specing: it's basically the arduino atmega2560 bootloader
[13:12:11] <brabo> i cut out some stuff tho, before it was 5+ k
[13:12:36] <brabo> now it'd under 2k, which i thought was perfectly okay for an atmega2560
[13:12:41] <antto> same as mine then
[13:12:46] <antto> stk500v2?
[13:12:49] <brabo> uhu
[13:12:58] <antto> it had some math.h stuff ;]
[13:13:29] <brabo> ye, and the monitor section and all i cut out
[13:13:54] <antto> yup
[13:14:09] <antto> but then i had to add some stuff so it went up to almost 4kB
[13:14:25] <brabo> thing is, i'm trying to tell it with a perl script over uart to write and dump some flashm and it doesn't seem to properly work
[13:14:49] <antto> does it reply?
[13:14:50] <brabo> so that's why i went looking.. doesn't the bootloader go in the higher addresses?
[13:14:53] <brabo> yeah
[13:14:54] <brabo> it does
[13:15:08] <antto> hmz
[13:15:21] <brabo> but if i try to set address to 0 and then read, it doesn't return same as avrdude returns
[13:15:24] <antto> it's best to look thru the bootloader codez
[13:15:32] <antto> wut
[13:15:46] <brabo> been doing that since yesterday evening to figure out how to talk to it :)
[13:15:54] <brabo> well
[13:16:14] <antto> you want to read/write from the flash?
[13:16:22] <brabo> yes
[13:16:40] <brabo> we want to use this perl script as our own app flasher
[13:16:51] <brabo> so first i'm tryin some read/write as test
[13:16:52] <antto> if you're not sure what commands to send - you could install one of those serial port tunnels and attach a monitor in the middle
[13:17:01] <brabo> mmm
[13:17:18] <antto> then see what actually happens when you flash it with avrdude (assuming THAT works properly)
[13:17:18] <brabo> not a bad ideya
[13:17:43] <brabo> for as far as i see it's just setting an address and go
[13:18:01] <antto> what i remember is that.. addresses are of "words" so address 1 is actually byte offset 2
[13:18:06] <brabo> it'd be usefull if i could get a dump of the full 256k flash tho..
[13:18:10] <antto> word == uint16_t
[13:18:26] <antto> there was a message to tell the bootloader to "enter programming mode"
[13:18:42] <antto> you have to call that before attempting to write any flash
[13:18:46] <brabo> yea but in the bootloader there doesn't really seem to happen anything there
[13:19:01] <antto> hm
[13:19:02] <brabo> msgBuffer[1] = STATUS_CMD_OK;
[13:19:02] <brabo> msgLength = 2;
[13:19:02] <brabo> msgBuffer[1] = STATUS_CMD_OK;
[13:19:03] <brabo> break;
[13:19:13] <brabo> oops that's nasty
[13:19:19] <antto> do you have a url to the file somewhere?
[13:19:25] <brabo> anyway, it sets a return ok and breaks
[13:19:31] <brabo> sure, sec
[13:20:50] <brabo> antto: https://paste.xinu.at/9usdY1/ line 753 you see the enter progmode
[13:20:57] <brabo> it just sets status ok and returns
[13:21:52] <brabo> at 703 the signin, it also doesnt really do anything but reply with a string
[13:21:55] <brabo> this all works
[13:23:51] <brabo> setting the address returns okay, so it looks like the packet we sent was correct
[13:24:20] <brabo> but a full dump is probably the easiest..
[13:25:01] <antto> well
[13:25:22] <brabo> but uhm
[13:25:27] <antto> btw, i'm not sure if it'll read back from boot section
[13:25:35] <brabo> can it be i'm setting fuses wrong?
[13:25:47] <antto> how do you set them?
[13:25:55] <brabo> that that somehow causes everything to go wrong?
[13:25:56] <brabo> sec
[13:26:01] <antto> oh, yes, avrdude does some stuff with the fuses, i think
[13:26:26] <brabo> before bootloader flash i do: -U efuse:w:0xFF:m -U hfuse:w:0xDA:m -U lfuse:w:0xE2:m -U lock:w:0x3F:m
[13:26:29] <brabo> then flash
[13:26:32] <brabo> then i set
[13:26:39] <brabo> -U efuse:w:0xFF:m -U hfuse:w:0xDA:m -U lfuse:w:0xE2:m lock:w:FFx:m
[13:26:47] <antto> hm
[13:26:59] <brabo> adn atmega2560 eh
[13:27:02] <brabo> *and
[13:27:28] <antto> is that to flash the bootloader onto the chip, or to flash a firmware via the bootloader?
[13:27:53] <brabo> the bootloader
[13:30:11] <antto> the only diff i see is the lockbits
[13:31:05] <antto> and surely, when you flash the bootloader on to the chip, the lockbits get erased everytime, so you want to program them explicitly after the bootloader.hex has been flashed
[13:31:23] <antto> iirc in my case i had to set them to 0x0F
[13:31:41] <antto> because they get reset to 0x3F
[13:31:59] <antto> don't quote me on any of that tho, it was long ago
[13:32:03] <antto> (atmega2561)
[13:33:59] * aandrew laments the availability of a reasonable compressed air pressure monitor IC
[13:34:31] <aandrew> they're all in the 1100mbar (15psi) area, and the higher ones (100, 150psi) are not readily available
[13:34:44] <aandrew> there are a couple but they're in the $30 onesie-twosie price range
[13:42:01] <hetii> Hi ;)
[13:42:49] <hetii> Is there some kernel tree for AVR where i can select some drivers that will be used in my project and just focus on functionality ?
[13:42:58] <jeremyabel> kernel tree?
[13:43:00] <jeremyabel> d-drivers?
[13:43:13] <jeremyabel> AVR isn't a computer, it doesn't have a kernel really
[13:44:34] <hetii> its not a computer but can have a some sort of kernel
[13:46:34] <hetii> I imagine that it could have a layer where we configure register to expose interfaces and API like for UART/i2c/can/ethernet etc.... and a drivers for devices that are connected around it.
[13:50:14] <jeremyabel> sure, arduino is essentially that
[13:52:53] <brabo> antto: ye, now i set them to 3f and 0f after
[13:53:18] <brabo> hetii: perhaps contiki is what you are looking for?
[13:53:51] <hetii> need to check it
[13:54:16] <hetii> I really don`t like arduino world
[13:59:55] <hetii> I wonder if its possible to build cross platform kernel for different mcu not just avr...
[14:01:28] <LoRez> AVRs are much too small for something resembling a kernel
[14:02:37] <jeremyabel> ^
[14:03:09] <hetii> all depends how it will be deigned, Maybe the "kernel" is not a proper word
[14:05:25] <hetii> but bu using proper interface API and macros we can generate code that will consume the same amount of resources...
[14:09:32] <hetii> The problem now is that everybody use own macros to set the IO ports timers and other stuff that he currently need. Would be nice to unified that and have some API that everybody can use and focus just on functionality.
[14:09:39] <hetii> Its just an idea
[14:24:06] <RikusW> Atmel did it, only problem is their macros are nested so deeply to be nearly incomprehensible
[14:24:18] <RikusW> (in particular the mega32u2 usb stack)
[14:26:39] <hetii> well I imagine that interface could be done like in buildroot
[14:26:47] <jeremyabel> buildroot?
[14:26:54] <hetii> but will support even small mcu
[14:27:01] <hetii> http://buildroot.uclibc.org/about.html
[14:57:35] <malinus> hetii, LoRez there is uLinux
[14:57:51] <malinus> people had it running on 8-bit avr's
[15:00:47] <LoRez> booting a kernel in 3.5 hours isn't useful though.
[15:01:25] <malinus> :)
[15:01:29] <malinus> but it's possible!
[15:02:20] <hetii> yep thats not a what i want to have:)
[15:22:31] <Casper> now.... to sort up all those screws I bought...
[15:22:55] <Casper> I was sick of not having the size I needed
[15:23:12] <Casper> bought about 20 sizes/type
[19:18:23] <Lightsword> I'm trying to figure out how some embedded hardware works, it has a custom ethernet controller with a PIC32MX795F
[19:18:40] <Lightsword> it also seems to have this firmware somewhere https://github.com/blockerupter/avr_hbc
[19:22:23] <Lambda_Aurigae> ok.
[19:22:41] <Lightsword> it has some undocumented service protocol that I can't figure out
[19:22:57] <Lambda_Aurigae> the pic32 has onboard ethernet and usb..runs at up to 80MHz, has 512K of flash, 128K of sram.
[19:23:27] <Lambda_Aurigae> and we have absolutely no clue what the device is or anything about it other than it apparently has both pic and avr microcontrollers.
[19:24:00] <Lightsword> well its called a "BE200 Jet Stratum Miner V 5.47"
[19:24:05] <Lambda_Aurigae> the avr being, apparently an atmega88
[19:24:09] <Lightsword> bitcoin miner controller
[19:25:26] <Lightsword> I'm trying to figure out what protocol the service port uses
[19:25:38] <Lightsword> its running on port 7478 over ethernet
[19:26:03] <Lambda_Aurigae> so sniff it with wireshark and analyze.
[19:26:31] <Lightsword> I tried nmap which is saying its a iPXE 1.0.0+ but got nothing on the port
[19:26:36] <Lightsword> wireshark nothing useful as well
[19:27:02] <Lightsword> only thing I got was a response of "E" everytime I try and type something over telnet
[19:27:35] <Lambda_Aurigae> well, you have to actually hook it up and run it and wireshark it...will either need an ethernet tap switch or a hub...or a managed switch that you can do a tap on...a regular switch wont work.
[19:27:53] <Lightsword> well, it has stratum traffic going separately
[19:28:03] <Lightsword> but that's different from the management port
[19:28:28] <Lightsword> I think I need to fuzz the port or something
[19:28:30] <Lightsword> but don't know how
[19:28:37] <Lambda_Aurigae> "fuzz" ??
[19:33:18] <Lightsword> Lanbda_Aurigae, send traffic of lost of different protocols hoping to get something useful back
[20:48:32] <mheld-irccloud> hey y'all
[20:50:55] <mheld-irccloud> I'm having a hard time figuring out this progmem thing
[20:51:18] <mheld-irccloud> http://pastie.org/private/oi7rcudqawks1th4uh1a5g is what I have and it doesn't look like I'm pushing the right refs through
[20:51:22] <mheld-irccloud> anybody have any thoughts?
[21:24:37] <mheld-irccloud> ha nevermind
[21:24:40] <mheld-irccloud> didn't need the pretzel
[21:24:45] <mheld-irccloud> silly mheld