运行一个STM32工程时,代码出错:
/* */
const ChineseCell_t OLED_CF16x16[] = {
" ,",
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x58,0x38,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
"。",
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x18,0x24,0x24,0x18,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
"温",
0x10,0x60,0x02,0x8C,0x00,0x00,0xFE,0x92,0x92,0x92,0x92,0x92,0xFE,0x00,0x00,0x00,
0x04,0x04,0x7E,0x01,0x40,0x7E,0x42,0x42,0x7E,0x42,0x7E,0x42,0x42,0x7E,0x40,0x00,
"湿",
0x10,0x60,0x02,0x8C,0x00,0xFE,0x92,0x92,0x92,0x92,0x92,0x92,0xFE,0x00,0x00,0x00,
0x04,0x04,0x7E,0x01,0x44,0x48,0x50,0x7F,0x40,0x40,0x7F,0x50,0x48,0x44,0x40,0x00,
"度",
0x00,0x00,0xFC,0x24,0x24,0x24,0xFC,0x25,0x26,0x24,0xFC,0x24,0x24,0x24,0x04,0x00,
0x40,0x30,0x8F,0x80,0x84,0x4C,0x55,0x25,0x25,0x25,0x55,0x4C,0x80,0x80,0x80,0x00,
"光",
0x40,0x40,0x42,0x44,0x58,0xC0,0x40,0x7F,0x40,0xC0,0x50,0x48,0x46,0x40,0x40,0x00,
0x80,0x80,0x40,0x20,0x18,0x07,0x00,0x00,0x00,0x3F,0x40,0x40,0x40,0x40,0x78,0x00,
"照",
0x00,0xFE,0x42,0x42,0x42,0xFE,0x00,0x42,0xA2,0x9E,0x82,0xA2,0xC2,0xBE,0x00,0x00,
0x80,0x6F,0x08,0x08,0x28,0xCF,0x00,0x00,0x2F,0xC8,0x08,0x08,0x28,0xCF,0x00,0x00,
"强",
0x02,0xE2,0x22,0x22,0x3E,0x00,0x80,0x9E,0x92,0x92,0xF2,0x92,0x92,0x9E,0x80,0x00,
0x00,0x43,0x82,0x42,0x3E,0x40,0x47,0x44,0x44,0x44,0x7F,0x44,0x44,0x54,0xE7,0x00,
"烟",
0x80,0x70,0x00,0xFF,0x10,0x08,0xFE,0x42,0x42,0x42,0xFA,0x42,0x42,0x42,0xFE,0x00,
0x80,0x60,0x18,0x07,0x08,0x10,0xFF,0x50,0x48,0x46,0x41,0x42,0x4C,0x40,0xFF,0x00,
"雾",
0x10,0x0C,0x05,0x55,0x55,0xD5,0x05,0x7F,0x05,0x55,0x55,0x55,0x05,0x14,0x0C,0x00,
0x10,0x10,0x10,0x8A,0xA9,0x6B,0x35,0x25,0x25,0xAB,0xE9,0x08,0x10,0x10,0x10,0x00,
"浓",
0x10,0x60,0x02,0x8C,0x20,0x18,0x08,0xC8,0x38,0xCF,0x08,0x08,0x28,0x98,0x00,0x00,
0x04,0x04,0x7E,0x01,0x04,0x02,0x01,0xFF,0x40,0x21,0x06,0x0A,0x11,0x20,0x40,0x00,
":",
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x36,0x36,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
"℃",
0x06,0x09,0x09,0xE6,0xF8,0x0C,0x04,0x02,0x02,0x02,0x02,0x02,0x04,0x1E,0x00,0x00,
0x00,0x00,0x00,0x07,0x1F,0x30,0x20,0x40,0x40,0x40,0x40,0x40,0x20,0x10,0x00,0x00,
"红",
0x20,0x30,0xAC,0x63,0x20,0x18,0x00,0x04,0x04,0x04,0xFC,0x04,0x04,0x04,0x00,0x00,
0x22,0x67,0x22,0x12,0x12,0x12,0x40,0x40,0x40,0x40,0x7F,0x40,0x40,0x40,0x40,0x00,
"外",
0x00,0xC0,0x30,0x1F,0x10,0x10,0xF0,0x00,0x00,0xFF,0x20,0x40,0x80,0x00,0x00,0x00,
0x81,0x40,0x21,0x12,0x0C,0x03,0x00,0x00,0x00,0xFF,0x00,0x00,0x00,0x03,0x00,0x00,
"线",
0x20,0x30,0xAC,0x63,0x20,0x18,0x80,0x90,0x90,0xFF,0x90,0x49,0x4A,0x48,0x40,0x00,
0x22,0x67,0x22,0x12,0x12,0x12,0x40,0x40,0x20,0x13,0x0C,0x14,0x22,0x41,0xF8,0x00,
"避",
0x40,0x42,0xCC,0x00,0x80,0x7E,0x22,0x22,0x3E,0x00,0x54,0x65,0xC6,0x64,0x54,0x00,
0x40,0x20,0x1F,0x22,0x41,0x5F,0x49,0x49,0x5F,0x40,0x42,0x42,0x5F,0x42,0x42,0x00,
"障",
0x00,0xFE,0x02,0x22,0xDA,0x06,0x10,0xD2,0x56,0x5A,0x53,0x5A,0x56,0xD2,0x10,0x00,
0x00,0xFF,0x08,0x10,0x08,0x07,0x10,0x17,0x15,0x15,0xFD,0x15,0x15,0x17,0x10,0x00,
"蜂",
0x00,0xF8,0x08,0xFF,0x08,0xF8,0x80,0x90,0x4C,0x57,0xA4,0x54,0x4C,0x84,0x80,0x00,
0x20,0x63,0x21,0x1F,0x11,0x39,0x10,0x10,0x15,0x15,0xFF,0x15,0x15,0x10,0x10,0x00,
"鸣",
0x00,0xFC,0x04,0x04,0xFC,0x00,0x00,0xFC,0x04,0x16,0x65,0x04,0x84,0xFC,0x00,0x00,
0x00,0x0F,0x04,0x04,0x0F,0x00,0x10,0x13,0x12,0x12,0x12,0x52,0x92,0x42,0x3E,0x00,
"器",
0x80,0x80,0x9E,0x92,0x92,0x92,0x9E,0xE0,0x80,0x9E,0xB2,0xD2,0x92,0x9E,0x80,0x00,
0x08,0x08,0xF4,0x94,0x92,0x92,0xF1,0x00,0x01,0xF2,0x92,0x94,0x94,0xF8,0x08,0x00,
"开",
0x80,0x82,0x82,0x82,0xFE,0x82,0x82,0x82,0x82,0x82,0xFE,0x82,0x82,0x82,0x80,0x00,
0x00,0x80,0x40,0x30,0x0F,0x00,0x00,0x00,0x00,0x00,0xFF,0x00,0x00,0x00,0x00,0x00,
"关",
0x00,0x00,0x10,0x11,0x16,0x10,0x10,0xF0,0x10,0x10,0x14,0x13,0x10,0x00,0x00,0x00,
0x81,0x81,0x41,0x41,0x21,0x11,0x0D,0x03,0x0D,0x11,0x21,0x41,0x41,0x81,0x81,0x00,
" ",
0xFF,0x01,0x01,0x01,0x31,0x09,0x09,0x09,0x09,0x89,0x71,0x01,0x01,0x01,0x01,0xFF,
0xFF,0x80,0x80,0x80,0x80,0x80,0x80,0x96,0x81,0x80,0x80,0x80,0x80,0x80,0x80,0xFF,
};
报错信息为:
Hardware\OELD_Data.c(334): error: #8: missing closing quote
" 锛?",
Hardware\OELD_Data.c(335): error: #253: expected a ","
Hardware\OELD_Data.c(338): error: #8: missing closing quote
"銆?",
Hardware\OELD_Data.c(339): error: #253: expected a ","
Hardware\OELD_Data.c(342): error: #8: missing closing quote
"娓?",
Hardware\OELD_Data.c(343): error: #253: expected a ","
Hardware\OELD_Data.c(346): error: #8: missing closing quote
"婀?",
Hardware\OELD_Data.c(347): error: #253: expected a ","
Hardware\OELD_Data.c(350): error: #8: missing closing quote
"搴?",
Hardware\OELD_Data.c(351): error: #253: expected a ","
Hardware\OELD_Data.c(354): error: #8: missing closing quote
"鍏?",
等等一共30个出错。
以为是兼容问题,按网上修改了环境变量,但没什么用。在其他工程使能正常运行的,但不知道在这个工程运行不了。
编码问题, 试试修改文件编码,或者直接用uinicode替换中文字符串处理, 还有你这个类型ChineseCell_t 的定义是什么?为什么要把字符串和数字混在一起放,这样也是有问题的.
语法问题吧。。
需要看看你的字体这个结构体怎么定义的,根据自己的定义写格式