Page 1 of 1
C CODE TO FC8 CONVERSION
Posted: Mon Sep 16, 2019 1:47 pm
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.
Re: C CODE TO FC8 CONVERSION
Posted: Mon Sep 16, 2019 7:00 pm
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
Re: C CODE TO FC8 CONVERSION
Posted: Mon Sep 16, 2019 8:19 pm
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!