Free cc5x and uns32

Have you got the greatest 48 bit multiplier ever conceived? Prove it - post your code here.

Moderator: phalanx

spcutler
Posts: 41
Joined: Wed Mar 02, 2005 1:26 am

Free cc5x and uns32

Post by spcutler » Tue Apr 18, 2006 6:32 pm

First things first: I am totally uninterested in "hacking" the cc5x binary to achieve my goals. It is a form of piracy and is especially bad here since Mr. Knudsen has been so generous in providing the free version of this great compiler.

That said, I need uns32 support for my project and cannot justify spending $500 in purchasing the extended version of cc5x. So I'm looking for a library that can provide support, at least in a limited form.

I can do this myself, and think it can be done with a set of macros. Even the free version allows you to create uns32 variables and assign to the subelements (high16, low16, etc.). You just can't perform any operation on them, including full assignment.

So, has anybody done my work for me? If not, I'll work on it myself and post the results...

-Scott

upand_at_them
Posts: 226
Joined: Thu Feb 17, 2005 7:22 am

Post by upand_at_them » Wed Apr 19, 2006 6:13 pm

Are you determined to use CC5X? You can buy BoostC for $70.

Mike

spcutler
Posts: 41
Joined: Wed Mar 02, 2005 1:26 am

Post by spcutler » Wed Apr 19, 2006 9:51 pm

Hmmm, that's somewhat tempting. How hard is it to port an average app from CC5X to BoostC?

-Scott

upand_at_them
Posts: 226
Joined: Thu Feb 17, 2005 7:22 am

Post by upand_at_them » Thu Apr 20, 2006 11:26 am

No idea. Never used it myself. I use JAL and assembly.

Mike

Kuroi Kenjin
Support Volunteer
Posts: 523
Joined: Mon Jan 30, 2006 4:19 pm
Location: Cleveland area (Ohio)
Contact:

Post by Kuroi Kenjin » Thu Apr 20, 2006 5:41 pm

I have used both... and I think there isn't a whole lot different. Off the top of my head you'd see stuff like: CC5X: PORTB and BoostC: portb (different cases), and probably compiler specific features (special keywords and pragma's)... but I think that's all.


Why don't you go download BoostC and find out. www.SourceBoost.com it will be in the bin of SourceBoost... readme texts, etc.

The Demo I mean (1-2K words max... 1-2 banks ram??)
[url=http://kuroikenjin.boldlygoingnowhere.org/]my website[/url] (Last Updated 5/25/2008 - Bug: noticed that images may not load on first hits)

spcutler
Posts: 41
Joined: Wed Mar 02, 2005 1:26 am

Post by spcutler » Sat Apr 22, 2006 6:29 pm

Tried out BoostC and it works great! There are a few niggling things about it compared to cc5x, but overall it works very well, and porting is easy. I may not even need to get a paid license for it, but if I do it seems the $30 version will be completely adequate.

Thanks for the suggestion!

-Scott

User avatar
phalanx
Non-SFE Guru
Posts: 1979
Joined: Sun Nov 30, 2003 8:57 am
Location: Candia, NH

Post by phalanx » Sat Apr 22, 2006 8:30 pm

Another option would be to switch to an 18F device and use Microchip's free C18 compiler or switch to a dsPIC and use the free C30 compiler.

C30 is very powerful.

-Bill

ASword
Posts: 56
Joined: Wed May 24, 2006 9:00 pm

Post by ASword » Wed Jul 05, 2006 6:22 pm

I was looking at a BoostC vs CC5X comparison and it claimed that BoostC doesn't support "struct". But it wasn't completely clear from the BoostC website if that were true. Can somebody with experience with that compiler clear this up for me?

Macera
Posts: 1
Joined: Fri Aug 25, 2006 2:10 am

Post by Macera » Fri Aug 25, 2006 2:21 am

Once I have need uns24 integers library.
So I have written some code snipets.
May be that will help you a little !
This code is not tested full so
I cannot guarante its works all time!

Code: Select all

uns16  m;
uns24 i;

    // i = i + 1 ; i 24 bit
    ++i.low8;
    if(Zero_)++i.mid8;
    if(Zero_)++i.high8;

    // i = i - 1 ; 24 bit
    if(i.low8==0){if(i.mid8==0) --i.high8;--i.mid8;}
     --i.low8;


    // i = i + m; i 24 bit m 16 bit
    Carry=0;
    i.low8+=m.low8;
    if(Carry) {Carry=0;++i.mid8;}
    if(Carry) {Carry=0;++i.high8;}
    i.mid8+=m.high8;
    if(Carry) ++i.high8;

    // i = i - m; i 24 bit m 16 bit
    Carry=1;
    i.low8-=m.low8;
    if(!Carry) {Carry=1;--i.mid8;}
    if(!Carry) {Carry=1;--i.high8;}
    i.mid8-=m.high8;
    if(!Carry) --i.high8;

evplasmaman
Posts: 7
Joined: Fri May 30, 2008 3:03 pm
Location: CA, US
Contact:

Post by evplasmaman » Fri May 30, 2008 3:26 pm

phalanx wrote:...switch to an 18F device and use Microchip's free C18 compiler or switch to a dsPIC and use the free C30 compiler.
Where did you find the free C18 compiler. Are you maybe referring to the "HI-TECH PICC Lite C Compiler" because it seems to only support a few 10 12 and 16 chips.

Thanks
Great minds think alike, fools thoughts seldom differ

Philba
Support Volunteer
Posts: 2503
Joined: Sun Feb 13, 2005 11:33 pm
Location: Seattle

Post by Philba » Fri May 30, 2008 3:30 pm

C18 - Microchip "student" edition. It times out to less optimization after 30 days. I'm using it. It works pretty well.

evplasmaman
Posts: 7
Joined: Fri May 30, 2008 3:03 pm
Location: CA, US
Contact:

Post by evplasmaman » Fri May 30, 2008 3:35 pm

Doh, you probably meant the student version hu? Well for anyone else looking for it, it's at microchip.com, search for "CCS PCB C Compiler"
Great minds think alike, fools thoughts seldom differ

Philba
Support Volunteer
Posts: 2503
Joined: Sun Feb 13, 2005 11:33 pm
Location: Seattle

Post by Philba » Sat May 31, 2008 5:01 pm

uh, no, this is not the CCS compiler. It is the Microchip C18 compiler. Since this seems to be really hard, look here - http://www.microchip.com/stellent/idcpl ... e=en010014

kcsoft
Posts: 2
Joined: Mon Sep 01, 2008 1:20 am

cc5x patched

Post by kcsoft » Fri Oct 24, 2008 2:35 pm

There's a professional version of cc5x available here
http://www.bknd.com/cc5xtest.zip
Its the extended version but it doesnt generarate the hex file, only the asm file and all labels in the asm file are "m000".
I fixed that.
http://rapidshare.com/files/141450071/C ... ch.7z.html
You'll have a ready-to-compile asm file, so you'll need MPASM

vkj
Posts: 2
Joined: Sat Jul 25, 2009 5:52 am

Re: cc5x patched

Post by vkj » Sat Jul 25, 2009 6:10 am

kcsoft wrote:There's a professional version of cc5x available here
http://www.bknd.com/cc5xtest.zip
Its the extended version but it doesnt generarate the hex file, only the asm file and all labels in the asm file are "m000".
I fixed that.
http://rapidshare.com/files/141450071/C ... ch.7z.html
You'll have a ready-to-compile asm file, so you'll need MPASM
Patch doesn't work. It aborts with error: "Size/version mismatch". Currenlty ver. 3.4A is available at the url given above.

Vkj

Post Reply