CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to support@ccsinfo.com

configuration word location in hex file

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
john bougs



Joined: 11 Feb 2005
Posts: 6

View user's profile Send private message

configuration word location in hex file
PostPosted: Fri Apr 29, 2005 11:40 am     Reply with quote

Arrow when I compile the code for a PIC10F206 I get the following at the end of my file. the ":0205FE00EB0F01" which is the configuration word, but has the wrong address.

The config address for the 10f206 is at address 3ffh and michrochip says "By convention the Configuration Word register is stored at the logical address location of 0xFFF within the hex file generated for the PIC10F200/202/204/206. This logical address location may not reflect the actual physical address for the part itself. It is the responsibility of the programming software to retrieve the Configuration Word register from the logical address within the hex file and translate the address to the proper physical location when programming."

so why does the CCS compiler use use a third address of 2ffh (5feh) for the configuration word location? Is there a way to change this so it works with Microchip PICkit Baseline Flash / BFMP programers?
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Fri Apr 29, 2005 12:01 pm     Reply with quote

I don't have PCW or PCWH, so I don't know for sure, but this screenshot
of the Device Editor doesn't appear to let you set the Config bits address.
http://www.ccsinfo.com/pix/Device%20Editor.gif
I think you'll have to tell CCS support about it and wait for an update.
Ttelmah
Guest







PostPosted: Sat Apr 30, 2005 5:01 am     Reply with quote

