However - editing it is a bit more awkward than a normal Flowcode macro - for example - you can't open another macro / view variables etc, it's a bit clunky to get to (project options - supplementary code) and get out of - save, modify too - and the editor has none of the advantages of a C editor such as syntax checking.
There is an easy solution to this - that I had used before in passing - but recently needing to work a fair bit with some code - and it really makes life easier.
In the supplementary code "Definitions and function declarations:" do:
Code: Select all
#include <my_header.h>
Code: Select all
#include <my_functions.c>
The files need to be in the compilers search path - and as I am currently using the esp32 I created a new directory 'include' in the project/main folder and added this to the search path by adding the folder to CMakeLists.txt (in main)
Code: Select all
idf_component_register(SRCS "esp-project.c"
INCLUDE_DIRS "" "include")
Martin