prog.c: In function ‘clock_init’:
prog.c:3:2: error: ‘RCC’ undeclared (first use in this function)
RCC->CR |= RCC_CR_HSEON;
^~~
prog.c:3:2: note: each undeclared identifier is reported only once for each function it appears in
prog.c:3:13: error: ‘RCC_CR_HSEON’ undeclared (first use in this function)
RCC->CR |= RCC_CR_HSEON;
^~~~~~~~~~~~
prog.c:4:21: error: ‘RCC_CR_HSERDY’ undeclared (first use in this function)
while( !(RCC->CR & RCC_CR_HSERDY) ){}
^~~~~~~~~~~~~
prog.c:6:2: error: ‘FLASH’ undeclared (first use in this function)
FLASH->ACR &= ~FLASH_ACR_LATENCY;
^~~~~
prog.c:6:17: error: ‘FLASH_ACR_LATENCY’ undeclared (first use in this function)
FLASH->ACR &= ~FLASH_ACR_LATENCY;
^~~~~~~~~~~~~~~~~
prog.c:7:16: error: ‘FLASH_ACR_LATENCY_0’ undeclared (first use in this function)
FLASH->ACR |= FLASH_ACR_LATENCY_0;
^~~~~~~~~~~~~~~~~~~
prog.c:8:16: error: ‘FLASH_ACR_PRFTBE’ undeclared (first use in this function)
FLASH->ACR |= FLASH_ACR_PRFTBE;
^~~~~~~~~~~~~~~~
prog.c:10:15: error: ‘RCC_CFGR_PLLSRC’ undeclared (first use in this function)
RCC->CFGR |= RCC_CFGR_PLLSRC;
^~~~~~~~~~~~~~~
prog.c:11:15: error: ‘RCC_CFGR_PLLMULL6’ undeclared (first use in this function)
RCC->CFGR |= RCC_CFGR_PLLMULL6;
^~~~~~~~~~~~~~~~~
prog.c:13:15: error: ‘RCC_CFGR_PPRE1_DIV2’ undeclared (first use in this function)
RCC->CFGR |= RCC_CFGR_PPRE1_DIV2;
^~~~~~~~~~~~~~~~~~~
prog.c:15:13: error: ‘RCC_CR_PLLON’ undeclared (first use in this function)
RCC->CR |= RCC_CR_PLLON;
^~~~~~~~~~~~
prog.c:16:21: error: ‘RCC_CR_PLLRDY’ undeclared (first use in this function)
while( !(RCC->CR & RCC_CR_PLLRDY) ){}
^~~~~~~~~~~~~
prog.c:18:15: error: ‘RCC_CFGR_SW_PLL’ undeclared (first use in this function)
RCC->CFGR |= RCC_CFGR_SW_PLL;
^~~~~~~~~~~~~~~
prog.c:19:23: error: ‘uint32_t’ undeclared (first use in this function)
while( (RCC->CFGR & (uint32_t)RCC_CFGR_SWS) != (uint32_t)0x08 ){}
^~~~~~~~
prog.c:19:32: error: expected ‘)’ before ‘RCC_CFGR_SWS’
while( (RCC->CFGR & (uint32_t)RCC_CFGR_SWS) != (uint32_t)0x08 ){}
~ ^~~~~~~~~~~~
)
prog.c:19:59: error: expected ‘)’ before numeric constant
while( (RCC->CFGR & (uint32_t)RCC_CFGR_SWS) != (uint32_t)0x08 ){}
~ ^~~~
)
prog.c:21:2: warning: implicit declaration of function ‘SystemCoreClockUpdate’ [-Wimplicit-function-declaration]
SystemCoreClockUpdate();
^~~~~~~~~~~~~~~~~~~~~
prog.c:23:5: warning: implicit declaration of function ‘SysTick_Config’ [-Wimplicit-function-declaration]
if(SysTick_Config(SystemCoreClock/1000))
^~~~~~~~~~~~~~
prog.c:23:20: error: ‘SystemCoreClock’ undeclared (first use in this function)
if(SysTick_Config(SystemCoreClock/1000))
^~~~~~~~~~~~~~~