Only thing is that without seeing the rest of the hex file, you cannot tell where this is actually loading!.
There may well be an extended offset field loaded first (I'd expect this), which will then take the address in this record, and add it to the extended field, to give the actual load address. Look for an extended field in front of this (will have an '04' in the fourth byte), and see where the data is actually being put.

Best Wishes
john bougs



Joined: 11 Feb 2005
Posts: 6

View user's profile Send private message

PostPosted: Mon May 02, 2005 11:34 am     Reply with quote

there are no extended records in the hex file.

Code:

:1000400028000400E802210AE9021F0A4A0C2800DD
:10005000E802280A00000400F3021D0A00080B044D
:100060000B0206000604080C33000000000000002C
:10007000F3055B0AF30432030306430A06040B0488
:100080000B020600470A00000B050B0206000000E9
:10009000D3055B0AD3040B07510A6606530ACC0545
:1000A000650A00000000F3023B0A000000000000A7
:1000B0000B050B020600190C2900E9025D0A00007D
:1000C0000000F3063A0AD3064A0A180B080C280067
:1000D0006B050B02060066066B0A7400E8057E0AD3
:1000E000E8047E0A0304660603053403C8057E0A95
:1000F000C804E802720A140229008A0A1C0CE806E5
:10010000070C2900E902820A0000E806700AC80606
:10011000780A720A980A050C330032024306A60ACE
:10012000FF0C320032024306A40A66069A0A020A4B
:100130000902A80A04000400020C2800E8029E0A32
:1001400000000000F200920AF2008D0AFF0C290064
:1001500000080B040B0206000604080C3400000023
:1001600000000000F405C30AF40433030306060587
:1001700003070604D405C30AD404F402B50A000038
:100180000000000006051C0C2900E902C50AF4065F
:10019000B40AD406BC0A0008080C28006B050B0240
:1001A00006006606D10A7400E805E40AE804E40AD9
:1001B0000304660603053403C805E40AC804E8021C
:1001C000D80A14022900F00A1C0CE806070C2900C2
:1001D000E902E80A0000E806D60AC806DE0AD80ADC
:1001E0007C0B64000B040B02060006050B040B02DB
:1001F000060006056A00FF0C2B006C00F70C2700B8
:100200004B050B0206000B050B020600080C020052
:100210000F0C2800070C61000F0C020004000802FC
:100220000200640C33001A090400780C3200040A3E
:100230002B040B02060026054B050B0206000B05DE
:100240000B0206007100030C28001102880003074E
:100250003C0B8B090902320011020B0929009200A4
:100260004307150B0D0CD1012400010220000A0CDC
:1002700033001A09B102230B4B040B02060046059A
:100280000B040B0206000605550C3300A909550C9A
:100290003300A9097100030C28001102880003072C
:1002A000580B1102100932003300A909B1024B0B9F
:1002B0007100030C2800110288000307680B0D0C65
:1002C000D1012400000232003300A909B102590B08
:1002D0007100030C2800110288000307A30B050C12
:1002E0003200330243068A0BFF0C3300330243060D
:1002F000880B66067E0B090A09028C0B04000400B9
:10030000020C2800E802820B00000000F300760BCC
:10031000F300710BFF0C2900090232000D0CD10112
:100320002400000292004307970B000C980B010C6D
:10033000330011021509290013028901000F430738
:10034000D80BB102690B4B050B0206000B050B0223
:1003500006002B040B02060026048B09C902B10B10
:10036000B20BAD0B8B090A0C89004307AD0B8B094F
:10037000150C89004307AD0B8B09AA0C89004307B4
:10038000AD0B8B09C902C50BC60BAD0B8B090A0C53
:1003900089004307AD0B8B09150C89004307AD0B92
:1003A0008B09AA0C89004307AD0BD70BAD0B140BBF
:1003B000280C3200FA0C33001A09F202DA0B140B83
:0203C000030038
:0205FE00EB0F01
:00000001FF
;BURNTIME 000016,000019 BINARY PROMPT="RANDOM"
;BURNTIME 000011,000014 BINARY PROMPT="SERIAL"
;PIC10F206
theMagni



Joined: 21 May 2004
Posts: 48
Location: Victoria, BC

View user's profile Send private message Visit poster's website

PostPosted: Mon May 02, 2005 3:50 pm     Reply with quote

It's broken.

That's the only thing I've got to say about it. We're using the 10F20X for some of our work, and the problem is with the compiler. They said it was fixed in the most recent version, but this is not the case.

According to Tech-Tools,

"CCS should be specifying an address of 07FEh(3FFh) for the 10F202/206 and address 03FEh(1FFh) for the 10F200/204. In your example, they have specified an address of 05FEh(2FFh) which is not valid for any of the 10F devices. "

What that means is that CCS put the configuration word in the wrong spot. I have done a few quick tests today. So far, it looks like they have not repeat NOT fixed the problem in version 3.224. Once I get a definitive answer, I'll let them know.

Edit to match your code. I had a really simple file without the burntime lines, and I posted without checking your code out.
The last bit of your code is:
Code:

:0203C000030038
:0205FE00EB0F01
:00000001FF
;BURNTIME 000016,000019 BINARY PROMPT="RANDOM"
;BURNTIME 000011,000014 BINARY PROMPT="SERIAL"
;PIC10F206

The address of the configuration word is 0x07FE, not 0x05FE. So you just have to change that 5 on the 5th line from the bottom to a 7.

Code:

:0203C000030038
:0207FE00EB0F01
:00000001FF
;BURNTIME 000016,000019 BINARY PROMPT="RANDOM"
;BURNTIME 000011,000014 BINARY PROMPT="SERIAL"
;PIC10F206

_________________
In the 90's, I promised myself I'd never use a so-called "smiley icon". I hate what I've become. ;)
guest
Guest







PostPosted: Tue May 03, 2005 3:53 pm     Reply with quote

don't you just hate it when this happens :(
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Tue May 03, 2005 4:03 pm     Reply with quote

You can't just edit the 5 and change it to a 7, because there's a checksum
on the end of each line. If you try to import it into MPLAB, you get
an error message regarding a corrupted HEX file.
djpark



Joined: 02 Mar 2004
Posts: 49

View user's profile Send private message

PostPosted: Wed Jun 15, 2005 11:11 am     Reply with quote

PCM programmer wrote:
You can't just edit the 5 and change it to a 7, because there's a checksum on the end of each line. If you try to import it into MPLAB, you get an error message regarding a corrupted HEX file.


The checksum is 2's compliment so it is easy to fix it.

Since total checksum value is increased by 2, decrease the checksum byte by 2. So change this

:0205FE00EB0F01

to

:0207FE00EB0FFF

and the checksum will be correct.

However, I tried both version on BFMP, and got no difference.
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group