[<<] [<] Page 1 of 1 [>] [>>] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Subject:
how to program a dspic using only piklab-prog?
From: John Steele Scott ####@####.#### Date: 29 Jun 2007 01:48:47 +0100 Message-Id: <f61ksq$uvj$1@sea.gmane.org> This morning I tried to use piklab-prog to program a dsPIC 30F3013 for the first time. I can't believe it's taken me this long, I searched the archives and found out that I intended to try this over a year ago! Anyway, when I run piklab-prog like: piklab-prog --command program --target-self-powered --programmer icd2 --device 30F3013 --firmware-dir ~/.wine/drive_c/Program\ Files/Microchip/MPLAB\ IDE/ICD2/ dspic-logger.hex --debug I get the following output: piklab-prog: version 0.14.2 (rev. distribution) programmer: icd2 device: 30F3013 firmware-dir: /home/john/.wine/drive_c/Program Files/Microchip/MPLAB IDE/ICD2/ target-self-powered: true Using port from configuration file. Connecting ICD2 Programmer on USB Port with device 30F3013... USB Port: a driver "usbfs" is already installed... USB Port: try to detach it... Firmware id is 10 and we want 10 Firmware version is 1.3.2 Set target Set target self powered: true Warning: It is not recommended to power dsPICs from ICD. Continue anyway? *no* I don't think this warning should appear, because I have specified that the target is self powered, and I don't have a transformer plugged into the ICD2. If I add the '-f' option, something happens, but it fails verification: piklab-prog: version 0.14.2 (rev. distribution) programmer: icd2 device: 30F3013 firmware-dir: /home/john/.wine/drive_c/Program Files/Microchip/MPLAB IDE/ICD2/ target-self-powered: true Using port from configuration file. Connecting ICD2 Programmer on USB Port with device 30F3013... Firmware id is 10 and we want 10 Firmware version is 1.3.2 Set target Set target self powered: true Warning: It is not recommended to power dsPICs from ICD. Continue anyway? *yes* Hold reset Programmer Vpp = 12.9406 V Target Vdd = 3.47812 V Target Vpp = 12.8607 V Self-test Connected. Read id: 30F3013 (proc. 1; rev. 1.1) Programming device memory... protected: code=false data=false Erasing device Write memory: Code memory start before align: 0 start after align: 0 (align=16) end before align: 4616 end after align: 4623 (align=16) start=0x000000 nbWords=0x001210 total=0x002000 force=false Verify memory: Code memory start before align: 0 start after align: 0 (align=16) end before align: 4616 end after align: 4623 (align=16) start=0x000000 nbWords=0x001210 total=0x002000 force=false Write memory: Data EEPROM start before align: 0 start after align: 0 (align=1) end before align: 492 end after align: 492 (align=1) start=0x000000 nbWords=0x0001ED total=0x000200 force=false Verify memory: Data EEPROM Error: Device memory does not match hex file (in Data EEPROM at address 0x7FFFDA: reading 0x22A6 and expecting 0xFFFF). If I load my hex file into piklab and program it that way, programming succeeds and the device appears to work correctly. So what does piklab do differently? Do I need to run more than one command? cheers, John | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Subject:
Re: how to program a dspic using only piklab-prog?
From: John Steele Scott ####@####.#### Date: 29 Jun 2007 02:16:20 +0100 Message-Id: <f61mgi$307$1@sea.gmane.org> John Steele Scott wrote: > If I load my hex file into piklab and program it that way, programming > succeeds and the device appears to work correctly. So what does piklab do > differently? Do I need to run more than one command? Ooops, I forgot that I changed something. Piklab fails in the same way if the configuration option "Program all memory even if not needed" is not set. So I guess I need to know how to tell this to piklab-prog. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
[<<] [<] Page 1 of 1 [>] [>>] |