gnupic: Thread: Re: [gnupic] gpasm hex files, compatibility with odyssey


[<<] [<] Page 1 of 1 [>] [>>]
Subject: Re: [gnupic] gpasm hex files, compatibility with odyssey
From: Tim Allen ####@####.####
Date: 29 May 2007 17:07:43 +0100
Message-Id: <C0D624FA-AA56-41AB-8EA8-70A04F61309B@integsys.biz>

oops, I meant PIC16F84.

On May 29, 2007, at 12:02 PM, Tim Allen wrote:

> I compile a simple program for the PIC14F84 using gpasm...
> lab:~/HelloWorld#gpasm HelloWorld.asm
> HelloWorld.asm:51:Warning [224] Use of this instruction is not  
> recommended.
> HelloWorld.asm:52:Warning [224] Use of this instruction is not  
> recommended.
>
> I attempt to write it to the pic...
> lab:~/HelloWorld# odyssey PIC16F84 write HelloWorld.hex
> Address: 0x000000,   0% done
> odyssey: PIC16F84: Couldn't write program memory at address 0x0000
>
> Okay so I spend several hours debugging my hardware (simple  
> programmer I built on a breadboard...
> yelling, mashing of teeth, etc :-) Can't find anything wrong.
>
> Then I try reading the PIC...
> lab:~/HelloWorld# odyssey PIC16F84 read tim.hex
> Address: 0x002007,  100% done
>
> okay so it must just be a writing issue. But just for the heck of  
> it I try writing what I just read...
> lab:~/HelloWorld# odyssey PIC16F84 write tim.hex
> Address: 0x002007,  100% done
>
> So I have concluded the the hex output from gpasm is not compatible  
> with odyssey. Can anyone confirm this? I'm I just doing something  
> stupid?
>
> Thank you
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: ####@####.####
> For additional commands, e-mail: ####@####.####
Subject: Re: [gnupic] gpasm hex files, compatibility with odyssey
From: "David Barnett" ####@####.####
Date: 29 May 2007 17:28:32 +0100
Message-Id: <00c101c7a20d$b9ff9d80$0301a8c0@barnett2>

Have you verified that the generated HEX file looks normal (not extremely 
short/empty, etc.)?  I don't know anything about odyssey, but there's not 
much to the HEX files that could be "incompatible" with anything...they're 
just bytes and checksums.  Is it possible you enabled code protect on your 
chip?  The HEX file you read could also be empty if you haven't already 
checked that.

David Barnett 

Subject: Re: [gnupic] gpasm hex files, compatibility with odyssey
From: "Tamas Rudnai" ####@####.####
Date: 29 May 2007 17:34:35 +0100
Message-Id: <492f1420705290934y6c29cbc7w1bfa1806808d2106@mail.gmail.com>

Just wondering: could it be possible that the end-of-line character is
different than your programmer accept? For example CRLF expected but only LF
are there or vica versa?

Tamas




On 5/29/07, David Barnett ####@####.#### wrote:
>
> Have you verified that the generated HEX file looks normal (not extremely
> short/empty, etc.)?  I don't know anything about odyssey, but there's not
> much to the HEX files that could be "incompatible" with anything...they're
> just bytes and checksums.  Is it possible you enabled code protect on your
> chip?  The HEX file you read could also be empty if you haven't already
> checked that.
>
> David Barnett
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: ####@####.####
> For additional commands, e-mail: ####@####.####
>
>
Subject: Re: [gnupic] gpasm hex files, compatibility with odyssey
From: Tim Allen ####@####.####
Date: 29 May 2007 17:43:25 +0100
Message-Id: <8EA06F50-072D-4A6A-93EF-0428BFED42B3@integsys.biz>

I would expect my HelloWorld hex file to be short as there not much  
to it; however, a read of the entire chip I would expect to be much  
larger- I assume zero padding is not necessary as no one has  
mentioned it. I have pasted the respective hex files... As for the  
write protect, it's a new chip and I am able to write back the hex  
that I read from the chip using odyssey.

HelloWorld.hex (the output from gpasm)...

:020000040000FA
:100000000F28FF308C0000008C0B032808008E00A6
:10001000FF308D0001208D0B0A280E0808000030EB
:0E00200065006600FF30860007208609142860
:00000001FF

