Go to Post This is not an engineering design challenge, this is a project management and common sense challenge with engineering elements. Don't go out of your way to screw yourself. - PayneTrain [more]
Home
Go Back   Chief Delphi > Technical > Programming
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Closed Thread
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 24-03-2006, 23:56
EHaskins EHaskins is offline
Needs to change his user title.
AKA: Eric Haskins
no team (CARD #6 (SCOE))
Team Role: College Student
 
Join Date: Jan 2006
Rookie Year: 2006
Location: Elkhorn, WI USA
Posts: 998
EHaskins has a reputation beyond reputeEHaskins has a reputation beyond reputeEHaskins has a reputation beyond reputeEHaskins has a reputation beyond reputeEHaskins has a reputation beyond reputeEHaskins has a reputation beyond reputeEHaskins has a reputation beyond reputeEHaskins has a reputation beyond reputeEHaskins has a reputation beyond reputeEHaskins has a reputation beyond reputeEHaskins has a reputation beyond repute
Send a message via MSN to EHaskins
Using MCC18 in a custom program

I am would like to create a hybrid between EasyC and MPLab. I would like to make it be able to import and export to MPLab. Is it possible to write a program in VB.net or C#.net that can use Microchips C18 complier? i know there are a number of .Exes in the mcc18/bin/ folder. I think i would somehow need to run the compiler, linker, and mabe other programs, but i don't know how to run or get a response from the .EXEs.

Any help would be appreciated
  #2   Spotlight this post!  
Unread 25-03-2006, 00:25
JBotAlan's Avatar
JBotAlan JBotAlan is offline
Forever chasing the 'bot around
AKA: Jacob Rau
FRC #5263
Team Role: Mentor
 
Join Date: Sep 2004
Rookie Year: 2004
Location: Riverview, MI
Posts: 723
JBotAlan has a reputation beyond reputeJBotAlan has a reputation beyond reputeJBotAlan has a reputation beyond reputeJBotAlan has a reputation beyond reputeJBotAlan has a reputation beyond reputeJBotAlan has a reputation beyond reputeJBotAlan has a reputation beyond reputeJBotAlan has a reputation beyond reputeJBotAlan has a reputation beyond reputeJBotAlan has a reputation beyond reputeJBotAlan has a reputation beyond repute
Send a message via AIM to JBotAlan Send a message via Yahoo to JBotAlan
Re: Using MCC18 in a custom program

I had considered this before as I was getting some very erratic behavior out of MPLAB. My guess would be to either consult the MCC18 manual for what EXE needs what parameters (the long way), or watch what gets passed to which EXE in the compiler output in MPLAB and hard-code it (the short way). During off-season, us programmers need to unite and create FIRST-IDE, still using the MCC18 compiler, but blowing away MPLAB's little ability to keep code good-looking, along with nicer features. Since I have to contend with that hideous IDE for another 2 years, it would definitely be worth coding something up to replace it.

Notice: This is not meant in any way to cut on Microchip. Thank you for all that you do, and all the time and money you have put into FIRST. Things would be very hard without the compiler and IDE you donated. Thanks again.

Yeah, eventually I think I'll start a sourceforge for this once I get some off time to start. I'll create a new thread once I get something working.

JBotAlan

PS - keep me posted on what you come up with. I have been very interested in replacing this IDE, and what you want to do sounds cool.
__________________
Aren't signatures a bit outdated?
  #3   Spotlight this post!  
Unread 25-03-2006, 08:16
JJG13's Avatar
JJG13 JJG13 is offline
Yoda
AKA: Joshua Graffman
None #0180 (SPAM)
Team Role: Alumni
 
Join Date: Dec 2002
Rookie Year: 2003
Location: Martin County, Florida
Posts: 105
JJG13 has a spectacular aura aboutJJG13 has a spectacular aura aboutJJG13 has a spectacular aura about
Re: Using MCC18 in a custom program

Quote:
Originally Posted by EHaskins
I am would like to create a hybrid between EasyC and MPLab. I would like to make it be able to import and export to MPLab. Is it possible to write a program in VB.net or C#.net that can use Microchips C18 complier? i know there are a number of .Exes in the mcc18/bin/ folder. I think i would somehow need to run the compiler, linker, and mabe other programs, but i don't know how to run or get a response from the .EXEs.

Any help would be appreciated
Its fairly easy to use the C18 compiler. First you should check out this thread that gives an example of how to construct and use a makefile. The makefile will allow you to manage the compilation of all the files in your project. You can have your program autogenerate this makefile which would save you time and effort.
When you want to compile and link you just need to run make with your desired parameters such as "clean all -f FILENAME" (where FILENAME is the filename of your makefile).

For more information on makefiles, take a look at this.
__________________
Behold the power of SPAM.

Last edited by JJG13 : 25-03-2006 at 08:20.
  #4   Spotlight this post!  
Unread 25-03-2006, 14:09
Mike's Avatar
Mike Mike is offline
has common ground with Matt Krass
AKA: Mike Sorrenti
FRC #0237 (Sie-H2O-Bots (See-Hoe-Bots) [T.R.I.B.E.])
Team Role: Programmer
 
Join Date: Dec 2004
Rookie Year: 2004
Location: Watertown, CT
Posts: 1,003
Mike has a reputation beyond reputeMike has a reputation beyond reputeMike has a reputation beyond reputeMike has a reputation beyond reputeMike has a reputation beyond reputeMike has a reputation beyond reputeMike has a reputation beyond reputeMike has a reputation beyond reputeMike has a reputation beyond reputeMike has a reputation beyond reputeMike has a reputation beyond repute
Re: Using MCC18 in a custom program

Quote:
Originally Posted by JBotAlan
PS - keep me posted on what you come up with. I have been very interested in replacing this IDE, and what you want to do sounds cool.
Why re-invent the wheel? From what I understand*, the MCC18 compiler can be used very easily independent of MPLab. I bet in a couple hours of googling, one can figure out how to integrate it with any IDE that supports multiple compilers (such as Eclipse, Programmers Notepad, etc.)

* I've yet to actually try to integrate MCC18 with any other program, but I know it has been done with Eclipse.
__________________
http://www.mikesorrenti.com/
  #5   Spotlight this post!  
Unread 25-03-2006, 16:26
X-Istence X-Istence is offline
Melt the RC controller!
AKA: Bert JW Regeer
no team
Team Role: Alumni
 
Join Date: Jan 2006
Rookie Year: 2006
Location: Montville
Posts: 151
X-Istence will become famous soon enoughX-Istence will become famous soon enough
Send a message via AIM to X-Istence Send a message via MSN to X-Istence
Re: Using MCC18 in a custom program

MPlab just needs to be tamed, that is all. I have actually so far preferred it to all other IDE's that are available on Windows. None of them shake a stick at Xcode yet, and for a standalone editor, SubEthaEdit is still the best all around, with all the features it offers, especially when it comes to making code look nice, and the ease of use to how people want their "tabing" done.
__________________
My Blog!
  #6   Spotlight this post!  
Unread 25-03-2006, 17:40
bear24rw's Avatar
bear24rw bear24rw is offline
Team 11 Programming Captain
AKA: Max T
FRC #0011 (MORT)
Team Role: Programmer
 
Join Date: Sep 2005
Rookie Year: 2005
Location: Flanders, NJ
Posts: 385
bear24rw is a splendid one to beholdbear24rw is a splendid one to beholdbear24rw is a splendid one to beholdbear24rw is a splendid one to beholdbear24rw is a splendid one to beholdbear24rw is a splendid one to beholdbear24rw is a splendid one to behold
Send a message via AIM to bear24rw
Re: Using MCC18 in a custom program

I want an IDE that allows you to collapse regions.. like Microsoft Visual Studio... anyone know of any?
  #7   Spotlight this post!  
Unread 25-03-2006, 18:18
Mike's Avatar
Mike Mike is offline
has common ground with Matt Krass
AKA: Mike Sorrenti
FRC #0237 (Sie-H2O-Bots (See-Hoe-Bots) [T.R.I.B.E.])
Team Role: Programmer
 
Join Date: Dec 2004
Rookie Year: 2004
Location: Watertown, CT
Posts: 1,003
Mike has a reputation beyond reputeMike has a reputation beyond reputeMike has a reputation beyond reputeMike has a reputation beyond reputeMike has a reputation beyond reputeMike has a reputation beyond reputeMike has a reputation beyond reputeMike has a reputation beyond reputeMike has a reputation beyond reputeMike has a reputation beyond reputeMike has a reputation beyond repute
Re: Using MCC18 in a custom program

Quote:
Originally Posted by bear24rw
I want an IDE that allows you to collapse regions.. like Microsoft Visual Studio... anyone know of any?
For AVR development I use the WinAVR project, which uses Programmers Notepad as the IDE. I think it is really good. Collapsible regions, decent syntax highlighting, good project management, tabbed browsing and overall good simplicity.

http://www.pnotepad.org/
__________________
http://www.mikesorrenti.com/
  #8   Spotlight this post!  
Unread 26-03-2006, 19:44
EHaskins EHaskins is offline
Needs to change his user title.
AKA: Eric Haskins
no team (CARD #6 (SCOE))
Team Role: College Student
 
Join Date: Jan 2006
Rookie Year: 2006
Location: Elkhorn, WI USA
Posts: 998
EHaskins has a reputation beyond reputeEHaskins has a reputation beyond reputeEHaskins has a reputation beyond reputeEHaskins has a reputation beyond reputeEHaskins has a reputation beyond reputeEHaskins has a reputation beyond reputeEHaskins has a reputation beyond reputeEHaskins has a reputation beyond reputeEHaskins has a reputation beyond reputeEHaskins has a reputation beyond reputeEHaskins has a reputation beyond repute
Send a message via MSN to EHaskins
Re: Using MCC18 in a custom program

I still haven't been able to find how to get the errors from the EXEs. If anyone can point me in the right direction i wound appreciate it.

Last edited by EHaskins : 26-03-2006 at 19:51.
  #9   Spotlight this post!  
Unread 26-03-2006, 20:10
JJG13's Avatar
JJG13 JJG13 is offline
Yoda
AKA: Joshua Graffman
None #0180 (SPAM)
Team Role: Alumni
 
Join Date: Dec 2002
Rookie Year: 2003
Location: Martin County, Florida
Posts: 105
JJG13 has a spectacular aura aboutJJG13 has a spectacular aura aboutJJG13 has a spectacular aura about
Re: Using MCC18 in a custom program

Quote:
Originally Posted by EHaskins
I still haven't been able to find how to get the errors from the EXEs. If anyone can point me in the right direction i wound appreciate it.
Capturing data from a console application is a real pain. Fortunately others have already traveled that path and you can see what they have done by looking at the code of just about any open source IDE. I'd advise you to download the source for the Dev C++ IDE and find the RunAndGetOutput function in Utils.pas. The source code is in Delphi but it should be easily convertable to C# or Visual Basic.
__________________
Behold the power of SPAM.
  #10   Spotlight this post!  
Unread 26-03-2006, 21:31
EHaskins EHaskins is offline
Needs to change his user title.
AKA: Eric Haskins
no team (CARD #6 (SCOE))
Team Role: College Student
 
Join Date: Jan 2006
Rookie Year: 2006
Location: Elkhorn, WI USA
Posts: 998
EHaskins has a reputation beyond reputeEHaskins has a reputation beyond reputeEHaskins has a reputation beyond reputeEHaskins has a reputation beyond reputeEHaskins has a reputation beyond reputeEHaskins has a reputation beyond reputeEHaskins has a reputation beyond reputeEHaskins has a reputation beyond reputeEHaskins has a reputation beyond reputeEHaskins has a reputation beyond reputeEHaskins has a reputation beyond repute
Send a message via MSN to EHaskins
Re: Using MCC18 in a custom program

I am not familiar with Delphi and can't find any vb or c# code to handle the text capturing. If anyone knows where i can find a sample in vb or C#?
  #11   Spotlight this post!  
Unread 26-03-2006, 22:13
JonathanLKS JonathanLKS is offline
Code::Blocks
FRC #0610 (The Coyotes)
Team Role: Leadership
 
Join Date: Feb 2006
Rookie Year: 2005
Location: Toronto
Posts: 36
JonathanLKS will become famous soon enough
Send a message via MSN to JonathanLKS
Re: Using MCC18 in a custom program

If anyone wants to try and use MCC18 with Code::Blocks Studio, here's the registry keys and project templates to use MCC18 with Code::Blocks.

It should work if MCC18 is installed at C:\mcc18, if not you'll have to edit the registry keys.

Move all but the registry key to wherever you installed codeblocks\share\CodeBlocks\templates

If anyone needs any information on the way to call mcc18 from the command line it's

For all .C Files
mcc18.exe FILENAME.C -fo=FILENAME.O /i "C:\mcc18\h" -p=18F8722 -D_FRC_BOARD

Then Once
mplink.exe /l "C:\mcc18\lib" ALL_.O_FILES "PATH_WHERE_ITS_LOCATED\18f8722.lkr" "PATH_WHERE_ITS_LOCATED\FRC_library_8722.lib" /m "PATH_WHERE_ITS_LOCATED\FrcCode.map" /o "PATH\FrcCode.cof"

P.S. The Error's are not displayed in the Build Messages but they are in the Build Log
Attached Files
File Type: zip mcc18.zip (2.9 KB, 58 views)

Last edited by JonathanLKS : 26-03-2006 at 22:17.
  #12   Spotlight this post!  
Unread 26-03-2006, 23:06
EHaskins EHaskins is offline
Needs to change his user title.
AKA: Eric Haskins
no team (CARD #6 (SCOE))
Team Role: College Student
 
Join Date: Jan 2006
Rookie Year: 2006
Location: Elkhorn, WI USA
Posts: 998
EHaskins has a reputation beyond reputeEHaskins has a reputation beyond reputeEHaskins has a reputation beyond reputeEHaskins has a reputation beyond reputeEHaskins has a reputation beyond reputeEHaskins has a reputation beyond reputeEHaskins has a reputation beyond reputeEHaskins has a reputation beyond reputeEHaskins has a reputation beyond reputeEHaskins has a reputation beyond reputeEHaskins has a reputation beyond repute
Send a message via MSN to EHaskins
Re: Using MCC18 in a custom program

I have submitted a project to Source Forge and i will put a link here if it is acepted.
  #13   Spotlight this post!  
Unread 25-04-2006, 13:01
CmptrGk's Avatar
CmptrGk CmptrGk is offline
Programming Mentor
AKA: Dillon
FRC #0716 (Who'sCTEKS)
Team Role: College Student
 
Join Date: Jan 2004
Rookie Year: 2004
Location: Kent,CT
Posts: 212
CmptrGk has much to be proud ofCmptrGk has much to be proud ofCmptrGk has much to be proud ofCmptrGk has much to be proud ofCmptrGk has much to be proud ofCmptrGk has much to be proud ofCmptrGk has much to be proud ofCmptrGk has much to be proud of
Re: Using MCC18 in a custom program

Quote:
Originally Posted by JonathanLKS
If anyone wants to try and use MCC18 with Code::Blocks Studio, here's the registry keys and project templates to use MCC18 with Code::Blocks.
i know that this thread is over a month old, but i was interested in using code::blocks. but the zip file that was attached was corrupted. i was wondering if somebody could repost an uncorrupted version, if one exists.
__________________
#14


"Great autonomous mode Dillon."," It hasn't been written yet"
after an Archimedes match


  #14   Spotlight this post!  
Unread 25-04-2006, 13:14
Joe Ross's Avatar Unsung FIRST Hero
Joe Ross Joe Ross is offline
Registered User
FRC #0330 (Beachbots)
Team Role: Engineer
 
Join Date: Jun 2001
Rookie Year: 1997
Location: Los Angeles, CA
Posts: 8,588
Joe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond repute
Re: Using MCC18 in a custom program

Quote:
Originally Posted by CmptrGk
i know that this thread is over a month old, but i was interested in using code::blocks. but the zip file that was attached was corrupted. i was wondering if somebody could repost an uncorrupted version, if one exists.
I was able to open the file with 7-zip, and then rezipped it with winzip.
Attached Files
File Type: zip mcc18.zip (2.7 KB, 51 views)
  #15   Spotlight this post!  
Unread 25-04-2006, 14:20
CmptrGk's Avatar
CmptrGk CmptrGk is offline
Programming Mentor
AKA: Dillon
FRC #0716 (Who'sCTEKS)
Team Role: College Student
 
Join Date: Jan 2004
Rookie Year: 2004
Location: Kent,CT
Posts: 212
CmptrGk has much to be proud ofCmptrGk has much to be proud ofCmptrGk has much to be proud ofCmptrGk has much to be proud ofCmptrGk has much to be proud ofCmptrGk has much to be proud ofCmptrGk has much to be proud ofCmptrGk has much to be proud of
Re: Using MCC18 in a custom program

Quote:
Originally Posted by Joe Ross
I was able to open the file with 7-zip, and then rezipped it with winzip.
thanks, i only tired with winrar initally.
__________________
#14


"Great autonomous mode Dillon."," It hasn't been written yet"
after an Archimedes match


Closed Thread


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
how to add steps in the provided encoder program for the edu Zaramel2002 Programming 3 11-02-2004 08:35
Fried program slots? Jeff Waegelin Programming 18 19-03-2003 18:08
Ahh! Program trick confusing! archiver 2001 9 24-06-2002 02:26
So what's in YOUR Custom Circuit this year? kmcclary Technical Discussion 7 10-04-2002 12:20


All times are GMT -5. The time now is 23:04.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi