kgsws / gameboy_lcd

Gameboy LCD code used in my video.
GNU General Public License v3.0
36 stars 5 forks source link

Issues building #3

Open Ximrats opened 2 years ago

Ximrats commented 2 years ago

Hey, I'm having a lot of problems figuring out how to build any of the ESP32 code. The makefiles appear to just be a default hello world makefile and I'm not sure how to create a proper one. I tried putting all the code into a project using the Eclipse IDE and Espressif IDE and when trying to build it that way, it spits out a whole load of stuff like this and I really don't have the experience to be able to figure out what to do.

cmd.exe /C "cd . && C:\Espressif\tools\xtensa-esp32-elf\esp-2021r2-patch3-8.4.0\xtensa-esp32-elf\bin\xtensa-esp32-elf-g++.exe -mlongcalls -Wno-frame-address @CMakeFiles\gbcapture.elf.rsp -o gbcapture.elf && cd ." c:/espressif/tools/xtensa-esp32-elf/esp-2021r2-patch3-8.4.0/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld.exe: esp-idf/main/libmain.a(main.c.obj):(.literal.lcd_task+0x20): undefined reference to gblcd_input_init' c:/espressif/tools/xtensa-esp32-elf/esp-2021r2-patch3-8.4.0/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld.exe: esp-idf/main/libmain.a(main.c.obj):(.literal.lcd_task+0x24): undefined reference togblcd_wait_frame' c:/espressif/tools/xtensa-esp32-elf/esp-2021r2-patch3-8.4.0/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld.exe: esp-idf/main/libmain.a(main.c.obj): in function lcd_task': C:\Users\Nic\eclipse-workspace\gbcapture\build/../main/main.c:86: undefined reference togblcd_input_init' c:/espressif/tools/xtensa-esp32-elf/esp-2021r2-patch3-8.4.0/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld.exe: esp-idf/main/libmain.a(main.c.obj): in function connect': C:/Espressif/frameworks/esp-idf-v4.4.1/components/lwip/lwip/src/include/lwip/sockets.h:640: undefined reference togblcd_wait_frame' collect2.exe: error: ld returned 1 exit status ninja: build stopped: subcommand failed. ninja failed with exit code 1

And trying to build the send code for PC(receive worked fine), running make spits out this

main.c: In function ‘main’: main.c:144:19: error: format ‘%s’ expects argument of type ‘char ’, but argument 2 has type ‘void ’ [-Werror=format=] 144 printf("usage: %s IP [scale]\n", argv[0]); ~^ ~~~
char void
%p

cc1: all warnings being treated as errors make: *** [: main.o] Error 1

kgsws commented 2 years ago

Yeah, MAKEFILE is here only for setup / config. You are supposed to use CMAKE build. There are build commands in readme. I do not use Windows or Eclipse so i don't know how those work.

Ximrats commented 2 years ago

Thanks for replying Under Xubuntu, running cmake as in readme is giving me this output: CMake Error at CMakeLists.txt:1 (idf_component_register): Unknown CMake command "idf_component_register".

I'm sorry for bothering you, but I just cannot figure out what I'm doing wrong. I spent a good while trying to look up what the problem may be but most of it wasn't relevant.

There are also no relevant Cmake files such as Cmakelists.txt in the PC code directories so it didn't seem as if I was supposed to use cmake for those (make seemed to work fine for the receive code along with RPi solo but none of the others) and wouldn't know how to go about it. My background is electronics so I'm trying to get a handle on this stuff

kgsws commented 2 years ago

Yeah. You need to install and setup ESP SDK. https://docs.espressif.com/projects/esp-idf/en/latest/esp32/get-started/linux-macos-setup.html

Ximrats commented 2 years ago

Yea, I've done it, and redone it numerous times so I have no idea what's going on. Seems to be perhaps some sort of cmake version mismatch. Do you have already built code anywhere I can just grab?

kgsws commented 2 years ago

Hmm, i would suspect there is something wrong with "Step 4. Set up the environment variables". You have to do this every time you open new terminal. Unless they have changed something in ESP32 SDK ... again.

Already built code is not really useful as it contains hardcoded WiFi settings, you can only change those when compiling.