lwy9187-302661 发表于 2011-7-28 21:59:36

编译程序时,遇到下列提示,是什么问题?

如题,本人新手,请多多指教!
Test.axf: Error: L6218E: Undefined symbol SystemInit (referred from startup_stm32f10x_md.o).

发表于 2011-7-29 09:41:49

RE:编译程序时,遇到下列提示,是什么问题?

startup_stm32f10x_md.S这个文件没有加载。

hui235 发表于 2011-7-29 10:12:28

RE:编译程序时,遇到下列提示,是什么问题?

是你的SystemInit 函数或者汇编的table没定义,所以链接的时候出错了,没找到SystemInit
startup_stm32f10x_md.S 应该是加载了,否则不会生成.O文件。。。
楼主注意区分编译与链接的概念。。。

hui235 发表于 2011-7-29 10:40:17

RE:编译程序时,遇到下列提示,是什么问题?

我在工程里的system_stm32l1xx.c找到了下面的函数。。你搜一下你的工程,然后编译相应的文件。。。
void SystemInit (void)
{
/*!< Set MSION bit */
RCC->CR |= (uint32_t)0x00000100;
/*!< Reset SW, HPRE, PPRE1, PPRE2, MCOSEL and MCOPRE bits */
RCC->CFGR &= (uint32_t)0x88FFC00C;

/*!< Reset HSION, HSEON, CSSON and PLLON bits */
RCC->CR &= (uint32_t)0xEEFEFFFE;
/*!< Reset HSEBYP bit */
RCC->CR &= (uint32_t)0xFFFBFFFF;
/*!< Reset PLLSRC, PLLMUL and PLLDIV bits */
RCC->CFGR &= (uint32_t)0xFF02FFFF;
/*!< Disable all interrupts */
RCC->CIR = 0x00000000;
   
/*!< Configure the System clock frequency, HCLK, PCLK2 and PCLK1 prescalers */
/*!< Configure the Flash Latency cycles and enable prefetch buffer */
SetSysClock();
}

lwy9187-302661 发表于 2011-7-29 22:18:10

RE:编译程序时,遇到下列提示,是什么问题?

多谢帮忙,回头测试一下,
刚刚开始学,被一串串的寄存器,一串串的函数搞糊涂了

hui235 发表于 2011-7-30 15:53:12

RE:编译程序时,遇到下列提示,是什么问题?

没关系,刚开始学大家都这样,
有问题多多交流,希望能够帮到你。。

条哥 发表于 2012-10-1 20:30:18

回复:编译程序时,遇到下列提示,是什么问题?

C:\Documents and Settings\Administrator\桌面\MyFirstJob\src\main.c(3): error:#169: expected a declaration

条哥 发表于 2012-10-1 20:31:00

回复:编译程序时,遇到下列提示,是什么问题?

C:\Documents and Settings\Administrator\桌面\MyFirstJob\src\main.c(9): error:#65: expected a ";"
页: [1]
查看完整版本: 编译程序时,遇到下列提示,是什么问题?