B4R Question [Solved] MCU_FRIENDS TFT on esp32 UNO board

derez

Expert
Licensed User
Longtime User
The board I refer to is esp32 with shape of UNO :
1602229619356.png

The board accepts MCU_Friends TFT shield after changing the arduino library to the library here:
The library adds boards to the original limited number.
Explanation about a required wiring modification (solder 3 jumpers) is here: https://github.com/s60sc/Adafruit_TouchScreen

I put the library in the libraries directory of ESP32 (C:\Users\dudu\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.4\libraries)
In the example sketches, after changing the initialization 5 pins to
B4X:
#define LCD_CS 33 // Chip Select goes to Analog 3
#define LCD_RS 15 // LCD_RS = Register Select or LCD_CD = Command/Data goes to Analog 2
#define LCD_WR 4 // LCD Write goes to Analog 1
#define LCD_RD 2 // LCD Read goes to Analog 0
#define LCD_RESET 32 // Can alternately just connect to Arduino's reset pin
Replacing the UNO's A1-A5 pins, the sketches run nicely :)

Moving to B4R - I copied the library files and put them in B4R additional libraries in the rMCUFRIENDS directory. I also copied the utility directory files and put them there seeing that the original library had them.
In the program I changed only the init :
B4X:
'    mcu.Initialize(p.A3, p.A2, p.A1, p.A0, p.A4)  ' the original UNO
    mcu.Initialize(33, 15, 4,2, 32)               ' ESP32'

I got the following error:
........
DCORE_DEBUG_LEVEL=0 "-IC:\\Users\\dudu\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.4\\cores\\esp32" "-IC:\\Users\\dudu\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.4\\variants\\esp32" "D:\\B4R\\TFT_clock\\NEW_UNO_wide_standard\\Objects\\bin\\sketch\\MCUFRIEND_kbv.cpp" -o nul
Alternatives for utility/mcufriend_shield.h: []
ResolveLibrary(utility/mcufriend_shield.h)
-> candidates: []
MCUFRIEND_kbv.cpp:35:38: fatal error: utility/mcufriend_shield.h: No such file or directory
compilation terminated.
exit status 1
DEBUG StatusLogger Stopping LoggerContext[name=af3868, org.apache.logging.log4j.core.LoggerContext@d1e646]
DEBUG StatusLogger Stopping LoggerContext[name=af3868, org.apache.logging.log4j.core.LoggerContext@d1e646]...
TRACE StatusLogger Unregistering 1 MBeans: [org.apache.logging.log4j2:type=af3868]
TRACE StatusLogger Unregistering 1 MBeans: [org.apache.logging.log4j2:type=af3868,component=StatusLogger]
TRACE StatusLogger Unregistering 1 MBeans: [org.apache.logging.log4j2:type=af3868,component=ContextSelector]
TRACE StatusLogger Unregistering 1 MBeans: [org.apache.logging.log4j2:type=af3868,component=Loggers,name=]
TRACE StatusLogger Unregistering 2 MBeans: [org.apache.logging.log4j2:type=af3868,component=Appenders,name=RollingFile, org.apache.logging.log4j2:type=af3868,component=Appenders,name=Console]
TRACE StatusLogger Unregistering but no MBeans found matching 'org.apache.logging.log4j2:type=af3868,component=AsyncAppenders,name=*'
TRACE StatusLogger Unregistering but no MBeans found matching 'org.apache.logging.log4j2:type=af3868,component=AsyncLoggerRingBuffer'
TRACE StatusLogger Unregistering but no MBeans found matching 'org.apache.logging.log4j2:type=af3868,component=Loggers,name=*,subtype=RingBuffer'
TRACE StatusLogger Stopping XmlConfiguration[location=jar:file:/C:/Program%20Files%20(x86)/Arduino/lib/pde.jar!/log4j2.xml]...
....

I tried putting the utility directory in the B4R library, in the ESP32 libray - the same error šŸ‘¹
The file appears in mcufriends.cpp as include statement, I don't understand why it cannot be found.
Help please !
 

derez

Expert
Licensed User
Longtime User
I copied the files in utility to the MCU library folder in the ESP32 files, still the same error. It is looking for utility "ResolveLibrary(utility/mcufriend_shield.h)" :mad:
Edit: changed the include line in the mcufriends_kbv.cpp file to be without the "utility" :D Thanks
 
Last edited:
Upvote 0
Top