Compiler Error - ESP M5Stack Dial

Use this section to discuss your embedded Flowcode projects.
Post Reply
Arix
Posts: 18
http://meble-kuchenne.info.pl
Joined: Wed Dec 02, 2020 9:53 pm
Has thanked: 5 times
Been thanked: 10 times

Flowcode v11 Compiler Error - ESP M5Stack Dial

Post by Arix »

I hope someone can give a couple of pointers to help debug a Flowcode program I have written for the M5Stack Dial. The program simulates as intended but when compiling I get the Syntax error shown below.

Compiler error1.jpg
Compiler error1.jpg (31.26 KiB) Viewed 230 times

Apart from providing the line number (8378) no other information is given.

My question is how do I identify from the compiler message where the error lies within my flowchart?

The C code just after the reported error line relates to ‘gLCD Font2’. Font 2 was one of the standard fonts provided with FC V11. All that I have done is to call it up within component macros.

I have attached the program which is a pulse generator. When the program is Run in simulation the menu options are selected using a combination of the Quadrature encoder and the Bezel switch.

I am stuck at this point, so any help will be greatly appreciated.

Martin
Attachments
PulseGen V3a.fcfx
(149.16 KiB) Downloaded 18 times

mnfisher
Valued Contributor
Posts: 1812
Joined: Wed Dec 09, 2020 9:37 pm
Has thanked: 152 times
Been thanked: 855 times

Re: Compiler Error - ESP M5Stack Dial

Post by mnfisher »

I'm not a a computer right now - but you can look at PulseGen v3a.c and look at the offending line - might give some clues (at least which macro the error is in)?

Martin

Arix
Posts: 18
Joined: Wed Dec 02, 2020 9:53 pm
Has thanked: 5 times
Been thanked: 10 times

Flowcode v11 Re: Compiler Error - ESP M5Stack Dial

Post by Arix »

Thank you Martin

That is the area where I am getting stuck. I view the C code file, and in particluar the code around line 8378, but I cannot determine precisely to which component macro command icon it relates.

In the snipit of C code below it appears to relate to the use of Font2 by the gLCD component, which to me looks Ok. I am probably missing the obvious.
Error code.jpg
Error code.jpg (102.81 KiB) Viewed 198 times

Arix
Posts: 18
Joined: Wed Dec 02, 2020 9:53 pm
Has thanked: 5 times
Been thanked: 10 times

Flowcode v11 Re: Compiler Error - ESP M5Stack Dial

Post by Arix »

Having looked into the source of the error a bit further, it seems the gLCD_GC9A01A_SPI component was the cause. After replacing the component I was able to successfully compile to C. I suspect the display component might have become corrupted whilst I was working on the program.

However, I now have several errors when compiling to Hex and I am not sure how to interpret them. I have attached the Compiler Message file in case anyone has a spare moment to take a look.

Martin
Attachments
PulseGen V3a.msg.txt
(436.54 KiB) Downloaded 14 times

medelec35
Valued Contributor
Posts: 2237
Joined: Wed Dec 02, 2020 11:07 pm
Has thanked: 689 times
Been thanked: 761 times

Re: Compiler Error - ESP M5Stack Dial

Post by medelec35 »

Hello.
If you upload your latest fcfx project file, I will see if I can resolve the errors for you.
Martin

Arix
Posts: 18
Joined: Wed Dec 02, 2020 9:53 pm
Has thanked: 5 times
Been thanked: 10 times

Re: Compiler Error - ESP M5Stack Dial

Post by Arix »

Hello Martin,

Thank you for your kind offer of help. I have attached the latest version of my program.

I would be very interested in your findings as I need to learn how to interpret the compilers messages. Over time I have become reasonably familiar with flowcode and I have found ways to resolve most issues I encounter (+sometimes with your help), but the compiler is an area where my knowledge is particularly weak.

Regards

Martin
Attachments
PulseGen V3a.fcfx
(149.28 KiB) Downloaded 13 times

LeighM
Valued Contributor
Posts: 528
Joined: Mon Dec 07, 2020 1:00 pm
Has thanked: 94 times
Been thanked: 285 times

Re: Compiler Error - ESP M5Stack Dial

Post by LeighM »

You have an error in macro Current_Meas
In the IF icon change

Code: Select all

Seconds = 0 & Flag_SECS = 1
to

Code: Select all

(Seconds = 0) && (Flag_SECS = 1)
The other errors in the Bitmap drawing component and the ADC CAL will need attention from Matrix

medelec35
Valued Contributor
Posts: 2237
Joined: Wed Dec 02, 2020 11:07 pm
Has thanked: 689 times
Been thanked: 761 times

Flowcode v11 Re: Compiler Error - ESP M5Stack Dial

