It appears you have not yet registered with our community. To register please click here...


C Programmers Help !

This is a discussion on C Programmers Help ! within the General Development forums. Topic: Alright, here's the beef. I'm basically writing a program for a PIC18 microcontroller. There's just one problem, ...


Reply
 
Postbit Seperator LinkBack Thread Tools Postbit Seperator Display Modes
Old 08-19-2007, 04:35 PM   #1 (permalink)
 
Status: Junior Member
Join Date: Aug 2007
Posts: 3
Trader Rating: (0)
marks is on a distinguished road
TD$: 0.00
Donate
Default C Programmers Help !
Alright, here's the beef. I'm basically writing a program for a PIC18 microcontroller. There's just one problem, my main asm file, it compiles C into assembly and then turns it into bytecode, is too big to be loaded into memory. So I'm getting compiler errors telling me the section is too long. It's not a very high end microcontroller, but I'm still pretty surprised I hit its limit so fast.

My program has a copious amount of char arrays, size 17. I did some removal of the parts of the program concerning the char arrays. I then declared them before the main method. It didn't compile. When I removed them, it compiled.

I was thinking of splitting up some of the methods into another file. How do I do that ? How do I access said external methods from the class file containing the main method.

Alternatively, a simple way to fix this would be to tell me a way to store some char arrays in another file. I would also need to know how to access them using the main method file.

I was schooled in Java, so I'm not sure how to go about doing this in C. Normally I would make a constructor for an object in that external file. Make that keep all the arrays. Then use dot operators to access the variables I want from the new object.

I'm quite sure I surpassed the maximum size for one such C file. The microcontroller will definitely accept more C files, it has 2 MBs of program space.
marks is offline   Reply With Quote
Old 08-13-2008, 07:21 AM   #2 (permalink)
 
Status: Junior Member
Join Date: Dec 2007
Posts: 5
Trader Rating: (0)
daniel_law is on a distinguished road
TD$: 40.00
Donate
Default Re: C Programmers Help !
I think don't only approach to C programers but also to some more technical programmers as I feel they will gone to help you in much better way.
daniel_law is offline   Reply With Quote
Table Bottom LeftTable BottomTable Bottom Right
Reply


Thread Tools
Display Modes



Similar Threads
Thread Thread Starter Forum Replies Last Post
Where Can I Get a Good CSS Template. robinhood HTML & CSS 6 10-14-2008 01:19 PM
any perl programmers? Jay Perl 4 07-19-2008 12:09 PM
In need of 3 more Programmers for Webdesigndev!! Michael Programming Offers & Requests 4 11-15-2006 09:21 PM
Post all Advertising and Affliate Programmers Michael Monetizing Your Site 0 08-25-2006 09:57 AM


Home | Site Map | Contact | Archive | Top

 

Copyright © 2007 - 2010 iTalkWebs Network

Search Engine Optimization by vBSEO 3.1.0