Hi All,
this should have been a simple task. A loop scans an IR beam, and when the beam is broken, the loop is exited and the warning light out on with a timer, after which the loop is called again.
I include here the flow-file and the build error list
Too many points to cover here. Some warning are about declared processes which are unused, but the declarations must have been auto created, also loop function witch are "depreciated" ? This is a simple code for teaching, any help appreciated.
Tink
ESP32 fails to build, warnings being treated as errors
-
- Posts: 25
- http://meble-kuchenne.info.pl
- Joined: Mon Sep 19, 2022 11:19 pm
ESP32 fails to build, warnings being treated as errors
- Attachments
-
- Beam-debug.docx
- (17.21 KiB) Downloaded 120 times
-
- Security Beam.fcfx
- (12.57 KiB) Downloaded 131 times
-
- Valued Contributor
- Posts: 1638
- Joined: Wed Dec 09, 2020 9:37 pm
- Has thanked: 142 times
- Been thanked: 761 times
Re: ESP32 fails to build, warnings being treated as errors
The esp32 compiler is very strict (or to be more correct - the settings used are set to be very strict) - and the compiler is complaining that a variable may be used without being initialised.
For example:
int x;
if test == true
x =123
then
y = x
...
Will cause an error - because y is set to x and unless test is true then x may be an unitialised value.
Unfortunately - errors are often hard to spot, with pages of warnings churned out (I usually load the compiler text into an editor and search for 'error')
This looks like a problem in the switch array component where in ReadState - there are several cases where the return value isn't set - so the component will need to be updated.
Martin
For example:
int x;
if test == true
x =123
then
y = x
...
Will cause an error - because y is set to x and unless test is true then x may be an unitialised value.
Unfortunately - errors are often hard to spot, with pages of warnings churned out (I usually load the compiler text into an editor and search for 'error')
This looks like a problem in the switch array component where in ReadState - there are several cases where the return value isn't set - so the component will need to be updated.
Martin
-
- Matrix Staff
- Posts: 2088
- Joined: Wed Dec 02, 2020 11:07 pm
- Has thanked: 645 times
- Been thanked: 703 times
Re: ESP32 fails to build, warnings being treated as errors
Hello.
Thank you for letting us know and thank you, Martin.
I have fixed the issue, and the component will be pushed onto the update system as soon as possible.
If you would like to try the component before the updates are pushed.
Browse to this location using file explorer, it's hidden by default so just paste the link into your address bar.
Replace the existing file with the attached file.
If Flowcode is already open, then you will need to reload your project for the new components to work
If you run any component updates, then the components you added will be overwritten with the updated version.
Thank you for letting us know and thank you, Martin.
I have fixed the issue, and the component will be pushed onto the update system as soon as possible.
If you would like to try the component before the updates are pushed.
Browse to this location using file explorer, it's hidden by default so just paste the link into your address bar.
Code: Select all
C:\ProgramData\MatrixTSL\FlowcodeV9\Components
If Flowcode is already open, then you will need to reload your project for the new components to work
If you run any component updates, then the components you added will be overwritten with the updated version.
- Attachments
-
- switch_array_slide.fcpx
- (7.08 KiB) Downloaded 114 times
Martin
Re: ESP32 fails to build, warnings being treated as errors
Thank you both for the information and guidance. Prior to reading your response I was beginning to think it was because I started the project by adding all the components I wanted to use, Components like a light lux level sensor, a buzzer and the dip switches to set a delay time. I then deleted some of the components when I could not get the project to build although it worked fine in simulation. My thoughts were deleting the components from the project had not removed some of the code legacy those components had created when inserted into the project. I wrote the program again without the switch and it built ok. I will grab your corrected project and try it now. Cheers Tink
Re: ESP32 fails to build, warnings being treated as errors
Project now builds but compile to target fails:-
Usage: idf.py [OPTIONS] COMMAND1 [ARGS]... [COMMAND2 [ARGS]...]...
Try 'idf.py --help' for help.
Error: Invalid value for '-b' / '--baud': 'flash' is not a valid integer.
Programming Failed
C:\ProgramData\MatrixTSL\FlowcodeV9\FCD\ESP\Batch\esp32_prog.bat reported error code 0x1
Autoclose turned off
FINISHED
Is this a setting that needs change? Tink
Usage: idf.py [OPTIONS] COMMAND1 [ARGS]... [COMMAND2 [ARGS]...]...
Try 'idf.py --help' for help.
Error: Invalid value for '-b' / '--baud': 'flash' is not a valid integer.
Programming Failed
C:\ProgramData\MatrixTSL\FlowcodeV9\FCD\ESP\Batch\esp32_prog.bat reported error code 0x1
Autoclose turned off
FINISHED
Is this a setting that needs change? Tink
Re: ESP32 fails to build, warnings being treated as errors
Too quick mnfisher I just found the post dealing with this error and came back to pull the post off the forum, many thanks for extending your help.
cheers
Tink
cheers
Tink