Page 1 of 2

Errors while compiling

Posted: Tue Jan 17, 2023 8:00 pm
by ctesla75
Hi All,
After some issues getting an esp32 to compile to target it is now working, but my main program that works during debug displays no LCD. So i am trying to start slow. First flash an led next "hello" on LCD. The led flashes, But the compiler still brings up a lot of errors.

Code: Select all

In file included from C:\ProgramData\MatrixTSL\FlowcodeV9\CAL\ESP\ESP_CAL_String.c:110,
                 from C:\ProgramData\MatrixTSL\FlowcodeV9\CAL\internals.c:568,
                 from ../main/esp-project.c:48:
C:\ProgramData\MatrixTSL\FlowcodeV9\CAL\ESP\ESP_CAL_Float.c:91:6: warning: conflicting types for built-in function '__builtin_isinf_sign' [-Wbuiltin-declaration-mismatch]
 char isinf(float f)
      ^~~~~
In file included from C:\ProgramData\MatrixTSL\FlowcodeV9\CAL\internals.c:568,
                 from ../main/esp-project.c:48:
C:\ProgramData\MatrixTSL\FlowcodeV9\CAL\ESP\ESP_CAL_String.c:876:13: warning: 'FCI_SCOPY' defined but not used [-Wunused-function]
 static void FCI_SCOPY(MX_STRING sSrc, MX_UINT16 iSrc_len, MX_STRING sDst, MX_UINT16 iDst_len)
             ^~~~~~~~~
C:\ProgramData\MatrixTSL\FlowcodeV9\CAL\ESP\ESP_CAL_String.c:815:13: warning: 'FCI_SHEAD' defined but not used [-Wunused-function]
 static void FCI_SHEAD(MX_STRING sSrc1, MX_UINT16 iSrc1_len, MX_STRING sSrc2, MX_UINT16 iSrc2_len, MX_STRING sDst, MX_UINT16 iDst_len)
             ^~~~~~~~~
C:\ProgramData\MatrixTSL\FlowcodeV9\CAL\ESP\ESP_CAL_String.c:795:18: warning: 'FCI_STRMOV' defined but not used [-Wunused-function]
 static MX_UINT16 FCI_STRMOV(MX_STRING sSrc, MX_UINT16 iSrc_len, MX_STRING sDst, MX_UINT16 iDst_len)
                  ^~~~~~~~~~
C:\ProgramData\MatrixTSL\FlowcodeV9\CAL\ESP\ESP_CAL_String.c:771:18: warning: 'FCI_STRREV' defined but not used [-Wunused-function]
 static MX_UINT16 FCI_STRREV(MX_STRING sSrc, MX_UINT16 iSrc_len, MX_STRING sDst, MX_UINT16 iDst_len)
                  ^~~~~~~~~~
C:\ProgramData\MatrixTSL\FlowcodeV9\CAL\ESP\ESP_CAL_String.c:701:17: warning: 'FCI_STRING_TO_FLOAT' defined but not used [-Wunused-function]
 static MX_FLOAT FCI_STRING_TO_FLOAT(MX_STRING String, MX_UINT16 MSZ_String)
                 ^~~~~~~~~~~~~~~~~~~
C:\ProgramData\MatrixTSL\FlowcodeV9\CAL\ESP\ESP_CAL_String.c:598:18: warning: 'FCI_NUMBER_TO_HEX' defined but not used [-Wunused-function]
 static MX_STRING FCI_NUMBER_TO_HEX(MX_ULONG Number, MX_STRING String, MX_UINT16 MSZ_String)
                  ^~~~~~~~~~~~~~~~~
C:\ProgramData\MatrixTSL\FlowcodeV9\CAL\ESP\ESP_CAL_String.c:531:18: warning: 'FCI_FLOAT_TO_STRING' defined but not used [-Wunused-function]
 static MX_STRING FCI_FLOAT_TO_STRING(MX_FLOAT Number, MX_UINT8 Precision, MX_STRING String, MX_UINT16 MSZ_String)
                  ^~~~~~~~~~~~~~~~~~~