tim.hex (the file read via odyssey from the chip):

:10000000FF3FFF3FFF3FFF3FFF3FFF3FFF3FFF3F00
:10001000FF3FFF3FFF3FFF3FFF3FFF3FFF3FFF3FF0
:10002000FF3FFF3FFF3FFF3FFF3FFF3FFF3FFF3FE0
:10003000FF3FFF3FFF3FFF3FFF3FFF3FFF3FFF3FD0
:10004000FF3FFF3FFF3FFF3FFF3FFF3FFF3FFF3FC0
:10005000FF3FFF3FFF3FFF3FFF3FFF3FFF3FFF3FB0
:10006000FF3FFF3FFF3FFF3FFF3FFF3FFF3FFF3FA0
:10007000FF3FFF3FFF3FFF3FFF3FFF3FFF3FFF3F90
:10008000FF3FFF3FFF3FFF3FFF3FFF3FFF3FFF3F80
:10009000FF3FFF3FFF3FFF3FFF3FFF3FFF3FFF3F70
:1000A000FF3FFF3FFF3FFF3FFF3FFF3FFF3FFF3F60
:1000B000FF3FFF3FFF3FFF3FFF3FFF3FFF3FFF3F50
:1000C000FF3FFF3FFF3FFF3FFF3FFF3FFF3FFF3F40
:1000D000FF3FFF3FFF3FFF3FFF3FFF3FFF3FFF3F30
:1000E000FF3FFF3FFF3FFF3FFF3FFF3FFF3FFF3F20
:1000F000FF3FFF3FFF3FFF3FFF3FFF3FFF3FFF3F10
:10010000FF3FFF3FFF3FFF3FFF3FFF3FFF3FFF3FFF
:10011000FF3FFF3FFF3FFF3FFF3FFF3FFF3FFF3FEF
:10012000FF3FFF3FFF3FFF3FFF3FFF3FFF3FFF3FDF
:10013000FF3FFF3FFF3FFF3FFF3FFF3FFF3FFF3FCF
:10014000FF3FFF3FFF3FFF3FFF3FFF3FFF3FFF3FBF
:10015000FF3FFF3FFF3FFF3FFF3FFF3FFF3FFF3FAF
:10016000FF3FFF3FFF3FFF3FFF3FFF3FFF3FFF3F9F
:10017000FF3FFF3FFF3FFF3FFF3FFF3FFF3FFF3F8F
:10018000FF3FFF3FFF3FFF3FFF3FFF3FFF3FFF3F7F
:10019000FF3FFF3FFF3FFF3FFF3FFF3FFF3FFF3F6F
:1001A000FF3FFF3FFF3FFF3FFF3FFF3FFF3FFF3F5F
:1001B000FF3FFF3FFF3FFF3FFF3FFF3FFF3FFF3F4F
:1001C000FF3FFF3FFF3FFF3FFF3FFF3FFF3FFF3F3F
:1001D000FF3FFF3FFF3FFF3FFF3FFF3FFF3FFF3F2F
:1001E000FF3FFF3FFF3FFF3FFF3FFF3FFF3FFF3F1F
:1001F000FF3FFF3FFF3FFF3FFF3FFF3FFF3FFF3F0F
:10020000FF3FFF3FFF3FFF3FFF3FFF3FFF3FFF3FFE
:10021000FF3FFF3FFF3FFF3FFF3FFF3FFF3FFF3FEE
:10022000FF3FFF3FFF3FFF3FFF3FFF3FFF3FFF3FDE
:10023000FF3FFF3FFF3FFF3FFF3FFF3FFF3FFF3FCE
:10024000FF3FFF3FFF3FFF3FFF3FFF3FFF3FFF3FBE
:10025000FF3FFF3FFF3FFF3FFF3FFF3FFF3FFF3FAE
:10026000FF3FFF3FFF3FFF3FFF3FFF3FFF3FFF3F9E
:10027000FF3FFF3FFF3FFF3FFF3FFF3FFF3FFF3F8E
:10028000FF3FFF3FFF3FFF3FFF3FFF3FFF3FFF3F7E
:10029000FF3FFF3FFF3FFF3FFF3FFF3FFF3FFF3F6E
:1002A000FF3FFF3FFF3FFF3FFF3FFF3FFF3FFF3F5E
:1002B000FF3FFF3FFF3FFF3FFF3FFF3FFF3FFF3F4E
:1002C000FF3FFF3FFF3FFF3FFF3FFF3FFF3FFF3F3E
:1002D000FF3FFF3FFF3FFF3FFF3FFF3FFF3FFF3F2E
:1002E000FF3FFF3FFF3FFF3FFF3FFF3FFF3FFF3F1E
:1002F000FF3FFF3FFF3FFF3FFF3FFF3FFF3FFF3F0E
:10030000FF3FFF3FFF3FFF3FFF3FFF3FFF3FFF3FFD
:10031000FF3FFF3FFF3FFF3FFF3FFF3FFF3FFF3FED
:10032000FF3FFF3FFF3FFF3FFF3FFF3FFF3FFF3FDD
:10033000FF3FFF3FFF3FFF3FFF3FFF3FFF3FFF3FCD
:10034000FF3FFF3FFF3FFF3FFF3FFF3FFF3FFF3FBD
:10035000FF3FFF3FFF3FFF3FFF3FFF3FFF3FFF3FAD
:10036000FF3FFF3FFF3FFF3FFF3FFF3FFF3FFF3F9D
:10037000FF3FFF3FFF3FFF3FFF3FFF3FFF3FFF3F8D
:10038000FF3FFF3FFF3FFF3FFF3FFF3FFF3FFF3F7D
:10039000FF3FFF3FFF3FFF3FFF3FFF3FFF3FFF3F6D
:1003A000FF3FFF3FFF3FFF3FFF3FFF3FFF3FFF3F5D
:1003B000FF3FFF3FFF3FFF3FFF3FFF3FFF3FFF3F4D
:1003C000FF3FFF3FFF3FFF3FFF3FFF3FFF3FFF3F3D
:1003D000FF3FFF3FFF3FFF3FFF3FFF3FFF3FFF3F2D
:1003E000FF3FFF3FFF3FFF3FFF3FFF3FFF3FFF3F1D
:1003F000FF3FFF3FFF3FFF3FFF3FFF3FFF3FFF3F0D
:10040000FF3FFF3FFF3FFF3FFF3FFF3FFF3FFF3FFC
:10041000FF3FFF3FFF3FFF3FFF3FFF3FFF3FFF3FEC
:10042000FF3FFF3FFF3FFF3FFF3FFF3FFF3FFF3FDC
:10043000FF3FFF3FFF3FFF3FFF3FFF3FFF3FFF3FCC
:10044000FF3FFF3FFF3FFF3FFF3FFF3FFF3FFF3FBC
:10045000FF3FFF3FFF3FFF3FFF3FFF3FFF3FFF3FAC
:10046000FF3FFF3FFF3FFF3FFF3FFF3FFF3FFF3F9C
:10047000FF3FFF3FFF3FFF3FFF3FFF3FFF3FFF3F8C
:10048000FF3FFF3FFF3FFF3FFF3FFF3FFF3FFF3F7C
:10049000FF3FFF3FFF3FFF3FFF3FFF3FFF3FFF3F6C
:1004A000FF3FFF3FFF3FFF3FFF3FFF3FFF3FFF3F5C
:1004B000FF3FFF3FFF3FFF3FFF3FFF3FFF3FFF3F4C
:1004C000FF3FFF3FFF3FFF3FFF3FFF3FFF3FFF3F3C
:1004D000FF3FFF3FFF3FFF3FFF3FFF3FFF3FFF3F2C
:1004E000FF3FFF3FFF3FFF3FFF3FFF3FFF3FFF3F1C
:1004F000FF3FFF3FFF3FFF3FFF3FFF3FFF3FFF3F0C
:10050000FF3FFF3FFF3FFF3FFF3FFF3FFF3FFF3FFB
:10051000FF3FFF3FFF3FFF3FFF3FFF3FFF3FFF3FEB
:10052000FF3FFF3FFF3FFF3FFF3FFF3FFF3FFF3FDB
:10053000FF3FFF3FFF3FFF3FFF3FFF3FFF3FFF3FCB
:10054000FF3FFF3FFF3FFF3FFF3FFF3FFF3FFF3FBB
:10055000FF3FFF3FFF3FFF3FFF3FFF3FFF3FFF3FAB
:10056000FF3FFF3FFF3FFF3FFF3FFF3FFF3FFF3F9B
:10057000FF3FFF3FFF3FFF3FFF3FFF3FFF3FFF3F8B
:10058000FF3FFF3FFF3FFF3FFF3FFF3FFF3FFF3F7B
:10059000FF3FFF3FFF3FFF3FFF3FFF3FFF3FFF3F6B
:1005A000FF3FFF3FFF3FFF3FFF3FFF3FFF3FFF3F5B
:1005B000FF3FFF3FFF3FFF3FFF3FFF3FFF3FFF3F4B
:1005C000FF3FFF3FFF3FFF3FFF3FFF3FFF3FFF3F3B
:1005D000FF3FFF3FFF3FFF3FFF3FFF3FFF3FFF3F2B
:1005E000FF3FFF3FFF3FFF3FFF3FFF3FFF3FFF3F1B
:1005F000FF3FFF3FFF3FFF3FFF3FFF3FFF3FFF3F0B
:10060000FF3FFF3FFF3FFF3FFF3FFF3FFF3FFF3FFA
:10061000FF3FFF3FFF3FFF3FFF3FFF3FFF3FFF3FEA
:10062000FF3FFF3FFF3FFF3FFF3FFF3FFF3FFF3FDA
:10063000FF3FFF3FFF3FFF3FFF3FFF3FFF3FFF3FCA
:10064000FF3FFF3FFF3FFF3FFF3FFF3FFF3FFF3FBA
:10065000FF3FFF3FFF3FFF3FFF3FFF3FFF3FFF3FAA
:10066000FF3FFF3FFF3FFF3FFF3FFF3FFF3FFF3F9A
:10067000FF3FFF3FFF3FFF3FFF3FFF3FFF3FFF3F8A
:10068000FF3FFF3FFF3FFF3FFF3FFF3FFF3FFF3F7A
:10069000FF3FFF3FFF3FFF3FFF3FFF3FFF3FFF3F6A
:1006A000FF3FFF3FFF3FFF3FFF3FFF3FFF3FFF3F5A
:1006B000FF3FFF3FFF3FFF3FFF3FFF3FFF3FFF3F4A
:1006C000FF3FFF3FFF3FFF3FFF3FFF3FFF3FFF3F3A
:1006D000FF3FFF3FFF3FFF3FFF3FFF3FFF3FFF3F2A
:1006E000FF3FFF3FFF3FFF3FFF3FFF3FFF3FFF3F1A
:1006F000FF3FFF3FFF3FFF3FFF3FFF3FFF3FFF3F0A
:10070000FF3FFF3FFF3FFF3FFF3FFF3FFF3FFF3FF9
:10071000FF3FFF3FFF3FFF3FFF3FFF3FFF3FFF3FE9
:10072000FF3FFF3FFF3FFF3FFF3FFF3FFF3FFF3FD9
:10073000FF3FFF3FFF3FFF3FFF3FFF3FFF3FFF3FC9
:10074000FF3FFF3FFF3FFF3FFF3FFF3FFF3FFF3FB9
:10075000FF3FFF3FFF3FFF3FFF3FFF3FFF3FFF3FA9
:10076000FF3FFF3FFF3FFF3FFF3FFF3FFF3FFF3F99
:10077000FF3FFF3FFF3FFF3FFF3FFF3FFF3FFF3F89
:10078000FF3FFF3FFF3FFF3FFF3FFF3FFF3FFF3F79
:10079000FF3FFF3FFF3FFF3FFF3FFF3FFF3FFF3F69
:1007A000FF3FFF3FFF3FFF3FFF3FFF3FFF3FFF3F59
:1007B000FF3FFF3FFF3FFF3FFF3FFF3FFF3FFF3F49
:1007C000FF3FFF3FFF3FFF3FFF3FFF3FFF3FFF3F39
:1007D000FF3FFF3FFF3FFF3FFF3FFF3FFF3FFF3F29
:1007E000FF3FFF3FFF3FFF3FFF3FFF3FFF3FFF3F19
:1007F000FF3FFF3FFF3FFF3FFF3FFF3FFF3FFF3F09
:08400000FF3FFF3FFF3FFF3FC0
:02400E00FF3F72
:10420000FF00FF00FF00FF00FF00FF00FF00FF00B6
:10421000FF00FF00FF00FF00FF00FF00FF00FF00A6
:10422000FF00FF00FF00FF00FF00FF00FF00FF0096
:10423000FF00FF00FF00FF00FF00FF00FF00FF0086
:10424000FF00FF00FF00FF00FF00FF00FF00FF0076
:10425000FF00FF00FF00FF00FF00FF00FF00FF0066
:10426000FF00FF00FF00FF00FF00FF00FF00FF0056
:10427000FF00FF00FF00FF00FF00FF00FF00FF0046
:00000001FF


