C CODE TO FC8 CONVERSION

For Flowcode users to discuss projects, flowcharts, and any other issues related to Flowcode 8.

Moderator: Benj

Post Reply
SILVESTROS9
Posts: 115
Joined: Wed Aug 03, 2016 10:45 pm
Has thanked: 24 times
Been thanked: 11 times
Contact:

C CODE TO FC8 CONVERSION

Post by SILVESTROS9 »

I would like to convert a code in C TO FC8. The firmware below is for a MCU , MSP430F5132 of Texas ...I would like to convert the main.c to FC8, to transfer to a PIC MCU for easier programming. Is it possible that , and how can I do it ? the firmware is a part of TIDA-010042 project of Texas Instr. It is a solar MPPT controller.
Attachments
main.c
(41.7 KiB) Downloaded 208 times

User avatar
Jan Lichtenbelt
Posts: 797
Joined: Tue Feb 17, 2009 8:35 pm
Location: Haren GN, the Netherlands
Has thanked: 128 times
Been thanked: 264 times
Contact:

Re: C CODE TO FC8 CONVERSION

Post by Jan Lichtenbelt »

Hi SILVESTROS9

Life would be easy if you could import such C-code directly into Flowcode. As far as I see, the c-code itself will not be the biggest problem. But this c-code uses libraries on line 63-66:
#include "msp430f5132.h"
#include "hal_tlv.h"
#include<string.h>
#include<stdio.h>
with unknow contents.

My suggestion would be: Try to find and understand the steps in the program and start Flowcode introducing the same steps and use Flowocode libraries.

Succes

Jan

planeri
Posts: 11
Joined: Wed Aug 01, 2018 6:20 pm
Has thanked: 3 times
Been thanked: 3 times
Contact:

Re: C CODE TO FC8 CONVERSION

Post by planeri »

As Jan said, I don't think there is a direct way to do what you want. string.h and stdio.h libraries are included automatically by Flowcode in internals.c, but the best way to include specific code from the msp430f5132 mixed-signal micro controller is to create your own customized component, add the c code in the msp430f5132.h library as c supplementary code and create macros to use it.

Take a look at this blog on how to add existing c code into flowcode: https://www.matrixtsl.com/blog/146/

You can also read this, you'll find multiple examples here: https://www.matrixtsl.com/wiki/index.ph ... t_Creation

Good luck!

Post Reply