Datum:
|
Ich möchte gern ein kleines Projekt mit einem STM32F030 und Atollic aufsetzen. Ich lege ein neues Projekt an. Es fehlt grundsätzlich die SPL, die muss man manuell hinzu fügen. Ist aber leichter gesagt als getan. Die *.h Dateien kann ich unter Project->Properties->C/C++ General-> Paths and Symbols unter dem Reiter include hinzufügen. Wenn ich jetzt den simplen Code
/* Includes */ #include "stm32f0xx.h" #include "stm32f0xx_conf.h" /* Private macro */ /* Private variables */ /* Private function prototypes */ /* Private functions */ /** **=========================================================================== ** ** Abstract: main program ** **=========================================================================== */ int main(void) { uint32_t i = 0; // Enable Clock RCC_AHBPeriphClockCmd( RCC_AHBPeriph_GPIOA, ENABLE ); // Create Initstructure GPIO_InitTypeDef GPIO_InitStructure; // Lets go GPIO_StructInit( &GPIO_InitStructure ); GPIO_InitStructure.GPIO_Pin = GPIO_Pin_3; GPIO_InitStructure.GPIO_Mode = GPIO_Mode_OUT; GPIO_InitStructure.GPIO_OType = GPIO_OType_PP; GPIO_InitStructure.GPIO_Speed = GPIO_Speed_Level_3; GPIO_InitStructure.GPIO_PuPd = GPIO_PuPd_NOPULL; GPIO_Init(GPIOA, &GPIO_InitStructure); /* TODO - Add your application code here */ /* Infinite loop */ while (1) { i++; } } |
haben, kommen folgende Fehlermeldungen: undefined reference to GPIO_Init undefined reference to GPIO_StrucInit undefined reference to RCC_.... logisch, denn die Funktionen kennt er ja noch nicht. Jetzt scheitert es aber daran, die Funktionen (also Sourcen) dazu einzubinden. Ich habe es über die "Source Location" versucht, dann haben diese aber keinen Bezug zu den Headern und ich erhalte unbegrenzt Fehler.
:
Bearbeitet durch User
Datum:
|
Ingo L. schrieb: > undefined reference to GPIO_Init > undefined reference to GPIO_StrucInit Dafür braucht es die stm32f0xx_gpio.h und stm32f0xx_gpio.c Ingo L. schrieb: > undefined reference to RCC_.... Dafür braucht es die stm32f0xx_rcc.h und stm32f0xx_rcc.c Kopiere sie in dein Projekt-Verzeichnis und füge sie zu deinem Projekt-Tree hinzu.
Datum:
|
Das hilft nicht, dann kommt das: ..\src\stm32f0xx_rcc.c:205:3: warning: implicit declaration of function 'assert_param' [-Wimplicit-function-declaration] assert_param(IS_RCC_HSE(RCC_HSE)); ^~~~~~~~~~~~ ..\src\stm32f0xx_rcc.c: In function 'RCC_WaitForHSEStartUp': ..\src\stm32f0xx_rcc.c:239:30: error: 'HSE_STARTUP_TIMEOUT' undeclared (first use in this function) } while((StartUpCounter != HSE_STARTUP_TIMEOUT) && (HSEStatus == RESET)); ^~~~~~~~~~~~~~~~~~~ ..\src\stm32f0xx_rcc.c:239:30: note: each undeclared identifier is reported only once for each function it appears in In file included from ..\src\stm32f0xx_rcc.c:59:0: ..\src\stm32f0xx_rcc.c: In function 'RCC_PLLConfig': ..\src\stm32f0xx_rcc.h:88:42: error: 'RCC_CFGR_PLLSRC_HSI_Div2' undeclared (first use in this function) #define RCC_PLLSource_HSI_Div2 RCC_CFGR_PLLSRC_HSI_Div2 ^ ..\src\stm32f0xx_rcc.h:94:49: note: in expansion of macro 'RCC_PLLSource_HSI_Div2' #define IS_RCC_PLL_SOURCE(SOURCE) (((SOURCE) == RCC_PLLSource_HSI_Div2) || \ ^~~~~~~~~~~~~~~~~~~~~~ ..\src\stm32f0xx_rcc.c:492:16: note: in expansion of macro 'IS_RCC_PLL_SOURCE' assert_param(IS_RCC_PLL_SOURCE(RCC_PLLSource)); ^~~~~~~~~~~~~~~~~ In file included from ..\src\stm32f0xx_rcc.c:59:0: ..\src\stm32f0xx_rcc.h:91:42: error: 'RCC_CFGR_PLLSRC_HSI48_PREDIV' undeclared (first use in this function) #define RCC_PLLSource_HSI48 RCC_CFGR_PLLSRC_HSI48_PREDIV /*!< Only applicable for STM32F072 devices */ ^ ..\src\stm32f0xx_rcc.h:95:49: note: in expansion of macro 'RCC_PLLSource_HSI48' ((SOURCE) == RCC_PLLSource_HSI48) || \ ^~~~~~~~~~~~~~~~~~~ ..\src\stm32f0xx_rcc.c:492:16: note: in expansion of macro 'IS_RCC_PLL_SOURCE' assert_param(IS_RCC_PLL_SOURCE(RCC_PLLSource)); ^~~~~~~~~~~~~~~~~ ..\src\stm32f0xx_rcc.h:92:42: error: 'RCC_CFGR_PLLSRC_HSI_PREDIV' undeclared (first use in this function) #define RCC_PLLSource_HSI RCC_CFGR_PLLSRC_HSI_PREDIV /*!< Only applicable for STM32F072 devices */ ^ ..\src\stm32f0xx_rcc.h:96:49: note: in expansion of macro 'RCC_PLLSource_HSI' ((SOURCE) == RCC_PLLSource_HSI) || \ ^~~~~~~~~~~~~~~~~ ..\src\stm32f0xx_rcc.c:492:16: note: in expansion of macro 'IS_RCC_PLL_SOURCE' assert_param(IS_RCC_PLL_SOURCE(RCC_PLLSource)); ^~~~~~~~~~~~~~~~~ ..\src\stm32f0xx_rcc.h:107:41: error: 'RCC_CFGR_PLLMULL2' undeclared (first use in this function) #define RCC_PLLMul_2 RCC_CFGR_PLLMULL2 ^ ..\src\stm32f0xx_rcc.h:122:40: note: in expansion of macro 'RCC_PLLMul_2' #define IS_RCC_PLL_MUL(MUL) (((MUL) == RCC_PLLMul_2) || ((MUL) == RCC_PLLMul_3) || \ ^~~~~~~~~~~~ ..\src\stm32f0xx_rcc.c:493:16: note: in expansion of macro 'IS_RCC_PLL_MUL' assert_param(IS_RCC_PLL_MUL(RCC_PLLMul)); ^~~~~~~~~~~~~~ ..\src\stm32f0xx_rcc.h:108:41: error: 'RCC_CFGR_PLLMULL3' undeclared (first use in this function) #define RCC_PLLMul_3 RCC_CFGR_PLLMULL3 ^ ..\src\stm32f0xx_rcc.h:122:67: note: in expansion of macro 'RCC_PLLMul_3' #define IS_RCC_PLL_MUL(MUL) (((MUL) == RCC_PLLMul_2) || ((MUL) == RCC_PLLMul_3) || \ ^~~~~~~~~~~~ ..\src\stm32f0xx_rcc.c:493:16: note: in expansion of macro 'IS_RCC_PLL_MUL' assert_param(IS_RCC_PLL_MUL(RCC_PLLMul)); ^~~~~~~~~~~~~~ ..\src\stm32f0xx_rcc.h:109:41: error: 'RCC_CFGR_PLLMULL4' undeclared (first use in this function) #define RCC_PLLMul_4 RCC_CFGR_PLLMULL4 ^ ..\src\stm32f0xx_rcc.h:123:40: note: in expansion of macro 'RCC_PLLMul_4' ((MUL) == RCC_PLLMul_4) || ((MUL) == RCC_PLLMul_5) || \ ^~~~~~~~~~~~ ..\src\stm32f0xx_rcc.c:493:16: note: in expansion of macro 'IS_RCC_PLL_MUL' assert_param(IS_RCC_PLL_MUL(RCC_PLLMul)); ^~~~~~~~~~~~~~ ..\src\stm32f0xx_rcc.h:110:41: error: 'RCC_CFGR_PLLMULL5' undeclared (first use in this function) #define RCC_PLLMul_5 RCC_CFGR_PLLMULL5 ^ ..\src\stm32f0xx_rcc.h:123:67: note: in expansion of macro 'RCC_PLLMul_5' ((MUL) == RCC_PLLMul_4) || ((MUL) == RCC_PLLMul_5) || \ ^~~~~~~~~~~~ ..\src\stm32f0xx_rcc.c:493:16: note: in expansion of macro 'IS_RCC_PLL_MUL' assert_param(IS_RCC_PLL_MUL(RCC_PLLMul)); ^~~~~~~~~~~~~~ ..\src\stm32f0xx_rcc.h:111:41: error: 'RCC_CFGR_PLLMULL6' undeclared (first use in this function) #define RCC_PLLMul_6 RCC_CFGR_PLLMULL6 ^ ..\src\stm32f0xx_rcc.h:124:40: note: in expansion of macro 'RCC_PLLMul_6' ((MUL) == RCC_PLLMul_6) || ((MUL) == RCC_PLLMul_7) || \ ^~~~~~~~~~~~ ..\src\stm32f0xx_rcc.c:493:16: note: in expansion of macro 'IS_RCC_PLL_MUL' assert_param(IS_RCC_PLL_MUL(RCC_PLLMul)); ^~~~~~~~~~~~~~ ..\src\stm32f0xx_rcc.h:112:41: error: 'RCC_CFGR_PLLMULL7' undeclared (first use in this function) #define RCC_PLLMul_7 RCC_CFGR_PLLMULL7 ^ ..\src\stm32f0xx_rcc.h:124:67: note: in expansion of macro 'RCC_PLLMul_7' ((MUL) == RCC_PLLMul_6) || ((MUL) == RCC_PLLMul_7) || \ ^~~~~~~~~~~~ ..\src\stm32f0xx_rcc.c:493:16: note: in expansion of macro 'IS_RCC_PLL_MUL' assert_param(IS_RCC_PLL_MUL(RCC_PLLMul)); ^~~~~~~~~~~~~~ ..\src\stm32f0xx_rcc.h:113:41: error: 'RCC_CFGR_PLLMULL8' undeclared (first use in this function) #define RCC_PLLMul_8 RCC_CFGR_PLLMULL8 ^ ..\src\stm32f0xx_rcc.h:125:40: note: in expansion of macro 'RCC_PLLMul_8' ((MUL) == RCC_PLLMul_8) || ((MUL) == RCC_PLLMul_9) || \ ^~~~~~~~~~~~ ..\src\stm32f0xx_rcc.c:493:16: note: in expansion of macro 'IS_RCC_PLL_MUL' assert_param(IS_RCC_PLL_MUL(RCC_PLLMul)); ^~~~~~~~~~~~~~ ..\src\stm32f0xx_rcc.h:114:41: error: 'RCC_CFGR_PLLMULL9' undeclared (first use in this function) #define RCC_PLLMul_9 RCC_CFGR_PLLMULL9 ^ ..\src\stm32f0xx_rcc.h:125:67: note: in expansion of macro 'RCC_PLLMul_9' ((MUL) == RCC_PLLMul_8) || ((MUL) == RCC_PLLMul_9) || \ ^~~~~~~~~~~~ ..\src\stm32f0xx_rcc.c:493:16: note: in expansion of macro 'IS_RCC_PLL_MUL' assert_param(IS_RCC_PLL_MUL(RCC_PLLMul)); ^~~~~~~~~~~~~~ ..\src\stm32f0xx_rcc.h:115:41: error: 'RCC_CFGR_PLLMULL10' undeclared (first use in this function) #define RCC_PLLMul_10 RCC_CFGR_PLLMULL10 ^ ..\src\stm32f0xx_rcc.h:126:40: note: in expansion of macro 'RCC_PLLMul_10' ((MUL) == RCC_PLLMul_10) || ((MUL) == RCC_PLLMul_11) || \ ^~~~~~~~~~~~~ ..\src\stm32f0xx_rcc.c:493:16: note: in expansion of macro 'IS_RCC_PLL_MUL' assert_param(IS_RCC_PLL_MUL(RCC_PLLMul)); ^~~~~~~~~~~~~~ ..\src\stm32f0xx_rcc.h:116:41: error: 'RCC_CFGR_PLLMULL11' undeclared (first use in this function) #define RCC_PLLMul_11 RCC_CFGR_PLLMULL11 ^ ..\src\stm32f0xx_rcc.h:126:68: note: in expansion of macro 'RCC_PLLMul_11' ((MUL) == RCC_PLLMul_10) || ((MUL) == RCC_PLLMul_11) || \ ^~~~~~~~~~~~~ ..\src\stm32f0xx_rcc.c:493:16: note: in expansion of macro 'IS_RCC_PLL_MUL' assert_param(IS_RCC_PLL_MUL(RCC_PLLMul)); ^~~~~~~~~~~~~~ ..\src\stm32f0xx_rcc.h:117:41: error: 'RCC_CFGR_PLLMULL12' undeclared (first use in this function) #define RCC_PLLMul_12 RCC_CFGR_PLLMULL12 ^ ..\src\stm32f0xx_rcc.h:127:40: note: in expansion of macro 'RCC_PLLMul_12' ((MUL) == RCC_PLLMul_12) || ((MUL) == RCC_PLLMul_13) || \ ^~~~~~~~~~~~~ ..\src\stm32f0xx_rcc.c:493:16: note: in expansion of macro 'IS_RCC_PLL_MUL' assert_param(IS_RCC_PLL_MUL(RCC_PLLMul)); ^~~~~~~~~~~~~~ ..\src\stm32f0xx_rcc.h:118:41: error: 'RCC_CFGR_PLLMULL13' undeclared (first use in this function) #define RCC_PLLMul_13 RCC_CFGR_PLLMULL13 ^ ..\src\stm32f0xx_rcc.h:127:68: note: in expansion of macro 'RCC_PLLMul_13' ((MUL) == RCC_PLLMul_12) || ((MUL) == RCC_PLLMul_13) || \ ^~~~~~~~~~~~~ ..\src\stm32f0xx_rcc.c:493:16: note: in expansion of macro 'IS_RCC_PLL_MUL' assert_param(IS_RCC_PLL_MUL(RCC_PLLMul)); ^~~~~~~~~~~~~~ ..\src\stm32f0xx_rcc.h:119:41: error: 'RCC_CFGR_PLLMULL14' undeclared (first use in this function) #define RCC_PLLMul_14 RCC_CFGR_PLLMULL14 ^ ..\src\stm32f0xx_rcc.h:128:40: note: in expansion of macro 'RCC_PLLMul_14' ((MUL) == RCC_PLLMul_14) || ((MUL) == RCC_PLLMul_15) || \ ^~~~~~~~~~~~~ ..\src\stm32f0xx_rcc.c:493:16: note: in expansion of macro 'IS_RCC_PLL_MUL' assert_param(IS_RCC_PLL_MUL(RCC_PLLMul)); ^~~~~~~~~~~~~~ ..\src\stm32f0xx_rcc.h:120:41: error: 'RCC_CFGR_PLLMULL15' undeclared (first use in this function) #define RCC_PLLMul_15 RCC_CFGR_PLLMULL15 ^ ..\src\stm32f0xx_rcc.h:128:68: note: in expansion of macro 'RCC_PLLMul_15' ((MUL) == RCC_PLLMul_14) || ((MUL) == RCC_PLLMul_15) || \ ^~~~~~~~~~~~~ ..\src\stm32f0xx_rcc.c:493:16: note: in expansion of macro 'IS_RCC_PLL_MUL' assert_param(IS_RCC_PLL_MUL(RCC_PLLMul)); ^~~~~~~~~~~~~~ ..\src\stm32f0xx_rcc.h:121:41: error: 'RCC_CFGR_PLLMULL16' undeclared (first use in this function) #define RCC_PLLMul_16 RCC_CFGR_PLLMULL16 ^ ..\src\stm32f0xx_rcc.h:129:40: note: in expansion of macro 'RCC_PLLMul_16' ((MUL) == RCC_PLLMul_16)) ^~~~~~~~~~~~~ ..\src\stm32f0xx_rcc.c:493:16: note: in expansion of macro 'IS_RCC_PLL_MUL' assert_param(IS_RCC_PLL_MUL(RCC_PLLMul)); ^~~~~~~~~~~~~~ ..\src\stm32f0xx_rcc.c:496:18: error: 'RCC_CFGR_PLLMULL' undeclared (first use in this function) RCC->CFGR &= ~(RCC_CFGR_PLLMULL | RCC_CFGR_PLLSRC); ^~~~~~~~~~~~~~~~ ..\src\stm32f0xx_rcc.c: In function 'RCC_HSI48Cmd': ..\src\stm32f0xx_rcc.c:546:17: error: 'RCC_CR2_HSI48ON' undeclared (first use in this function) RCC->CR2 |= RCC_CR2_HSI48ON; ^~~~~~~~~~~~~~~ In file included from ..\src\stm32f0xx_rcc.c:59:0: ..\src\stm32f0xx_rcc.c: In function 'RCC_PREDIV1Config': ..\src\stm32f0xx_rcc.h:137:41: error: 'RCC_CFGR2_PREDIV1_DIV1' undeclared (first use in this function) #define RCC_PREDIV1_Div1 RCC_CFGR2_PREDIV1_DIV1 ^ ..\src\stm32f0xx_rcc.h:154:48: note: in expansion of macro 'RCC_PREDIV1_Div1' #define IS_RCC_PREDIV1(PREDIV1) (((PREDIV1) == RCC_PREDIV1_Div1) || ((PREDIV1) == RCC_PREDIV1_Div2) || \ ^~~~~~~~~~~~~~~~ ..\src\stm32f0xx_rcc.c:566:16: note: in expansion of macro 'IS_RCC_PREDIV1' assert_param(IS_RCC_PREDIV1(RCC_PREDIV1_Div)); ^~~~~~~~~~~~~~ ..\src\stm32f0xx_rcc.h:138:41: error: 'RCC_CFGR2_PREDIV1_DIV2' undeclared (first use in this function) #define RCC_PREDIV1_Div2 RCC_CFGR2_PREDIV1_DIV2 ^ ..\src\stm32f0xx_rcc.h:154:83: note: in expansion of macro 'RCC_PREDIV1_Div2' #define IS_RCC_PREDIV1(PREDIV1) (((PREDIV1) == RCC_PREDIV1_Div1) || ((PREDIV1) == RCC_PREDIV1_Div2) || \ ^~~~~~~~~~~~~~~~ ..\src\stm32f0xx_rcc.c:566:16: note: in expansion of macro 'IS_RCC_PREDIV1' assert_param(IS_RCC_PREDIV1(RCC_PREDIV1_Div)); ^~~~~~~~~~~~~~ ..\src\stm32f0xx_rcc.h:139:41: error: 'RCC_CFGR2_PREDIV1_DIV3' undeclared (first use in this function) #define RCC_PREDIV1_Div3 RCC_CFGR2_PREDIV1_DIV3 ^ ..\src\stm32f0xx_rcc.h:155:48: note: in expansion of macro 'RCC_PREDIV1_Div3' ((PREDIV1) == RCC_PREDIV1_Div3) || ((PREDIV1) == RCC_PREDIV1_Div4) || \ ^~~~~~~~~~~~~~~~ ..\src\stm32f0xx_rcc.c:566:16: note: in expansion of macro 'IS_RCC_PREDIV1' assert_param(IS_RCC_PREDIV1(RCC_PREDIV1_Div)); ^~~~~~~~~~~~~~ ..\src\stm32f0xx_rcc.h:140:41: error: 'RCC_CFGR2_PREDIV1_DIV4' undeclared (first use in this function) #define RCC_PREDIV1_Div4 RCC_CFGR2_PREDIV1_DIV4 ^ ..\src\stm32f0xx_rcc.h:155:83: note: in expansion of macro 'RCC_PREDIV1_Div4' ((PREDIV1) == RCC_PREDIV1_Div3) || ((PREDIV1) == RCC_PREDIV1_Div4) || \ ^~~~~~~~~~~~~~~~ ..\src\stm32f0xx_rcc.c:566:16: note: in expansion of macro 'IS_RCC_PREDIV1' assert_param(IS_RCC_PREDIV1(RCC_PREDIV1_Div)); ^~~~~~~~~~~~~~ ..\src\stm32f0xx_rcc.h:141:41: error: 'RCC_CFGR2_PREDIV1_DIV5' undeclared (first use in this function) #define RCC_PREDIV1_Div5 RCC_CFGR2_PREDIV1_DIV5 ^ ..\src\stm32f0xx_rcc.h:156:48: note: in expansion of macro 'RCC_PREDIV1_Div5' ((PREDIV1) == RCC_PREDIV1_Div5) || ((PREDIV1) == RCC_PREDIV1_Div6) || \ ^~~~~~~~~~~~~~~~ ..\src\stm32f0xx_rcc.c:566:16: note: in expansion of macro 'IS_RCC_PREDIV1' assert_param(IS_RCC_PREDIV1(RCC_PREDIV1_Div)); ^~~~~~~~~~~~~~ ..\src\stm32f0xx_rcc.h:142:41: error: 'RCC_CFGR2_PREDIV1_DIV6' undeclared (first use in this function) #define RCC_PREDIV1_Div6 RCC_CFGR2_PREDIV1_DIV6 ^ ..\src\stm32f0xx_rcc.h:156:83: note: in expansion of macro 'RCC_PREDIV1_Div6' ((PREDIV1) == RCC_PREDIV1_Div5) || ((PREDIV1) == RCC_PREDIV1_Div6) || \ ^~~~~~~~~~~~~~~~ ..\src\stm32f0xx_rcc.c:566:16: note: in expansion of macro 'IS_RCC_PREDIV1' assert_param(IS_RCC_PREDIV1(RCC_PREDIV1_Div)); ^~~~~~~~~~~~~~ ..\src\stm32f0xx_rcc.h:143:41: error: 'RCC_CFGR2_PREDIV1_DIV7' undeclared (first use in this function) #define RCC_PREDIV1_Div7 RCC_CFGR2_PREDIV1_DIV7 ^ ..\src\stm32f0xx_rcc.h:157:48: note: in expansion of macro 'RCC_PREDIV1_Div7' ((PREDIV1) == RCC_PREDIV1_Div7) || ((PREDIV1) == RCC_PREDIV1_Div8) || \ ^~~~~~~~~~~~~~~~ ..\src\stm32f0xx_rcc.c:566:16: note: in expansion of macro 'IS_RCC_PREDIV1' assert_param(IS_RCC_PREDIV1(RCC_PREDIV1_Div)); ^~~~~~~~~~~~~~ ..\src\stm32f0xx_rcc.h:144:41: error: 'RCC_CFGR2_PREDIV1_DIV8' undeclared (first use in this function) #define RCC_PREDIV1_Div8 RCC_CFGR2_PREDIV1_DIV8 ^ ..\src\stm32f0xx_rcc.h:157:83: note: in expansion of macro 'RCC_PREDIV1_Div8' ((PREDIV1) == RCC_PREDIV1_Div7) || ((PREDIV1) == RCC_PREDIV1_Div8) || \ ^~~~~~~~~~~~~~~~ ..\src\stm32f0xx_rcc.c:566:16: note: in expansion of macro 'IS_RCC_PREDIV1' assert_param(IS_RCC_PREDIV1(RCC_PREDIV1_Div)); ^~~~~~~~~~~~~~ ..\src\stm32f0xx_rcc.h:145:41: error: 'RCC_CFGR2_PREDIV1_DIV9' undeclared (first use in this function) #define RCC_PREDIV1_Div9 RCC_CFGR2_PREDIV1_DIV9 ^ ..\src\stm32f0xx_rcc.h:158:48: note: in expansion of macro 'RCC_PREDIV1_Div9' ((PREDIV1) == RCC_PREDIV1_Div9) || ((PREDIV1) == RCC_PREDIV1_Div10) || \ ^~~~~~~~~~~~~~~~ ..\src\stm32f0xx_rcc.c:566:16: note: in expansion of macro 'IS_RCC_PREDIV1' assert_param(IS_RCC_PREDIV1(RCC_PREDIV1_Div)); ^~~~~~~~~~~~~~ ..\src\stm32f0xx_rcc.h:146:41: error: 'RCC_CFGR2_PREDIV1_DIV10' undeclared (first use in this function) #define RCC_PREDIV1_Div10 RCC_CFGR2_PREDIV1_DIV10 ^ ..\src\stm32f0xx_rcc.h:158:83: note: in expansion of macro 'RCC_PREDIV1_Div10' ((PREDIV1) == RCC_PREDIV1_Div9) || ((PREDIV1) == RCC_PREDIV1_Div10) || \ ^~~~~~~~~~~~~~~~~ ..\src\stm32f0xx_rcc.c:566:16: note: in expansion of macro 'IS_RCC_PREDIV1' assert_param(IS_RCC_PREDIV1(RCC_PREDIV1_Div)); ^~~~~~~~~~~~~~ ..\src\stm32f0xx_rcc.h:147:41: error: 'RCC_CFGR2_PREDIV1_DIV11' undeclared (first use in this function) #define RCC_PREDIV1_Div11 RCC_CFGR2_PREDIV1_DIV11 ^ ..\src\stm32f0xx_rcc.h:159:48: note: in expansion of macro 'RCC_PREDIV1_Div11' ((PREDIV1) == RCC_PREDIV1_Div11) || ((PREDIV1) == RCC_PREDIV1_Div12) || \ ^~~~~~~~~~~~~~~~~ ..\src\stm32f0xx_rcc.c:566:16: note: in expansion of macro 'IS_RCC_PREDIV1' assert_param(IS_RCC_PREDIV1(RCC_PREDIV1_Div)); ^~~~~~~~~~~~~~ ..\src\stm32f0xx_rcc.h:148:41: error: 'RCC_CFGR2_PREDIV1_DIV12' undeclared (first use in this function) #define RCC_PREDIV1_Div12 RCC_CFGR2_PREDIV1_DIV12 ^ ..\src\stm32f0xx_rcc.h:159:84: note: in expansion of macro 'RCC_PREDIV1_Div12' ((PREDIV1) == RCC_PREDIV1_Div11) || ((PREDIV1) == RCC_PREDIV1_Div12) || \ ^~~~~~~~~~~~~~~~~ ..\src\stm32f0xx_rcc.c:566:16: note: in expansion of macro 'IS_RCC_PREDIV1' assert_param(IS_RCC_PREDIV1(RCC_PREDIV1_Div)); ^~~~~~~~~~~~~~ ..\src\stm32f0xx_rcc.h:149:41: error: 'RCC_CFGR2_PREDIV1_DIV13' undeclared (first use in this function) #define RCC_PREDIV1_Div13 RCC_CFGR2_PREDIV1_DIV13 ^ ..\src\stm32f0xx_rcc.h:160:48: note: in expansion of macro 'RCC_PREDIV1_Div13' ((PREDIV1) == RCC_PREDIV1_Div13) || ((PREDIV1) == RCC_PREDIV1_Div14) || \ ^~~~~~~~~~~~~~~~~ ..\src\stm32f0xx_rcc.c:566:16: note: in expansion of macro 'IS_RCC_PREDIV1' assert_param(IS_RCC_PREDIV1(RCC_PREDIV1_Div)); ^~~~~~~~~~~~~~ ..\src\stm32f0xx_rcc.h:150:41: error: 'RCC_CFGR2_PREDIV1_DIV14' undeclared (first use in this function) #define RCC_PREDIV1_Div14 RCC_CFGR2_PREDIV1_DIV14 ^ ..\src\stm32f0xx_rcc.h:160:84: note: in expansion of macro 'RCC_PREDIV1_Div14' ((PREDIV1) == RCC_PREDIV1_Div13) || ((PREDIV1) == RCC_PREDIV1_Div14) || \ ^~~~~~~~~~~~~~~~~ ..\src\stm32f0xx_rcc.c:566:16: note: in expansion of macro 'IS_RCC_PREDIV1' assert_param(IS_RCC_PREDIV1(RCC_PREDIV1_Div)); ^~~~~~~~~~~~~~ ..\src\stm32f0xx_rcc.h:151:41: error: 'RCC_CFGR2_PREDIV1_DIV15' undeclared (first use in this function) #define RCC_PREDIV1_Div15 RCC_CFGR2_PREDIV1_DIV15 ^ ..\src\stm32f0xx_rcc.h:161:48: note: in expansion of macro 'RCC_PREDIV1_Div15' ((PREDIV1) == RCC_PREDIV1_Div15) || ((PREDIV1) == RCC_PREDIV1_Div16)) ^~~~~~~~~~~~~~~~~ ..\src\stm32f0xx_rcc.c:566:16: note: in expansion of macro 'IS_RCC_PREDIV1' assert_param(IS_RCC_PREDIV1(RCC_PREDIV1_Div)); ^~~~~~~~~~~~~~ ..\src\stm32f0xx_rcc.h:152:41: error: 'RCC_CFGR2_PREDIV1_DIV16' undeclared (first use in this function) #define RCC_PREDIV1_Div16 RCC_CFGR2_PREDIV1_DIV16 ^ ..\src\stm32f0xx_rcc.h:161:84: note: in expansion of macro 'RCC_PREDIV1_Div16' ((PREDIV1) == RCC_PREDIV1_Div15) || ((PREDIV1) == RCC_PREDIV1_Div16)) ^~~~~~~~~~~~~~~~~ ..\src\stm32f0xx_rcc.c:566:16: note: in expansion of macro 'IS_RCC_PREDIV1' assert_param(IS_RCC_PREDIV1(RCC_PREDIV1_Div)); ^~~~~~~~~~~~~~ ..\src\stm32f0xx_rcc.c:570:15: error: 'RCC_CFGR2_PREDIV1' undeclared (first use in this function) tmpreg &= ~(RCC_CFGR2_PREDIV1); ^~~~~~~~~~~~~~~~~ In file included from ..\src\stm32f0xx_rcc.c:59:0: ..\src\stm32f0xx_rcc.c: In function 'RCC_MCOConfig': ..\src\stm32f0xx_rcc.h:486:39: error: 'RCC_CFGR_MCO_PRE_1' undeclared (first use in this function) #define RCC_MCOPrescaler_1 RCC_CFGR_MCO_PRE_1 ^ ..\src\stm32f0xx_rcc.h:495:58: note: in expansion of macro 'RCC_MCOPrescaler_1' #define IS_RCC_MCO_PRESCALER(PRESCALER) (((PRESCALER) == RCC_MCOPrescaler_1) || \ ^~~~~~~~~~~~~~~~~~ ..\src\stm32f0xx_rcc.c:663:16: note: in expansion of macro 'IS_RCC_MCO_PRESCALER' assert_param(IS_RCC_MCO_PRESCALER(RCC_MCOPrescaler)); ^~~~~~~~~~~~~~~~~~~~ ..\src\stm32f0xx_rcc.h:487:39: error: 'RCC_CFGR_MCO_PRE_2' undeclared (first use in this function) #define RCC_MCOPrescaler_2 RCC_CFGR_MCO_PRE_2 ^ ..\src\stm32f0xx_rcc.h:496:58: note: in expansion of macro 'RCC_MCOPrescaler_2' ((PRESCALER) == RCC_MCOPrescaler_2) || \ ^~~~~~~~~~~~~~~~~~ ..\src\stm32f0xx_rcc.c:663:16: note: in expansion of macro 'IS_RCC_MCO_PRESCALER' assert_param(IS_RCC_MCO_PRESCALER(RCC_MCOPrescaler)); ^~~~~~~~~~~~~~~~~~~~ ..\src\stm32f0xx_rcc.h:488:39: error: 'RCC_CFGR_MCO_PRE_4' undeclared (first use in this function) #define RCC_MCOPrescaler_4 RCC_CFGR_MCO_PRE_4 ^ ..\src\stm32f0xx_rcc.h:497:58: note: in expansion of macro 'RCC_MCOPrescaler_4' ((PRESCALER) == RCC_MCOPrescaler_4) || \ ^~~~~~~~~~~~~~~~~~ ..\src\stm32f0xx_rcc.c:663:16: note: in expansion of macro 'IS_RCC_MCO_PRESCALER' assert_param(IS_RCC_MCO_PRESCALER(RCC_MCOPrescaler)); ^~~~~~~~~~~~~~~~~~~~ ..\src\stm32f0xx_rcc.h:489:39: error: 'RCC_CFGR_MCO_PRE_8' undeclared (first use in this function) #define RCC_MCOPrescaler_8 RCC_CFGR_MCO_PRE_8 ^ ..\src\stm32f0xx_rcc.h:498:58: note: in expansion of macro 'RCC_MCOPrescaler_8' ((PRESCALER) == RCC_MCOPrescaler_8) || \ ^~~~~~~~~~~~~~~~~~ ..\src\stm32f0xx_rcc.c:663:16: note: in expansion of macro 'IS_RCC_MCO_PRESCALER' assert_param(IS_RCC_MCO_PRESCALER(RCC_MCOPrescaler)); ^~~~~~~~~~~~~~~~~~~~ ..\src\stm32f0xx_rcc.h:490:39: error: 'RCC_CFGR_MCO_PRE_16' undeclared (first use in this function) #define RCC_MCOPrescaler_16 RCC_CFGR_MCO_PRE_16 ^ ..\src\stm32f0xx_rcc.h:499:58: note: in expansion of macro 'RCC_MCOPrescaler_16' ((PRESCALER) == RCC_MCOPrescaler_16) || \ ^~~~~~~~~~~~~~~~~~~ ..\src\stm32f0xx_rcc.c:663:16: note: in expansion of macro 'IS_RCC_MCO_PRESCALER' assert_param(IS_RCC_MCO_PRESCALER(RCC_MCOPrescaler)); ^~~~~~~~~~~~~~~~~~~~ ..\src\stm32f0xx_rcc.h:491:39: error: 'RCC_CFGR_MCO_PRE_32' undeclared (first use in this function) #define RCC_MCOPrescaler_32 RCC_CFGR_MCO_PRE_32 ^ ..\src\stm32f0xx_rcc.h:500:58: note: in expansion of macro 'RCC_MCOPrescaler_32' ((PRESCALER) == RCC_MCOPrescaler_32) || \ ^~~~~~~~~~~~~~~~~~~ ..\src\stm32f0xx_rcc.c:663:16: note: in expansion of macro 'IS_RCC_MCO_PRESCALER' assert_param(IS_RCC_MCO_PRESCALER(RCC_MCOPrescaler)); ^~~~~~~~~~~~~~~~~~~~ ..\src\stm32f0xx_rcc.h:492:39: error: 'RCC_CFGR_MCO_PRE_64' undeclared (first use in this function) #define RCC_MCOPrescaler_64 RCC_CFGR_MCO_PRE_64 ^ ..\src\stm32f0xx_rcc.h:501:58: note: in expansion of macro 'RCC_MCOPrescaler_64' ((PRESCALER) == RCC_MCOPrescaler_64) || \ ^~~~~~~~~~~~~~~~~~~ ..\src\stm32f0xx_rcc.c:663:16: note: in expansion of macro 'IS_RCC_MCO_PRESCALER' assert_param(IS_RCC_MCO_PRESCALER(RCC_MCOPrescaler)); ^~~~~~~~~~~~~~~~~~~~ ..\src\stm32f0xx_rcc.h:493:39: error: 'RCC_CFGR_MCO_PRE_128' undeclared (first use in this function) #define RCC_MCOPrescaler_128 RCC_CFGR_MCO_PRE_128 ^ ..\src\stm32f0xx_rcc.h:502:58: note: in expansion of macro 'RCC_MCOPrescaler_128' ((PRESCALER) == RCC_MCOPrescaler_128)) ^~~~~~~~~~~~~~~~~~~~ ..\src\stm32f0xx_rcc.c:663:16: note: in expansion of macro 'IS_RCC_MCO_PRESCALER' assert_param(IS_RCC_MCO_PRESCALER(RCC_MCOPrescaler)); ^~~~~~~~~~~~~~~~~~~~ ..\src\stm32f0xx_rcc.c:668:15: error: 'RCC_CFGR_MCO_PRE' undeclared (first use in this function) tmpreg &= ~(RCC_CFGR_MCO_PRE | RCC_CFGR_MCO | RCC_CFGR_PLLNODIV); ^~~~~~~~~~~~~~~~ In file included from ..\src\stm32f0xx_rcc.c:59:0: ..\src\stm32f0xx_rcc.c: In function 'RCC_SYSCLKConfig': ..\src\stm32f0xx_rcc.h:173:42: error: 'RCC_CFGR_SW_HSI48' undeclared (first use in this function) #define RCC_SYSCLKSource_HSI48 RCC_CFGR_SW_HSI48 /*!< Only applicable for STM32F072 devices */ ^ ..\src\stm32f0xx_rcc.h:177:52: note: in expansion of macro 'RCC_SYSCLKSource_HSI48' ((SOURCE) == RCC_SYSCLKSource_HSI48) || \ ^~~~~~~~~~~~~~~~~~~~~~ ..\src\stm32f0xx_rcc.c:778:16: note: in expansion of macro 'IS_RCC_SYSCLK_SOURCE' assert_param(IS_RCC_SYSCLK_SOURCE(RCC_SYSCLKSource)); ^~~~~~~~~~~~~~~~~~~~ ..\src\stm32f0xx_rcc.c: In function 'RCC_ADCCLKConfig': ..\src\stm32f0xx_rcc.c:896:18: error: 'RCC_CFGR3_ADCSW' undeclared (first use in this function) RCC->CFGR3 &= ~RCC_CFGR3_ADCSW; ^~~~~~~~~~~~~~~ In file included from ..\src\stm32f0xx_rcc.c:59:0: ..\src\stm32f0xx_rcc.c: In function 'RCC_CECCLKConfig': ..\src\stm32f0xx_rcc.h:242:42: error: 'RCC_CFGR3_CECSW' undeclared (first use in this function) #define RCC_CECCLK_LSE RCC_CFGR3_CECSW ^ ..\src\stm32f0xx_rcc.h:244:84: note: in expansion of macro 'RCC_CECCLK_LSE' #define IS_RCC_CECCLK(CECCLK) (((CECCLK) == RCC_CECCLK_HSI_Div244) || ((CECCLK) == RCC_CECCLK_LSE)) ^~~~~~~~~~~~~~ ..\src\stm32f0xx_rcc.c:913:16: note: in expansion of macro 'IS_RCC_CECCLK' assert_param(IS_RCC_CECCLK(RCC_CECCLK)); ^~~~~~~~~~~~~ ..\src\stm32f0xx_rcc.c: In function 'RCC_USARTCLKConfig': ..\src\stm32f0xx_rcc.c:979:20: error: 'RCC_CFGR3_USART2SW' undeclared (first use in this function) RCC->CFGR3 &= ~RCC_CFGR3_USART2SW; ^~~~~~~~~~~~~~~~~~ ..\src\stm32f0xx_rcc.c:984:20: error: 'RCC_CFGR3_USART3SW' undeclared (first use in this function) RCC->CFGR3 &= ~RCC_CFGR3_USART3SW; ^~~~~~~~~~~~~~~~~~ In file included from ..\src\stm32f0xx_rcc.c:59:0: ..\src\stm32f0xx_rcc.c: In function 'RCC_USBCLKConfig': ..\src\stm32f0xx_rcc.h:269:42: error: 'RCC_CFGR3_USBSW' undeclared (first use in this function) #define RCC_USBCLK_PLLCLK RCC_CFGR3_USBSW ^ ..\src\stm32f0xx_rcc.h:271:79: note: in expansion of macro 'RCC_USBCLK_PLLCLK' #define IS_RCC_USBCLK(USBCLK) (((USBCLK) == RCC_USBCLK_HSI48) || ((USBCLK) == RCC_USBCLK_PLLCLK)) ^~~~~~~~~~~~~~~~~ ..\src\stm32f0xx_rcc.c:1004:16: note: in expansion of macro 'IS_RCC_USBCLK' assert_param(IS_RCC_USBCLK(RCC_USBCLK)); ^~~~~~~~~~~~~ ..\src\stm32f0xx_rcc.c: In function 'RCC_GetClocksFreq': ..\src\stm32f0xx_rcc.c:1064:38: error: 'HSI_VALUE' undeclared (first use in this function) RCC_Clocks->SYSCLK_Frequency = HSI_VALUE; ^~~~~~~~~ ..\src\stm32f0xx_rcc.c:1067:38: error: 'HSE_VALUE' undeclared (first use in this function) RCC_Clocks->SYSCLK_Frequency = HSE_VALUE; ^~~~~~~~~ ..\src\stm32f0xx_rcc.c:1071:29: error: 'RCC_CFGR_PLLMULL' undeclared (first use in this function) pllmull = RCC->CFGR & RCC_CFGR_PLLMULL; ^~~~~~~~~~~~~~~~ ..\src\stm32f0xx_rcc.c:1082:39: error: 'RCC_CFGR2_PREDIV1' undeclared (first use in this function) prediv1factor = (RCC->CFGR2 & RCC_CFGR2_PREDIV1) + 1; ^~~~~~~~~~~~~~~~~ ..\src\stm32f0xx_rcc.c:1111:20: error: 'RCC_CFGR3_ADCSW' undeclared (first use in this function) if((RCC->CFGR3 & RCC_CFGR3_ADCSW) != RCC_CFGR3_ADCSW) ^~~~~~~~~~~~~~~ ..\src\stm32f0xx_rcc.c:1114:36: error: 'HSI14_VALUE' undeclared (first use in this function) RCC_Clocks->ADCCLK_Frequency = HSI14_VALUE; ^~~~~~~~~~~ ..\src\stm32f0xx_rcc.c:1132:20: error: 'RCC_CFGR3_CECSW' undeclared (first use in this function) if((RCC->CFGR3 & RCC_CFGR3_CECSW) != RCC_CFGR3_CECSW) ^~~~~~~~~~~~~~~ ..\src\stm32f0xx_rcc.c:1140:36: error: 'LSE_VALUE' undeclared (first use in this function) RCC_Clocks->CECCLK_Frequency = LSE_VALUE; ^~~~~~~~~ ..\src\stm32f0xx_rcc.c:1178:20: error: 'RCC_CFGR3_USART2SW' undeclared (first use in this function) if((RCC->CFGR3 & RCC_CFGR3_USART2SW) == 0x0) ^~~~~~~~~~~~~~~~~~ ..\src\stm32f0xx_rcc.c:1183:48: error: 'RCC_CFGR3_USART2SW_0' undeclared (first use in this function) else if((RCC->CFGR3 & RCC_CFGR3_USART2SW) == RCC_CFGR3_USART2SW_0) ^~~~~~~~~~~~~~~~~~~~ ..\src\stm32f0xx_rcc.c:1188:48: error: 'RCC_CFGR3_USART2SW_1' undeclared (first use in this function) else if((RCC->CFGR3 & RCC_CFGR3_USART2SW) == RCC_CFGR3_USART2SW_1) ^~~~~~~~~~~~~~~~~~~~ ..\src\stm32f0xx_rcc.c:1200:20: error: 'RCC_CFGR3_USART3SW' undeclared (first use in this function) if((RCC->CFGR3 & RCC_CFGR3_USART3SW) == 0x0) ^~~~~~~~~~~~~~~~~~ ..\src\stm32f0xx_rcc.c:1205:48: error: 'RCC_CFGR3_USART3SW_0' undeclared (first use in this function) else if((RCC->CFGR3 & RCC_CFGR3_USART3SW) == RCC_CFGR3_USART3SW_0) ^~~~~~~~~~~~~~~~~~~~ ..\src\stm32f0xx_rcc.c:1210:48: error: 'RCC_CFGR3_USART3SW_1' undeclared (first use in this function) else if((RCC->CFGR3 & RCC_CFGR3_USART3SW) == RCC_CFGR3_USART3SW_1) ^~~~~~~~~~~~~~~~~~~~ ..\src\stm32f0xx_rcc.c:1222:20: error: 'RCC_CFGR3_USBSW' undeclared (first use in this function) if((RCC->CFGR3 & RCC_CFGR3_USBSW) != RCC_CFGR3_USBSW) ^~~~~~~~~~~~~~~ 15:25:52 Build Finished (took 1s.202ms)
Datum:
|
Es kann doch auch nicht Sinn der Sache sein, sich alle Abhängigkeiten stundenlang zusammen zu suchen. Das muss doch einfacher gehen. komischerweise gibt es bei einem Projekt mit einem STM32F4 keinerlei Probleme...
Datum:
|
Ingo L. schrieb: > Das hilft nicht, dann kommt das: Füge die Dateien stm32f0xx.h stm32f0xx_conf.h zum Projekt-Tree hinzu. Ingo L. schrieb: > Es kann doch auch nicht Sinn der Sache sein, sich alle Abhängigkeiten > stundenlang zusammen zu suchen. Das muss doch einfacher gehen. Mit einer "anständigen" IDE geht das auch einfacher. Zum Beispiel EmBitz.
Datum:
|
Bin jetzt auch auf EmBitz umgestiegen und begeistert. Wenn man noch den ST-LINK-CLI als Postbuildprozess einbindet wird sogar gleich danach geflashed. Cool