On May 29, 2007, at 12:23 PM, David Barnett wrote:

> Have you verified that the generated HEX file looks normal (not  
> extremely short/empty, etc.)?  I don't know anything about odyssey,  
> but there's not much to the HEX files that could be "incompatible"  
> with anything...they're just bytes and checksums.  Is it possible  
> you enabled code protect on your chip?  The HEX file you read could  
> also be empty if you haven't already checked that.
>
> David Barnett
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: ####@####.####
> For additional commands, e-mail: ####@####.####
Subject: Re: [gnupic] gpasm hex files, compatibility with odyssey
From: Tim Allen ####@####.####
Date: 29 May 2007 17:47:26 +0100
Message-Id: <E9E75750-8DF9-45DC-B186-21DAB659CC8C@integsys.biz>

hexdump indicates they both end in 0x0a46

On May 29, 2007, at 12:34 PM, Tamas Rudnai wrote:

> Just wondering: could it be possible that the end-of-line character is
> different than your programmer accept? For example CRLF expected  
> but only LF
> are there or vica versa?
>
> Tamas
>
>
>
>
> On 5/29/07, David Barnett ####@####.#### wrote:
>>
>> Have you verified that the generated HEX file looks normal (not  
>> extremely
>> short/empty, etc.)?  I don't know anything about odyssey, but  
>> there's not
>> much to the HEX files that could be "incompatible" with  
>> anything...they're
>> just bytes and checksums.  Is it possible you enabled code protect  
>> on your
>> chip?  The HEX file you read could also be empty if you haven't  
>> already
>> checked that.
>>
>> David Barnett
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: ####@####.####
>> For additional commands, e-mail: ####@####.####
>>
>>
Subject: Re: [gnupic] gpasm hex files, compatibility with odyssey
From: Scott Dattalo ####@####.####
Date: 29 May 2007 18:43:43 +0100
Message-Id: <465C6644.4050606@dattalo.com>

