Da, I forgot to enable module at `stm32f4_bsp.h` it work now.
Louie. 2017-03-16 16:12 GMT+08:00 Louie Lu <[email protected]>: > Hi everyone, > > I'm now trying to add LCD driver for STM32F429, but get a linked error > that I can't resolve. > > The apps/lcdtest/src/main.c include the lcd driver header, and then used > the defined function "hal_lcd_init": > > #include "stm32f429_lcd/stm32f429_lcd.h" > int main() { > sysinit(); > hal_lcd_init(); > ... > } > > But when try to build and at the linking stage, it got the error message: > > Linking bin/targets/lcdtest/app/apps/lcdtest/lcdtest.elf > Error: bin/targets/lcdtest/app/hw/drivers/lcd/stm32f429_lcd/hw_ > drivers_lcd_stm32f429_lcd.a(stm32f429_lcd.o): In function `hal_lcd_init': > repos/apache-mynewt-core/hw/drivers/lcd/stm32f429_lcd/src/stm32f429_lcd.c:56: > undefined reference to `HAL_LTDC_Init' > repos/apache-mynewt-core/hw/drivers/lcd/stm32f429_lcd/src/stm32f429_lcd.c:73: > undefined reference to `HAL_LTDC_ConfigLayer' > collect2: error: ld returned 1 exit status > > > I have already checked the include in gcc by `newt build lcdtest -v > -ldebug`, and the path of the file is included. > > Why will the linker still throw a error and tell me there isn't > HAL_LTDC_init, and why will nm result tells the HAL_LTDC_Init and > ConfigLayer is "U", not found? > > The git of the lcd code is here: > https://github.com/grapherd/incubator-mynewt-core/tree/stm32f429_lcd_test > > code is inside: > - apps/lcdtest > - hw/drivers/lcd/stm32f429_lcd > > > Thanks, > Louie. > > >