C:\ProgramData\MatrixTSL\FlowcodeV9\CAL\ESP\ESP_CAL_String.c:476:17: warning: 'FCI_COMPARE' defined but not used [-Wunused-function]
 static MX_UINT8 FCI_COMPARE(MX_STRING sSrc1, MX_UINT16 iSrc1_len, MX_STRING sSrc2, MX_UINT16 iSrc2_len, MX_UINT8 iNoCase)
                 ^~~~~~~~~~~
C:\ProgramData\MatrixTSL\FlowcodeV9\CAL\ESP\ESP_CAL_String.c:450:13: warning: 'FCI_TOUPPER' defined but not used [-Wunused-function]
 static void FCI_TOUPPER(MX_STRING sSrc, MX_UINT16 iSrc_len, MX_STRING sDst, MX_UINT16 iDst_len)
             ^~~~~~~~~~~
C:\ProgramData\MatrixTSL\FlowcodeV9\CAL\ESP\ESP_CAL_String.c:424:13: warning: 'FCI_TOLOWER' defined but not used [-Wunused-function]
 static void FCI_TOLOWER(MX_STRING sSrc, MX_UINT16 iSrc_len, MX_STRING sDst, MX_UINT16 iDst_len)
             ^~~~~~~~~~~
C:\ProgramData\MatrixTSL\FlowcodeV9\CAL\ESP\ESP_CAL_String.c:331:10: warning: 'FCI_TOSTRU32' defined but not used [-Wunused-function]
 MX_UINT8 FCI_TOSTRU32(MX_UINT32 iSrc1, MX_STRING sDst, MX_UINT16 iDst_len)
          ^~~~~~~~~~~~
C:\ProgramData\MatrixTSL\FlowcodeV9\CAL\ESP\ESP_CAL_String.c:297:10: warning: 'FCI_TOSTRU16' defined but not used [-Wunused-function]
 MX_UINT8 FCI_TOSTRU16(MX_UINT16 iSrc1, MX_STRING sDst, MX_UINT16 iDst_len)
          ^~~~~~~~~~~~
C:\ProgramData\MatrixTSL\FlowcodeV9\CAL\ESP\ESP_CAL_String.c:254:10: warning: 'FCI_TOSTRS32' defined but not used [-Wunused-function]
 MX_UINT8 FCI_TOSTRS32(MX_SINT32 iSrc1, MX_STRING sDst, MX_UINT16 iDst_len)
          ^~~~~~~~~~~~
C:\ProgramData\MatrixTSL\FlowcodeV9\CAL\ESP\ESP_CAL_String.c:211:10: warning: 'FCI_TOSTRS16' defined but not used [-Wunused-function]
 MX_UINT8 FCI_TOSTRS16(MX_SINT16 iSrc1, MX_STRING sDst, MX_UINT16 iDst_len)
          ^~~~~~~~~~~~
C:\ProgramData\MatrixTSL\FlowcodeV9\CAL\ESP\ESP_CAL_String.c:182:18: warning: 'FCI_RIGHTSTRING' defined but not used [-Wunused-function]
 static MX_STRING FCI_RIGHTSTRING(MX_STRING sSrc, MX_UINT16 iSrc_len, MX_UINT16 iCount, MX_STRING sDst, MX_UINT16 iDst_len)
                  ^~~~~~~~~~~~~~~
C:\ProgramData\MatrixTSL\FlowcodeV9\CAL\ESP\ESP_CAL_String.c:159:18: warning: 'FCI_LEFTSTRING' defined but not used [-Wunused-function]
 static MX_STRING FCI_LEFTSTRING(MX_STRING sSrc, MX_UINT16 iSrc_len, MX_UINT16 iCount, MX_STRING sDst, MX_UINT16 iDst_len)
                  ^~~~~~~~~~~~~~
In file included from C:\ProgramData\MatrixTSL\FlowcodeV9\CAL\internals.c:568,
                 from ../main/esp-project.c:48:
C:\ProgramData\MatrixTSL\FlowcodeV9\CAL\ESP\ESP_CAL_String.c:129:18: warning: 'FCI_MIDSTRING' defined but not used [-Wunused-function]
 static MX_STRING FCI_MIDSTRING(MX_STRING sSrc, MX_UINT16 iSrc_len, MX_UINT16 iStart, MX_UINT16 iCount, MX_STRING sDst, MX_UINT16 iDst_len)
                  ^~~~~~~~~~~~~
