Page 1 of 1

Flowcode to MPLAB IDE with CC5X compiler

Posted: Mon Mar 12, 2012 10:54 am
by Dmitry Maximenko
Hello!
Is it possible to convert Flowcode C file to the MPLAB IDE with a free compiler like CC5X for further work?
IF possible, what steps do I need to do?

Very thankful for all answers
Best Regards
Dmitry

Re: Flowcode to MPLAB IDE with CC5X compiler

Posted: Mon Mar 12, 2012 11:01 am
by Benj
Hello,

Its probably possible though you will have to port the code from the BoostC compiler to your own.

Porting code normally involves things like renaming register calls to the compiler specific syntax.

eg boostc uses lowercase register names

porta
trisa

Hitech and C18 use uppercase register names

PORTA
TRISA

There may also be other things like the clock speed definition and delay functions etc that will have to be defined correctly for the compiler.

Re: Flowcode to MPLAB IDE with CC5X compiler

Posted: Tue Mar 13, 2012 10:08 am
by Dmitry Maximenko
Hello!
OK, can we use cc5x compiler in the Flowcode?

Very thankful for all answers
Best Regards
Dmitry

Re: Flowcode to MPLAB IDE with CC5X compiler

Posted: Tue Mar 13, 2012 10:18 am
by Benj
Hello,

All the Flowcode C code is created dynamically so you could port the code over to use your compiler if you wish. You would still have to modify the code so that it is targeted at your compiler. However I would advise to use the compiler that comes with Flowcode as this is fully tested and requires no effort to get it working. You should be able to do any further work inside Flowcode itself.

Re: Flowcode to MPLAB IDE with CC5X compiler

Posted: Fri Mar 16, 2012 2:40 pm
by Dmitry Maximenko
HI!
I would like to test cc5x compiler. What settings I need to make in the flowcode?
Is it chip> compiler options>??

Very thankful for all answers
Best Regards
Dmitry

Re: Flowcode to MPLAB IDE with CC5X compiler

Posted: Fri Mar 16, 2012 3:48 pm
by DavidA
Hello Dimitry,

We do not have that compiler here so us being able to give you settings wouldn't really be possible, as well as all the other changes you would need to make to allow this compiler to work. I would start with checking the cc5x compiler manual to check where the command line compiler settings are located and then work from there, in the Compiler Options section of Flowcode is where you would enter this information.

Re: Flowcode to MPLAB IDE with CC5X compiler

Posted: Thu Apr 12, 2012 1:08 am
by Dmitry Maximenko
Hi again!
It seems complicated and quite time consuming converting from Boost.
The question is if I made a program that works in Flovcode and then I go over to MPLAB to continue to work with C code. MPLAB needs compiler. Can I use the same compiler that comes with Flovcode? My program is pretty big so I can not use the free version of the boost c in mplab

Best Regards
Dmitry

Re: Flowcode to MPLAB IDE with CC5X compiler

Posted: Thu Apr 12, 2012 9:33 am
by Benj
Hello,

Why not do everything inside Flowcode?

You can transfer your C file into MPLAB and use either the boostC compiler or the HiTech compiler but its not really recommended.

Re: Flowcode to MPLAB IDE with CC5X compiler

Posted: Thu Apr 12, 2012 10:00 am
by Dmitry Maximenko
Hello Benj!
I want to do to learn more about C. Whay you donĀ“t rekomend it?
Can you please answer the question I asked before " MPLAB needs compiler. Can I use the same compiler that comes with Flovcode?"
Thanks for the reply!

Re: Flowcode to MPLAB IDE with CC5X compiler

Posted: Thu Apr 12, 2012 11:44 am
by Benj
Hello,

You can use C inside Flowcode and also you can look at the C code produced by Flowcode to help your understanding. Then when your C skills are improving you can write custom components for Flowcode entirely in C and this way you get component macros for your C code like any of the other Flowcode components.

Nothing against MPLAB just know it can be a bit difficult to get everything setup and working, especially if your just getting started. Nothing like a few days struggling to get something to work to put you off it for life :)

Yes if you have a license for BoostC then you should be able to use this in MPLAB. The free version of HiTech should also work well for you but this compiler does not have as much testing with the code base as the boostc compiler has so there could be a few lingering problems. Maybe worth a quick go before laying out the cash for the boostc license.