Post by medelec35 »

Hello.
first make sure all your components are up-to-date by running full database component updates.
Then make the change Leigh stated, then browse to this location using file explorer , it's hidden by default so just paste the link into your address bar.

Code: Select all

%ProgramData%\MatrixTSL\FlowcodeV11\Components
Place the attached component.

If Flowcode is already open, then you will need to reload your project for the new component to work
If you run any component updates, then the component you added will be overwritten, so it will stop working again (unless the component update has been pushed).
The issue is ESP32 is very fussy and expected the Return variable to be initialised, unlike other compilers.

I have tried your project with the component update and Leigh's correction and your project compiled OK for me.

Code: Select all

Target folder: D:\Flowcode Testing
Source name:   D:\Flowcode Testing\PulseGen V3a.fcfx
Title:         
Description:   
Device:        ESP.ESP32.M5Stack_M5Dial
Generated by:  Flowcode v11.0.1.9
Date:          Sunday, January 25, 2026 22:21:01
Users:         1
Registered to: XXXXX (XXXXXX)
Licence key: XXXXX
https://www.flowcode.co.uk
Using FCD settings for compiler
Launching the compiler...
C:\ProgramData\MatrixTSL\FlowcodeV11\FCD\ESP\Batch\esp32_build.bat  "C:\FC_ESP\\\" "PulseGen V3a" "D:\Flowcode Testing\" esp32_s3_sdkconfig  esp32s3 

D:\Flowcode Testing>REM CRC: 0796FC1E6A776AF9156B257209C35258CE7C28B3EC20AEA2C632DB392A0E4BFD5B3F53B21811978F7B21FE4085045A7E774D1D3D69D8A99EE7320EAE740A5DB60228F42835EF5B88138FDEE58A4EE9C3A4BAF1B34E38B68E0C3CAEE8E7DA6987B808018476405B65B199900461C78937B42DEF8219F63A24580137A2F6C8FDB7553324EFF791947E8AB6FFD612B81BAA97C798A8F1CFC189DE5D38517747C774AF2DD6F839BAECF83F7F994C7164CE77868F480396BDEF2F2C3050DA273BE4EE69F15C302679453617F9EA00A6A8712D05E485F25DB02304E4565E63FDA312627DD474674123A97D 

D:\Flowcode Testing>REM REVISION: 15.0 

D:\Flowcode Testing>REM GUID: 955EA920-4961-4C53-BA6B-EF4AF66BB4C2 

D:\Flowcode Testing>REM DATE: 07\04\2025 

D:\Flowcode Testing>REM DIR: FCD\ESP\Batch\esp32_build.bat 
Creating python config file 
Creating menuconfig link file 
.
============================== Toolchain Check ==============================
Python 3.11.2
git version 2.44.0.windows.1
ESP toolchain found at "C:\FC_ESP\\frameworks\esp-idf-v5.3.1\"
=============================================================================
.
Building: PulseGen V3a ...
fatal: not a git repository (or any of the parent directories): .git
IDF Version:  ...
Checking Python compatibility
Setting IDF_PATH: C:\FC_ESP\frameworks\esp-idf-v5.3.1

Adding ESP-IDF tools to PATH...
Not using an unsupported version of tool cmake found in PATH: 3.20.5.
WARNING: The following issue occurred while accessing the ESP-IDF version file in the Python environment: [Errno 2] No such file or directory: 'C:\\FC_ESP\\\\esp-tools\\python_env\\idf5.3_py3.11_env\\idf_version.txt'. (Diagnostic information. It can be ignored.)
    C:\FC_ESP\\esp-tools\tools\xtensa-esp-elf-gdb\14.2_20240403\xtensa-esp-elf-gdb\bin
    C:\FC_ESP\\esp-tools\tools\riscv32-esp-elf-gdb\14.2_20240403\riscv32-esp-elf-gdb\bin
    C:\FC_ESP\\esp-tools\tools\xtensa-esp-elf\esp-13.2.0_20240530\xtensa-esp-elf\bin
    C:\FC_ESP\\esp-tools\tools\riscv32-esp-elf\esp-13.2.0_20240530\riscv32-esp-elf\bin
    C:\FC_ESP\\esp-tools\tools\esp32ulp-elf\2.38_20240113\esp32ulp-elf\bin
    C:\FC_ESP\\esp-tools\tools\cmake\3.24.0\bin
    C:\FC_ESP\\esp-tools\tools\openocd-esp32\v0.12.0-esp32-20240318\openocd-esp32\bin
    C:\FC_ESP\\esp-tools\tools\ninja\1.11.1\
    C:\FC_ESP\\esp-tools\tools\idf-exe\1.0.3\
    C:\FC_ESP\\esp-tools\tools\ccache\4.8\ccache-4.8-windows-x86_64
    C:\FC_ESP\\esp-tools\tools\dfu-util\0.11\dfu-util-0.11-win64
    C:\FC_ESP\frameworks\esp-idf-v5.3.1\tools
    