C:\ProgramData\MatrixTSL\FlowcodeV9\CAL\ESP\ESP_CAL_String.c:121:18: warning: 'FCI_GETLENGTH' defined but not used [-Wunused-function]
 static MX_UINT16 FCI_GETLENGTH(MX_STRING sStr1, MX_UINT16 iStr1_len)
                  ^~~~~~~~~~~~~
C:\ProgramData\MatrixTSL\FlowcodeV9\CAL\ESP\ESP_CAL_String.c:113:17: warning: 'FCI_GETCHAR' defined but not used [-Wunused-function]
 static MX_UINT8 FCI_GETCHAR(MX_STRING sStr1, MX_UINT16 iStr1_len, MX_UINT16 iPos)
                 ^~~~~~~~~~~
[4/7] Linking CXX static library esp-idf\main\libmain.a
I am not sure if this is why the lcd didnt work but why are these errors coming up, the LED flashes

Re: Errors while compiling

Posted: Tue Jan 17, 2023 8:22 pm
by BenR
Hello,

I beleive those warnings look normal. Can you attach your project file so we can have a look at your program.

Re: Errors while compiling

Posted: Wed Jan 18, 2023 10:15 am
by ctesla75
Hi Ben , Thanks for looking at the errors. I have tried using different LCD's and different pinouts with no luck. I am only trying to get text on an lcd .
I am now wondering whether my esp32 is faulty. IT is a ESP32-wroom-32. There were no errors during compiling

Re: Errors while compiling

Posted: Wed Jan 18, 2023 10:59 am
by mnfisher
You are calling 'Start' repeatedly - move that to before the loop - it just needs to be called once..

Also add a delay to the loop (say 500ms) - the LED on the esp32 is flashing because the watchdog timer is causing an error. (Or add a loop with a delay after printing something to the display - as in this case it is just 'static' text)

Martin

Re: Errors while compiling

Posted: Wed Jan 18, 2023 12:41 pm
by ctesla75
I have made changes as suggested but still no output, i will try a few different lcds tommorow, they are hd44780 LCD's as far as i know. They are second hand , taken from faulty equipment with working LCD'S

Re: Errors while compiling

Posted: Wed Jan 18, 2023 2:35 pm
by chipfryer27
Hi

You don't really need your loop at all just to display a single line for testing. You could just Start the display then print "Hello".

You might want to include a delay of say 50mS after the Start command as I think some older displays needed such. Also, have you set the contrast level and R/W pin?

The WiKi will provide generic connections (right click component then select Help) for these displays.

Regards

Re: Errors while compiling

Posted: Wed Jan 18, 2023 4:28 pm
by medelec35
Just make sure your R/W is connected to GND and the pot is wired correctly.
A general rule is:
If you can only see a top row of squares, then there is a connection issue (including R/W not connected to GND) or LCD start has not been used.
If there is more than one row of black squares, then the contrast i.e pot settings are the issue.
If nothing at all can be seen, then software or the contrast (pot settings) could be the issue.

Re: Errors while compiling

Posted: Thu Jan 19, 2023 8:31 am
by ctesla75
Thanks for the replies.
I have updated the code and removed the loop, I also added a delay ,set r/w to ground and fixed the contrast.
But still no luck. I get one line of blocks the contrast seems to work fading it in and out but no characters. I tried using the first 4 bits db0 - db then db4 - db7. but still nothing. the lcd is a tc1602a-09t and i looked up the datasheet. so think its wired up right\

Re: Errors while compiling

Posted: Thu Jan 19, 2023 10:20 am
by chipfryer27
Hi

Sounds like you are getting close.

The generic 16x2 component uses the "4-bit" interface and uses the upper bits (D4-D7) which are pins 11-14 on the display.

A quick search on the web suggests that the chip is a clone of the Hitachi chip but I see that some people have seen some timing issues.

Regards

Re: Errors while compiling

Posted: Fri Jan 20, 2023 12:09 pm
by ctesla75
Hi
Have been away from project ,just got back to trying again. I have put a usb logic analyser on the 4 bit interface , but data is only coming out of two pins. I have also put the print string comand back in a loop