Code: Select all
#ifdef __cplusplus
extern "C"{
#endif
void app_main()
{
printf("Hello world!\n");
/* Print chip information */
esp_chip_info_t chip_info;
esp_chip_info(&chip_info);
printf("This is ESP8266 chip with %d CPU cores, WiFi, ",
chip_info.cores);
printf("silicon revision %d, ", chip_info.revision);
printf("%dMB %s flash\n", spi_flash_get_chip_size() / (1024 * 1024),
(chip_info.features & CHIP_FEATURE_EMB_FLASH) ? "embedded" : "external");
// Create a task for the LED blinking
// xTaskCreate(&blink_task, "blink_task", configMINIMAL_STACK_SIZE, NULL, 5, NULL);
initializeScreen();
for (int i = 10; i >= 0; i--) {
printf("Restarting in %d seconds...\n", i);
vTaskDelay(1000 / portTICK_PERIOD_MS);
}
printf("Restarting now.\n");
fflush(stdout);
esp_restart();
}
#ifdef __cplusplus
}
#endif
Code: Select all
/Users/macbookpro/esp/xtensa-lx106-elf/bin/../lib/gcc/xtensa-lx106-elf/8.4.0/../../../../xtensa-lx106-elf/bin/ld: /Users/macbookpro/embedded_development/RTOS/ESP8266/lcd_test/build/main/libmain.a(hello_world_main.o):(.literal._Z16initializeScreenv+0x4): undefined reference to `initializeLCD(lcd_t*)'
/Users/macbookpro/esp/xtensa-lx106-elf/bin/../lib/gcc/xtensa-lx106-elf/8.4.0/../../../../xtensa-lx106-elf/bin/ld: /Users/macbookpro/embedded_development/RTOS/ESP8266/lcd_test/build/main/libmain.a(hello_world_main.o):(.literal._Z16initializeScreenv+0x8): undefined reference to `sendString(lcd_t*, char*)'
/Users/macbookpro/esp/xtensa-lx106-elf/bin/../lib/gcc/xtensa-lx106-elf/8.4.0/../../../../xtensa-lx106-elf/bin/ld: /Users/macbookpro/embedded_development/RTOS/ESP8266/lcd_test/build/main/libmain.a(hello_world_main.o): in function `initializeScreen()':
/Users/macbookpro/embedded_development/RTOS/ESP8266/lcd_test/main/hello_world_main.cpp:41: undefined reference to `initializeLCD(lcd_t*)'
/Users/macbookpro/esp/xtensa-lx106-elf/bin/../lib/gcc/xtensa-lx106-elf/8.4.0/../../../../xtensa-lx106-elf/bin/ld: /Users/macbookpro/embedded_development/RTOS/ESP8266/lcd_test/main/hello_world_main.cpp:43: undefined reference to `sendString(lcd_t*, char*)'
collect2: error: ld returned 1 exit status
How should I resolve this problem?