Tamas Rudnai wrote:
> Just wondering: could it be possible that the end-of-line character is
> different than your programmer accept? For example CRLF expected but 
> only LF
> are there or vica versa?

I agree with Tamas, the CRLF vs LF issue is a source of incompatibility. 
I know that MCHIP tools do not like UNIX style end of lines.

Scott


Subject: Re: [gnupic] gpasm hex files, compatibility with odyssey
From: "David Barnett" ####@####.####
Date: 29 May 2007 18:45:07 +0100
Message-Id: <00d401c7a219$11e74600$0301a8c0@barnett2>

----- Original Message ----- 
From: "Tim Allen" ####@####.####
To: ####@####.####
Sent: Tuesday, May 29, 2007 11:43 AM
Subject: Re: [gnupic] gpasm hex files, compatibility with odyssey


>I would expect my HelloWorld hex file to be short as there not much  to it; 
>however, a read of the entire chip I would expect to be much  larger- I 
>assume zero padding is not necessary as no one has  mentioned it. I have 
>pasted the respective hex files... As for the  write protect, it's a new 
>chip and I am able to write back the hex  that I read from the chip using 
>odyssey.
>
> tim.hex (the file read via odyssey from the chip):
>
> :10000000FF3FFF3FFF3FFF3FFF3FFF3FFF3FFF3F00
> ...
> :10420000FF00FF00FF00FF00FF00FF00FF00FF00B6
> ...
I think those are just the default memory values when you blank out the 
chip.  At any rate, since you're writing exactly what you read, the verify 
will pass whether the write worked or not.  I think chips with code protect 
active will still do this.