.

Checking if Python packages are up to date...
Python requirements are satisfied.
Constraint file: C:\FC_ESP\\esp-tools\espidf.constraints.v5.3.txt
Requirement files:
 - C:\FC_ESP\frameworks\esp-idf-v5.3.1\tools\requirements\requirements.core.txt
Python being checked: C:\FC_ESP\\esp-tools\python_env\idf5.3_py3.11_env\Scripts\python.exe

Done! You can now compile ESP-IDF projects.
Go to the project directory and run:

  idf.py build

Target: esp32s3 ...
. . .

WARNING: Python interpreter "C:\FC_ESP\esp-tools\python_env\idf5.3_py3.11_env\Scripts\python.exe" used to start idf.py is not from installed venv "C:\FC_ESP\\esp-tools\python_env\idf5.3_py3.11_env"
.

[1/9] Performing build step for 'bootloader'
[1/1] cmd.exe /C "cd /D C:\FC_ESP\mtxesp32_s3_sdkconfig\build\bootloader\esp-idf\esptool_py && C:\FC_ESP\esp-tools\python_env\idf5.3_py3.11_env\Scripts\python.exe C:/FC_ESP/frameworks/esp-idf-v5.3.1/components/partition_table/check_sizes.py --offset 0x8000 bootloader 0x0 C:/FC_ESP/mtxesp32_s3_sdkconfig/build/bootloader/bootloader.bin"
Bootloader binary size 0x5260 bytes. 0x2da0 bytes (36%) free.
[2/7] Building C object esp-idf/main/CMakeFiles/__idf_main.dir/esp-project.c.obj
In file included from C:\ProgramData\MatrixTSL\FlowcodeV11\CAL\includes.c:85,
                 from D:\Flowcode Testing\PulseGen V3a.h:514,
                 from C:/FC_ESP/mtxesp32_s3_sdkconfig/main/esp-project.c:20:
C:\ProgramData\MatrixTSL\FlowcodeV11\CAL\ESP\ESP_CAL_ADC.c: In function 'FC_CAL_ADC_Enable_1':
C:\ProgramData\MatrixTSL\FlowcodeV11\CAL\ESP\ESP_CAL_ADC.c:110:25: warning: 'ADC_ATTEN_DB_11' is deprecated [-Wdeprecated-declarations]
  110 |                         };
      |      
                   ^
In file included from C:/FC_ESP/frameworks/esp-idf-v5.3.1/components/esp_adc/include/esp_adc/adc_oneshot.h:12,
                 from C:\ProgramData\MatrixTSL\FlowcodeV11\CAL\ESP\ESP_CAL_ADC.c:69:
C:/FC_ESP/frameworks/esp-idf-v5.3.1/components/hal/include/hal/adc_types.h:51:5: note: declared here
   51 |     ADC_ATTEN_DB_11 __attribute__((deprecated)) = ADC_ATTEN_DB_12,  ///<This is deprecated, it behaves the same as `ADC_ATTEN_DB_12`
      |     ^~~~~~~~~~~~~~~
[3/7] Linking C static li
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

brary esp-idf\main\libmain.a
[4/7] Generating ld/sections.ld
[5/7] Linking CXX executable esp-project.elf
[6/7] Generating binary image from built executable
esptool.py v4.8.dev5
Creating esp32s3 image...
Merged 2 ELF sections
Successfully created esp32s3 image.
Generated C:/FC_ESP/mtxesp32_s3_sdkconfig/build/esp-project.bin
[7/7] cmd.exe /C "cd /D C:\FC_ESP\mtxesp32_s3_sdkconfig\build\esp-idf\esptool_py && C:\FC_ESP\esp-tools\python_env\idf5.3_py3.11_env\Scripts\python.exe C:/FC_ESP/frameworks/esp-idf-v5.3.1/components/partition_table/check_sizes.py --offset 0x8000 partition --type app C:/FC_ESP/mtxesp32_s3_sdkconfig/build/partition_table/partition-table.bin C:/FC_ESP/mtxesp32_s3_sdkconfig/build/esp-project.bin"
esp-project.bin binary size 0x4de80 bytes. Smallest app partition is 0x100000 bytes. 0xb2180 bytes (70%) free.
Executing action: all (aliases: build)
Running ninja in directory C:\FC_ESP\mtxesp32_s3_sdkconfig\build
Executing "ninja all"...

Project build complete. To flash, run:
 idf.py flash
or
 idf.py -p PORT flash
