Hi Iam trying to start a new project based on STM32F105VC , I opened Uv4 then new project, I write juts very small code for test , it has two files main.c and init.c when i compile them I get the following error , t1.axf: Error: L6218E: Undefined symbol GPIO_Init (referred from intiports.o). t1.axf: Error: L6218E: Undefined symbol GPIO_StructInit (referred from intiports.o). t1.axf: Error: L6218E: Undefined symbol RCC_APB2PeriphClockCmd (referred from intiports.o). couid you help to solve this issue
thank you
#include <stm32f10x_cl.h> //#include <STM32_Reg.h> //#include <stm32f10x_lib.h>
//--- void delay_1sec() { long temp=0xffff; long i; for(i=0;i<300;i++) { while(temp--); temp=0xffff; }
}
//
//---------- void SysTick_Handler (void) { static unsigned long ticks ; static unsigned long timetick;
if (ticks++ >= 99) { /* Set Clock1s to 1 every 1 second */ ticks = 0;
//--------------------------- int main(void) {
SystemInit(); //SysTick_Config(SystemFrequency/100); /* Generate interrupt each 10 ms */ //------------------test routines ) init(); while(1);
//----------
#include <stm32f10x_lib.h> // STM32F10x Library Definitions
//#include <stm32f10x_gpio.h> //#include <stm32f10x_gpio.h>
#define switch GPIO_Pin_11
GPIO_InitTypeDef GPIO_InitStructure; /* CAN_InitTypeDef CAN_InitStructure; CAN_FilterInitTypeDef CAN_FilterInitStructure; CanTxMsg TxMessage; */ //----- void init() {
RCC_APB2PeriphClockCmd(RCC_APB2Periph_GPIOA, ENABLE); GPIO_StructInit(&GPIO_InitStructure); GPIO_InitStructure.GPIO_Pin = switch ; GPIO_InitStructure.GPIO_Speed = GPIO_Speed_50MHz; GPIO_InitStructure.GPIO_Mode = GPIO_Mode_IPU; GPIO_Init(GPIOA, &GPIO_InitStructure);
//--------------------