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

C compiled part inside assembler

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



Joined: 22 Aug 2005
Posts: 275

View user's profile Send private message

C compiled part inside assembler
PostPosted: Mon Nov 14, 2005 2:40 am     Reply with quote

Hi everybody,

I have an old project compiled in assembler with MPLAB. Now I want to include a new part compiled in C.

1) Is it Possible ?
2) Is there any example somewere ?

Thanks for support,

Regards,
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Mon Nov 14, 2005 6:11 pm     Reply with quote

Quote:
I have an old project compiled in assembler with MPLAB.
Now I want to include a new part compiled in C.

The CCS compiler doesn't (yet) produce linkable object modules.
You would have to use a different C compiler.

Here is a thread on the Microchip forum on the topic:
http://forum.microchip.com/tm.asp?m=101387&mpage=1&key=asm%2Cmodules&anchor#101420
cwilliams@edge-pdc.com
Guest







mixing C and assembler
PostPosted: Tue Dec 13, 2005 2:13 pm     Reply with quote

I'm using CCS PCH v3.214 with MPLAB 7.10 and MPASM etc 3.90.01.

The project was originally written in assembler, and then some floating point stuff was added using C. I have the source but not the tools. My tools (above) won't compile/assemble and link this.

Do I need different tools?
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Tue Dec 13, 2005 5:29 pm     Reply with quote

Either get new tools, or convert the ASM code into C.
asmallri



Joined: 12 Aug 2004
Posts: 1634
Location: Perth, Australia

View user's profile Send private message Send e-mail Visit poster's website

PostPosted: Tue Dec 13, 2005 7:22 pm     Reply with quote

If you have the assembler source code you can use CCS's mini assembler and embedd the code in your C code.
_________________
Regards, Andrew

http://www.brushelectronics.com/software
Home of Ethernet, SD card and Encrypted Serial Bootloaders for PICs!!
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Tue Dec 13, 2005 7:47 pm     Reply with quote

Yes, but people are always complaining that they can't
do everything they want with the CCS inline assembler.
asmallri



Joined: 12 Aug 2004
Posts: 1634
Location: Perth, Australia

View user's profile Send private message Send e-mail Visit poster's website

PostPosted: Tue Dec 13, 2005 8:12 pm     Reply with quote

PCM programmer wrote:
Yes, but people are always complaining that they can't
do everything they want with the CCS inline assembler.


On one hand I agree with them. It is a pain that it doesn't , especially not supporting all the FSRs, but on the otherhand its not rocket science to change the affected code.
_________________
Regards, Andrew

http://www.brushelectronics.com/software
Home of Ethernet, SD card and Encrypted Serial Bootloaders for PICs!!
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