or
 python -m esptool --chip esp32s3 -b 460800 --before default_reset --after hard_reset write_flash --flash_mode dio --flash_size 2MB --flash_freq 80m 0x0 build\bootloader\bootloader.bin 0x8000 build\partition_table\partition-table.bin 0x10000 build\esp-project.bin
or from the "C:\FC_ESP\mtxesp32_s3_sdkconfig\build" directory
 python -m esptool --chip esp32s3 -b 460800 --before default_reset --after hard_reset write_flash "@flash_args"

Get Project Build Statistics
WARNING: Python interpreter "C:\FC_ESP\esp-tools\python_env\idf5.3_py3.11_env\Scripts\python.exe" used to start idf.py is not from installed venv "C:\FC_ESP\\esp-tools\python_env\idf5.3_py3.11_env"
. . .

[1/4] cmd.exe /C "cd /D C:\FC_ESP\mtxesp32_s3_sdkconfig\build\esp-idf\esptool_py && C:\FC_ESP\esp-tools\python_env\idf5.3_py3.11_env\Scripts\python.exe C:/FC_ESP/frameworks/esp-idf-v5.3.1/components/partition_table/check_sizes.py --offset 0x8000 partition --type app C:/FC_ESP/mtxesp32_s3_sdkconfig/build/partition_table/partition-table.bin C:/FC_ESP/mtxesp32_s3_sdkconfig/build/esp-project.bin"
esp-project.bin binary size 0x4de80 bytes. Smallest app partition is 0x100000 bytes. 0xb2180 bytes (70%) free.
[2/4] Performing build step for 'bootloader'
[1/1] cmd.exe /C "cd /D C:\FC_ESP\mtxesp32_s3_sdkconfig\build\bootloader\esp-idf\esptool_py && C:\FC_ESP\esp-tools\python_env\idf5.3_py3.11_env\Scripts\python.exe C:/FC_ESP/frameworks/esp-idf-v5.3.1/components/partition_table/check_sizes.py --offset 0x8000 bootloader 0x0 C:/FC_ESP/mtxesp32_s3_sdkconfig/build/bootloader/bootloader.bin"
Bootloader binary size 0x5260 bytes. 0x2da0 bytes (36%) free.
                            Memory Type Usage Summary                             
+--------------------------------------------------------------------------------+
| Memory Type/Section | Used [bytes] | Used [%] | Remain [bytes] | Total [bytes] |
|---------------------+--------------+----------+----------------+---------------|
| Flash Code          |       154178 |     1.84 |        8234398 |       8388576 |
|    .text            |       154178 |     1.84 |                |               |
| Flash Data          |        83280 |     0.25 |       33471120 |      33554400 |
|    .rodata          |        83024 |     0.25 |                |               |
|    .appdesc         |          256 |      0.0 |                |               |
| DIRAM               |        67976 |    19.89 |         273784 |        341760 |
|    .text            |        53535 |    15.66 |                |               |
|    .data            |        11600 |     3.39 |                |               |
|    .bss             |         2616 |     0.77 |                |               |
| IRAM                |        16383 |    99.99 |              1 |         16384 |
|    .text            |        15356 |    93.73 |                |               |
|    .vectors         |         1027 |     6.27 |                |               |
| RTC FAST            |          284 |     3.47 |           7908 |          8192 |
|    .rtc_reserved    |           24 |     0.29 |                |               |
|    .force_fast      |            4 |     0.05 |                |               |
+--------------------------------------------------------------------------------+
Total image size: 318980 bytes (.bin may be padded larger)
[0/1] cmd.exe /C "cd /D C:\FC_ESP\mtxesp32_s3_sdkconfig\build && C:\FC_ESP\esp-tools\tools\cmake\3.24.0\bin\cmake.exe -D IDF_SIZE_TOOL=C:/FC_ESP/esp-tools/python_env/idf5.3_py3.11_env/Scripts/python.exe;-m;esp_idf_size -D MAP_FILE=C:/FC_ESP/mtxesp32_s3_sdkconfig/build/esp-project.map -D OUTPUT_JSON= -P C:/FC_ESP/frameworks/esp-idf-v5.3.1/tools/cmake/run_size_tool.cmake"
Executing action: size
Running ninja in directory C:\FC_ESP\mtxesp32_s3_sdkconfig\build
Executing "ninja all"...
Running ninja in directory C:\FC_ESP\mtxesp32_s3_sdkconfig\build
Executing "ninja size"...
Build completed successfully 

Using FCD settings for linker
Launching the linker/assembler...
C:\Program Files (x86)\Flowcode v11\tools\DoNothing\DoNothing.exe  


FINISHED
Attachments
BitmapDrawer.fcpx
(28.48 KiB) Downloaded 4 times
Martin

Post Reply