Mike_Swede
Reged: Jun 28 2004
Posts: 3
Loc: Haellingsjoe, Sweden
|
|
Hi, I've been using the PICC-Lite to my 16F84 projects for a while now. Now I've hit the ceiling of the 16F84 in terms of space needed and wonder if it is possible to compile using the 16F627 combined with a define 16F628 to compile for the 16F628 target?
Reason being that I've seen, in the 16F627 header, that it has some precompiler ifdefs looking for a defined 16F628 and that my communication protocol looks really poor when I have to shorten down the strings I'm using to initial letters only... (I think I'm using around 200 characters in all, in my protocol, and each character seems to expand to around 2 "bytes" when compiled (I guess each consecutive character of a string compiles to a 'ret 0xcc')).
Thanks in advance! /Mike
http://www.lillhult.com/
|
John Payson
  
Reged: Oct 16 2003
Posts: 1251
|
|
The PIC-lite products are designed to prevent their use in creating oversized products. After all, if people could use the free PIC-lite to do everything, why would they want to spend big money for the 'real' compiler?
That having been said, if your project will mostly fit in 1K of storage except for some strings or data tables which go beyond that, you may be able to create two separate programs:
- The main program, written and compiled in C
- A collection of data-lookup tables, written in assembly-language using some other toolset.
The C program would have to use special access routines or tricks to access any of the data from the assembly-language part, and the hex files from both parts would have to be combined before use (easily done with a batch file), but for some types of data-heavy application this approach may be quite workable.
|
Mike_Swede
Reged: Jun 28 2004
Posts: 3
Loc: Haellingsjoe, Sweden
|
|
I already considered just compiling to asm, to assemble it all (MPASM doesn't come with any such limitations that I know of) instead of compiling it in one "big" C-file.
But - I found another way, I think, by using ebs_cc (found on gnupic.org) instead. It seems to be highly configurable and "generic" enough to fit even a 2kWord compile for a 16F628.
If it won't make it, I'm even considering building my own compiler. Would be nice giving it away under some sort of GPL conditions ;-) For no other reason than the satisfaction it would give me just handing it out for free to anyone asking for such a compiler.
I hope the ebs_cc will do.
Thanks!
|
Mike_Swede
Reged: Jun 28 2004
Posts: 3
Loc: Haellingsjoe, Sweden
|
|
In spite of the header text in the lib\piclite.ini file stating QUOTE # This file defines the memory sizes and organization # of PIC devices associated with the PICC Lite compiler. # Additions or modifications cannot be made. END QUOTE
I had a go at adding the section [16F628] ARCH=PIC14 PROCID=6628 ROMSIZE=800 BANKS=2 RAMBANK=20,7F RAMBANK=A0,EF COMMON=70,7F
between the original sections [16F627] and [12F629].
Seems to work beatiful - meaning that I won't have to build my own compiler yet ;-)...
Regards /Mike
|
lucky
Microchip staff
   
Reged: Oct 06 2003
Posts: 1204
Loc: Brisbane, Australia
|
|
Quote:
In spite of the header text in the lib\piclite.ini file stating
In spite of the warning we put in the INI file, people still attempt to change it and later wonder why things don't work as expected. 
-------------------- Matt Luckman
Microchip Technology Inc.
|
Dan Henry
Guru
  
Reged: Oct 16 2003
Posts: 4218
Loc: Colorado
|
|
Quote:
...I'm even considering building my own compiler. Would be nice giving it away under some sort of GPL conditions ;-) For no other reason than the satisfaction it would give me just handing it out for free to anyone asking for such a compiler.
Hmm, let's see... Doesn't that already exist?
http://sdcc.sourceforge.net/
Knowing that, if I had the choice, I'd find a way to use my time to make enough money to buy HI-TECH's PICC!
On the other hand, if it's purely for the academic exercise, I'd be the last to discourage you. Go for it!
Edited by Dan Henry (Thu Jul 01 2004 07:27 PM)
|