Programming in C

For Formula Flowcode Micromouse users to discuss projects, flowcharts, and any other issues related to the Formula Flowcode Micromouse.

Moderator: Benj

tekruma
Posts: 4
Joined: Wed Dec 19, 2007 11:09 am
Contact:

Programming in C

Postby tekruma » Wed Dec 19, 2007 11:15 am

It's fun and easy to program the Formuala with help of Flowcode. But is it possible to program the Formula with a standard C compiler?
Rolf

User avatar
Steve
Matrix Staff
Posts: 3090
Joined: Tue Jan 03, 2006 3:59 pm
Has thanked: 89 times
Been thanked: 391 times
Contact:

Postby Steve » Wed Dec 19, 2007 11:27 am

Yes - it is possible. But make sure the code for your program is relocated to 0x800 because there is a bootloader in 0x000 to 0x7FF.

tekruma
Posts: 4
Joined: Wed Dec 19, 2007 11:09 am
Contact:

Programming in C

Postby tekruma » Wed Dec 19, 2007 11:52 am

Intersting but how is that done?
I suppose the C compiler must know something about Formuala and how do I transfer the C code to Formula?
Rolf

User avatar
Steve
Matrix Staff
Posts: 3090
Joined: Tue Jan 03, 2006 3:59 pm
Has thanked: 89 times
Been thanked: 391 times
Contact:

Postby Steve » Wed Dec 19, 2007 12:00 pm

For the BoostC compiler, you must use the following linker parameter to relocate the code:

-rb 0x800

I do not know about other compilers.

The "BuggyProg.exe" program that is installed with Flowcode can be used to send programs to the buggy. This is in the same folder as the Flowcode exe.

tekruma
Posts: 4
Joined: Wed Dec 19, 2007 11:09 am
Contact:

Programming in C

Postby tekruma » Wed Dec 19, 2007 2:04 pm

I have got the BoostC compiler but where do I insert the code -rb 0x800 ?
Rolf

User avatar
Steve
Matrix Staff
Posts: 3090
Joined: Tue Jan 03, 2006 3:59 pm
Has thanked: 89 times
Been thanked: 391 times
Contact:

Postby Steve » Wed Dec 19, 2007 3:53 pm

You will need to add this to the "extra linker options" entry within the SourceBoost IDE.

Sofie
Posts: 5
Joined: Wed Nov 28, 2012 2:05 pm
Contact:

Re: Programming in C

Postby Sofie » Wed Nov 28, 2012 2:30 pm

I tried to do everything you said:
linkeroption in Sourceboost : -rb 0x800 and compile and link
When i send this to the pic using buggyprog, i always get the error: send Failed...

Can you help me

(excuse me for my english)

User avatar
Benj
Matrix Staff
Posts: 14567
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Has thanked: 4598 times
Been thanked: 4239 times
Contact:

Re: Programming in C

Postby Benj » Fri Nov 30, 2012 4:58 pm

This FAQ topic adopted for the formula flowcode should help to get you up and running.

http://www.matrixmultimedia.com/support ... f=20&t=537