实验环境
硬件:STM32板 (STM32F207 )
LCD12864 模块 (ST7565)
USB转串口模块 TTL
ST-Link V2 调试
软件:MDK Keil v5.12
PortHelper.exe 串口调试助手
实验目的
在嵌入式平台上生成QR Code,LCD显示
实验步骤:
-
建立STM32工程,包括LCD显示或串口打印,使用MicroLIB
-
在https://github.com/fukuchi/libqrencode 下载源码 添加主文件夹下的 .h .c文件到工程,qrenc.c 不要添加
-
对所有.C文件做如下修改
#if HAVE_CONFIG_H
# include "config.h"
#endif
改为
# include "config.h"
添加 config.h文件,添加如下信息
/* Define to 1 if you have the `strdup' function. */
#define HAVE_STRDUP 0
/* Major version number */
#define MAJOR_VERSION 3
/* Micro version number */
#define MICRO_VERSION 0
/* Minor version number */
#define MINOR_VERSION 9
/* Define to the version of this package. */
#define PACKAGE_VERSION "3.9.0"