Using C code generated in FlowCode in other IDE's

For general Flowcode discussion that does not belong in the other sections.
Post Reply
OderlandoAbril
Posts: 10
http://meble-kuchenne.info.pl
Joined: Tue Apr 06, 2021 6:06 pm
Has thanked: 2 times
Been thanked: 1 time

Using C code generated in FlowCode in other IDE's

Post by OderlandoAbril »

Hello. I would like to give my thanks to FlowCode 10 with open source and several free microcontrollers.
I was thinking about creating flowchart codes in flowcode to be able to generate a C code. So, I was questioning whether it would be too much work to use this generated C Code to adapt it in ST Visual Develop and make an STM8S work, because the flowcode does not has support for it. So, in your opinion, would it be a lot of work to do this?

BenR
Matrix Staff
Posts: 2073
Joined: Mon Dec 07, 2020 10:06 am
Has thanked: 551 times
Been thanked: 735 times

Re: Using C code generated in FlowCode in other IDE's

Post by BenR »

Hello,

Yes it should be possible, You would be essentially writing parts of the CAL (chip abstraction layer) for the STM8 microcontroller. If you are familiar with C then you can look at the existing CAL codes here for reference. You would only need to create the functions that you require, for example I/O and maybe ADC, I2C, SPI etc.

C:\ProgramData\MatrixTSL\FlowcodeV10\CAL

Once you've done that it should be fairly easy to create a FCD (Flowcode chip definition) that would provide the pin and peripheral layout you require. You can look at the current FCD files using a text editor to see the syntax and allow you to copy and create your own.

C:\ProgramData\MatrixTSL\FlowcodeV10\FCD

Let u sknow how you're getting on.

OderlandoAbril
Posts: 10
Joined: Tue Apr 06, 2021 6:06 pm
Has thanked: 2 times
Been thanked: 1 time

Re: Using C code generated in FlowCode in other IDE's

Post by OderlandoAbril »

Thank you very much for your clarifications, Ben. They are of great help to me !

Brendan
Posts: 73
Joined: Tue Dec 08, 2020 2:12 pm
Has thanked: 59 times
Been thanked: 16 times

Flowcode v11 Re: Using C code generated in FlowCode in other IDE's

Post by Brendan »

Hi guys.

An old post I know, though with the advent of cherished FC11, and being professionally forced down an ever-narrowing corridor to integrate Flowcode projects with micro-ROS on (supported) STM32F407, an example tutorial would be fantastic.

Setting up the CubeMX IDE appears to be pretty-well covered by AI search responses on the subject.

Thereafter, as fundamentally not a C coder, I'm now fighting my demons in the dark with a blunted pencil.

As a starting block to build upon, it would be fantastic if there were an example video or PDF tutorial, such as something simple to turn on/off ports controlling LEDs with commands from a ROS host/network, or challenge/response messaging (etc).

All the best,
Brendan

mnfisher
Valued Contributor
Posts: 1788
Joined: Wed Dec 09, 2020 9:37 pm
Has thanked: 151 times
Been thanked: 846 times

Re: Using C code generated in FlowCode in other IDE's

Post by mnfisher »

Looking at the micro-ROS docs at https://micro.ros.org/docs/tutorials/co ... tion_rtos/ it looks like it might use FreeRTOS as an underlying OS. There are quite a few examples on the forums using this on esp32 - which may give you a bit of a start point.

Martin

Post Reply