Skip to content

Commit 63df3b5

Browse files
committed
pipxtreme: Updated chconf.h and mcuconf.h, resolve variable conflict between cmsis_system.c and HAL.
1 parent 1de24c5 commit 63df3b5

3 files changed

Lines changed: 229 additions & 223 deletions

File tree

flight/targets/pipxtreme/board-info/cmsis_system.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,7 @@
6767
*/
6868

6969
#include "stm32f10x.h"
70+
#include "pios_config.h"
7071

7172
/**
7273
* @}
@@ -152,6 +153,10 @@
152153
/*******************************************************************************
153154
* Clock Definitions
154155
*******************************************************************************/
156+
#if defined(PIOS_INCLUDE_CHIBIOS)
157+
/* ChibiOS supplies and inits this via HAL. */
158+
extern uint32_t SystemCoreClock;
159+
#else
155160
#ifdef SYSCLK_FREQ_HSE
156161
uint32_t SystemCoreClock = SYSCLK_FREQ_HSE; /*!< System Clock Frequency (Core Clock) */
157162
#elif defined SYSCLK_FREQ_24MHz
@@ -167,6 +172,7 @@
167172
#else /*!< HSI Selected as System Clock source */
168173
uint32_t SystemCoreClock = HSI_VALUE; /*!< System Clock Frequency (Core Clock) */
169174
#endif
175+
#endif // defined(PIOS_INCLUDE_CHIBIOS)
170176

171177
__I uint8_t AHBPrescTable[16] = {0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 3, 4, 6, 7, 8, 9};
172178
/**

0 commit comments

Comments
 (0)