#include "stm32f10x.h"
#include "bsp_usart1.h"
#include "bsp_ili9341_lcd.h"
//#include "bsp_sdio_sdcard.h"
#include "bsp_sdfs_app.h"
#include "bsp_bmp.h"
#ifndef _FF_H
#include "ff.h"
#include "diskio.h"
#endif
FATFS yu;
FRESULT res1;
//extern FRESULT f_mkdir(const TCHAR *); /* Pointer to the directory path */
/*
* 要想中文显示成功
* 需把字库拷贝到sd卡上,然后把sd卡插到开发板的卡槽上
*/
int main(void)
{
LCD_Init();
/* USART1 config */
//USART1_Config();
//printf("\r\n this is a fatfs test demo \r\n");
/* 设置Lcd Gram 扫描方向为: 右下角->左上角 */
Lcd_GramScan( 3 );
LCD_Clear(0, 0, 320, 240, BACKGROUND);
/* 初始化sd卡文件系统,因为汉字的字库和bmp图片放在了sd卡里面 */
Sd_fs_init();
/* 显示sd卡里面的bmp图片 */
Lcd_show_bmp(0, 0,"/wildfire.bmp");
Lcd_show_bmp( 82,0,"/pic1.bmp");
Lcd_show_bmp( 174,0,"/pic2.bmp");
#if 1
f_mount (0, &yu);
res1 =f_mkdir ("yu/yu123");
if (res1==FR_OK)
Screen_shot(0,0,320,240,"yu/yu123/myscreen123");
f_mount (0, NULL);
#endif
Screen_shot(0,0,320,240,"/myscreen");
Lcd_GramScan( 2 );
LCD_DispStr(100, 100, "yuchuanyang",RED);
Lcd_GramScan(2);
LCD_DispStrCH(50, 224, (uint8_t *)"野火", RED);
LCD_DispEnCh(100, 50,"-野火论坛-", RED);
while(1);
}
该程序是在野火FSMC_液晶截图程序里面,进行新建文件,并保存bmp图片到新文件夹中 yu/yu123,添加的内容在 #if 1 .....#endif 中,其他添加修改的内容编译都通过。添加 #if 1 .....#endif 后编译,显示错误如下:
..\..\Output\Template.axf: Error: L6218E: Undefined symbol f_mkdir (referred from main.o).
..\..\Output\Template.axf: Not enough information to list image symbols.
..\..\Output\Template.axf: Finished: 1 information, 0 warning and 1 error messages.
但我检查了 Include Paths中的ff9文件路径了,此main函数上也有包含相关头文件。
不知道错误出在哪,求指点
[/td][/tr][/table] |