Difference between revisions of "FCD Data Collection"
(Created page with " For each target microcontroller device in Flowcode there is a FCDX file containing detailed specifics about the device. The FCDX file contains everything Flowcode needs to ...") |
|||
(5 intermediate revisions by 3 users not shown) | |||
Line 1: | Line 1: | ||
− | |||
For each target microcontroller device in Flowcode there is a FCDX file containing detailed specifics about the device. | For each target microcontroller device in Flowcode there is a FCDX file containing detailed specifics about the device. | ||
Line 6: | Line 5: | ||
− | The FCDX file is similar to many Flowcode | + | The FCDX file is similar to many Flowcode file types in that it is XML based. XML is basically tagged in a tree style hierarchy. We can open the FCDX file using a text editor to see the contents and see the paths to use to collect the data we require. |
Example FCDX contents. | Example FCDX contents. | ||
− | + | [[File:FCD.jpg]] | |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
Line 29: | Line 20: | ||
To work out the number of pins a device has we can do this. | To work out the number of pins a device has we can do this. | ||
− | [[File: | + | [[File:Fcd-data-collection-ss-1.png]] |
Line 36: | Line 27: | ||
{{Fcfile|FCD_NumPWMs.fcfx|Count PWMs Example}} | {{Fcfile|FCD_NumPWMs.fcfx|Count PWMs Example}} | ||
− | [[File: | + | [[File:Fcd-data-collection-ss-2.png]] |
+ | |||
+ | |||
+ | The [[Component:_ID_fc3c670c_502a_418f_a123_649179752383|FCD helper]] component is designed to make it easier to pull lists and other specifics from the target FCDX files. | ||
+ | |||
+ | |||
+ | By using the File API commands it should also be possible to search through the FCDX files to find target devices with specific criteria, e.g. number of UART peripherals or specific amount of on-board RAM. |
Latest revision as of 12:17, 5 August 2019
For each target microcontroller device in Flowcode there is a FCDX file containing detailed specifics about the device.
The FCDX file contains everything Flowcode needs to be able to generate code for the device. From the number of pins, analogue channels, peripherals right through to the number of interrupts and the configuration options.
The FCDX file is similar to many Flowcode file types in that it is XML based. XML is basically tagged in a tree style hierarchy. We can open the FCDX file using a text editor to see the contents and see the paths to use to collect the data we require.
Example FCDX contents.
To pull out the data from the FCD you can use the Simulation FCD Functions. This example collects the device name and stores it into a local string variable.
To work out the number of pins a device has we can do this.
Similarly to do something like work out the number of PWM channels a device has we can do this.
The FCD helper component is designed to make it easier to pull lists and other specifics from the target FCDX files.
By using the File API commands it should also be possible to search through the FCDX files to find target devices with specific criteria, e.g. number of UART peripherals or specific amount of on-board RAM.