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 CCS Technical Support

INHX8M file format
Goto page 1, 2  Next
 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
MCR
Guest







INHX8M file format
PostPosted: Mon Jan 10, 2005 8:02 am     Reply with quote

Hi,

I use a Velleman K8048 kit as a programmer with the programming software that came with it.
The programming software only accepts a INHX8M hex file.
How must i configure the CCS compiler to make a INHX8M as output file.

Martijn(Netherlands)
Mark



Joined: 07 Sep 2003
Posts: 2838
Location: Atlanta, GA

View user's profile Send private message Send e-mail

PostPosted: Mon Jan 10, 2005 8:58 am     Reply with quote

That is the format of the hex file.
Guest








PostPosted: Mon Jan 10, 2005 10:11 am     Reply with quote

still i get the message wrong file format from my programmer. It does work with another C compiler.
Mark



Joined: 07 Sep 2003
Posts: 2838
Location: Atlanta, GA

View user's profile Send private message Send e-mail

PostPosted: Mon Jan 10, 2005 10:23 am     Reply with quote

From the help file
Quote:

File Formats


The compiler can output 8 bit hex, 16 bit hex, and binary files. Two listing formats are available. Standard format resembles the Microchip tools and may be required by some third-party tools. The simple format is easier to read. The debug file may either be a Microchip .COD file or Advanced Transdata .MAP file. All file formats and extensions are selected via the Options|File Formats menu option in the Windows IDE.

And a quote from PCM Programmer
Quote:
Quote:
My programmer is writen for Hex codes generated by assembler, not C compiler. Does this matter? I had no trouble before when I used assembler. For programming convenience i'm trying move to C.

It will almost certainly work with Hex files generated by a compiler.
The only possible problem would be if your programmer doesn't like
the comment that CCS puts at the end of its Hex files. ie:
Code:
;PIC16F877

Most modern programmers don't complain about this.
MCR
Guest







PostPosted: Tue Jan 11, 2005 7:38 am     Reply with quote

Still get the same problem. I really got now idea how to fix this. Is there an easy DIY programmer that i can build to go with CCS?
ckielstra



Joined: 18 Mar 2004
Posts: 3680
Location: The Netherlands

View user's profile Send private message

PostPosted: Tue Jan 11, 2005 8:15 am     Reply with quote

The CCS compiler generates an almost standard Intel Hex file and it shouldn't be a problem to read this into most programmers. One of the minor differences is the appended chip-id at the file end.

You don't give us any information, so we can't help you.

Information we are looking for is something like:
- What is the error message you get from your programmer?
- Do you get an immediate answer on loading the file by the programmer, or is it somewhere halfway the programming process?
- What exactly did you try to solve the problem?
- Did you try manually removing the chip-id from the hex-file? (the last line, starting with a ';' not a ':')

Which compiler environment (IDE) are you using? The CCS IDE or Microchip MPLAB?
What are the compiler settings for the output file type? 8- or 16bits hex file?
Guest








PostPosted: Wed Jan 12, 2005 7:15 am     Reply with quote

Ok, here is some info:
I use MPlab with CCS PCWH as compiler
I get the message "Wrong file format" when try to open the hex file generated by ccs with the programmer software from Velleman(K8084 kit)
I tried to remove the ;pic id here but it did not work. I tried all setting si could make with ccs. 8 bit, 16 bit and some of the others settings, but i do not exactly know what they do. Is it possible to post both hex files so you guys can take a look at it?
Mark



Joined: 07 Sep 2003
Posts: 2838
Location: Atlanta, GA

View user's profile Send private message Send e-mail

PostPosted: Wed Jan 12, 2005 7:45 am     Reply with quote

I went here http://www.speedy-bl.com/pic16fxxx-e.htm and downloaded ProgPic2 and had no problems opening a hex file with the software.
ckielstra



Joined: 18 Mar 2004
Posts: 3680
Location: The Netherlands

View user's profile Send private message

PostPosted: Wed Jan 12, 2005 8:14 am     Reply with quote

The CCS compiler is generating standard Intel hex-files and you are one of the few people having problems. My guess is that the Velleman software has some special requirements.

Quote:
Is it possible to post both hex files so you guys can take a look at it?
Yes this is possible. Please post both the hex-files from the other compiler that is working and the ccs-hex file. In order to prevent posting large files, just post from both hex-files the first and last 10 lines.
Guest








PostPosted: Wed Jan 12, 2005 9:01 am     Reply with quote

The demo2 file from velleman:
:1000000012286430A1006430A00005181F2885184C
:100010001F2805191F2885191F28A00B0528A10BCB
:100020000328003407309F008316D73081008B01EE
:10003000C0308600FF308500831286017628860155
:100040000518292885184A2805196B288519762846
:100050001F2805182928203086000120303086000E
:1000600001203830860001203C30860001203E30DF
:10007000860001203F30860001203E3086000120AE
:100080003C30860001203830860001203030860068
:1000900001202B2885184A280130860001200230D3
:1000A00086000120043086000120083086000120EF
:1000B000103086000120203086000120103086009C
:1000C0000120083086000120043086000120023023
:1000D000860001204C2805196B2807308600012076
:1000E000012038308600012001206D2885197628EE
:1000F0000830860001200120003086000120012008
:0201000078285D
:02400E00613F10
:00000001FF

The ccs file:
:1000000000308A000428000084011F308305073077
:060010009F0009286300B7
:00000001FF
;PIC16F627

The ccs file contains this "program". I wanted to test the programming before i start my project so the program is very, very simple.
/*test.c*/
#INCLUDE <16f627.h>
void main ()
{
for(;;)
{
/*Very simple, nothing happens here!!*/
}
}
Mark



Joined: 07 Sep 2003
Posts: 2838
Location: Atlanta, GA

View user's profile Send private message Send e-mail

PostPosted: Wed Jan 12, 2005 9:06 am     Reply with quote

Worked for me. All I got was a warning about not having a config word in the file.
MCR
Guest







PostPosted: Wed Jan 12, 2005 9:09 am     Reply with quote

Must be the software from velleman than. Anyone here ever used the K8048 kit?
Mark



Joined: 07 Sep 2003
Posts: 2838
Location: Atlanta, GA

View user's profile Send private message Send e-mail

PostPosted: Wed Jan 12, 2005 9:12 am     Reply with quote

Then go visit the link I posted and try out that software. It should be the same one that you have, ProgPic2??
Guest








PostPosted: Wed Jan 12, 2005 9:24 am     Reply with quote

So far so good Mark! Thanks for your help!
MCR
Guest







PostPosted: Wed Jan 12, 2005 9:26 am     Reply with quote

That is another version of ProgPicII i got with the kit(might be newer).
Is it possible that the missing config word is the problem?
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Goto page 1, 2  Next
Page 1 of 2

 
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