I'm not sure what memory range they're in offhand, but I think the read 
includes the config bits, so you can check for sure whether code protect is 
enabled or not if you look them up and check their values.  FYI, the HEX 
format is something like: address, length, data, checksum on each line.  I 
think 3FFF is the default and translates to a nop instruction.

It might be something else entirely, but that's the best I could tell you.

David Barnett 

Subject: Re: [gnupic] gpasm hex files, compatibility with odyssey
From: Don Wooton ####@####.####
Date: 29 May 2007 21:14:52 +0100
Message-Id: <20070529201424.GC26772@snuggle.org>

Your file HelloWorld.hex contains one section (no config!!)

    section 1/1
           0x0000 - 0x0016, length 0x0017, 23 words
 0000  280f 30ff  008c 0000  0b8c 2803  0008 008e |.(.0.......(....|
 0008  30ff 008d  2001 0b8d  280a 080e  0008 3000 |.0... ...(.....0|
 0010  0065 0066  30ff 0086  2007 0986  2814      |e.f..0... ...(|

The code looks like this

$ gpdasm -p 16F84 HelloWorld.hex
000000:  280f  goto     0xf
000001:  30ff  movlw    0xff
000002:  008c  movwf    0xc
000003:  0000  nop
000004:  0b8c  decfsz   0xc, f
000005:  2803  goto     0x3
000006:  0008  return
000007:  008e  movwf    0xe
000008:  30ff  movlw    0xff
000009:  008d  movwf    0xd
00000a:  2001  call     0x1
00000b:  0b8d  decfsz   0xd, f
00000c:  280a  goto     0xa
00000d:  080e  movf     0xe, w
00000e:  0008  return
00000f:  3000  movlw    0
000010:  0065  tris     0x65
000011:  0066  tris     0x66
000012:  30ff  movlw    0xff
000013:  0086  movwf    0x6
000014:  2007  call     0x7
000015:  0986  comf     0x6, f
000016:  2814  goto     0x14

Your file tim.hex indicates an erased pic

    section 1/4
           0x0000 - 0x03ff, length 0x0400, 1024 words
 0000  3fff 3fff  3fff 3fff  3fff 3fff  3fff 3fff |.?.?.?.?.?.?.?.?|
 *
 07f8
    section 2/4
           0x2000 - 0x2003, length 0x0004, 4 words
 2000  3fff 3fff  3fff 3fff                       |.?.?.?.?|
    section 3/4
           0x2007 - 0x2007, length 0x0001, 1 words
 2007  3fff                                       |.?|
    section 4/4
           0x2100 - 0x213f, length 0x0040, 64 words
 2100  00ff 00ff  00ff 00ff  00ff 00ff  00ff 00ff |................|
 *
 2178


Subject: Re: [gnupic] gpasm hex files, compatibility with odyssey
From: Holger Oehm ####@####.####
Date: 29 May 2007 21:43:04 +0100
Message-Id: <200705292243.00039.holger.oehm@holger-oehm.de>

On Tuesday 29 May 2007, Tim Allen wrote:
> It appears that no one else uses this programmer software- can anyone  
> suggest a better one. We only use Linux / Unix in the labs and I  
> would prefer one that is configurable and uses the parallel port.
> [...]

Hi Tim,

I use (and can recommend) the programmer software that comes with 
PikDev (http://pikdev.free.fr/). I use it with a homebrew programmer
(http://www.sprut.de/electronic/pic/brenner/index.htm#brenner5).

In the configuration screen of the programmer software 
you can test the pins (set Vdd or Clock to a fixed level etc.).
That one helped me even to test my programmer hardware. But in 
the end the first pre-defined configuration worked as my 
hardware happened to be compatible with Tait's programmer.

Best,
Holger.

-- 
Holger Oehm ####@####.####
KeyID: B50E51A9, 1024bit at http://www.holger-oehm.de/public-key.asc
Fingerprint: E92A 5C2C 497A 44ED 23C0  DB66 1DD9 3EF7 B50E 51A9

[Content type application/pgp-signature not shown. Download]
[<<] [<] Page 1 of 1 [>] [>>]


Powered by ezmlm-browse 0.20.