Hi. I tried current trunk and found problems with compile the project for STM32 MCU. The projects usesC++ KEIL compiler, CH_CFG_ST_TIMEDELTA = 2, STM32_ST_USE_TIMER = 2:
..\lib\ChibiOS\os\hal\include\hal_st.h(71): error: #337: linkage specification is incompatible with previous "stStartAlarm" (declared at line 69 of "..\lib\ChibiOS\os\common\ports\ARMCMx\chcore_timer.h") void stStartAlarm(systime_t abstime); ..\lib\ChibiOS\os\hal\include\hal_st.h(72): error: #337: linkage specification is incompatible with previous "stStopAlarm" (declared at line 80 of "..\lib\ChibiOS\os\common\ports\ARMCMx\chcore_timer.h") void stStopAlarm(void); ..\lib\ChibiOS\os\hal\include\hal_st.h(73): error: #337: linkage specification is incompatible with previous "stSetAlarm" (declared at line 93 of "..\lib\ChibiOS\os\common\ports\ARMCMx\chcore_timer.h") void stSetAlarm(systime_t abstime); ..\lib\ChibiOS\os\hal\include\hal_st.h(74): error: #337: linkage specification is incompatible with previous "stGetAlarm" (declared at line 119 of "..\lib\ChibiOS\os\common\ports\ARMCMx\chcore_timer.h") systime_t stGetAlarm(void); ..\lib\ChibiOS\os\hal\include\hal_st.h(75): error: #337: linkage specification is incompatible with previous "stGetCounter" (declared at line 106 of "..\lib\ChibiOS\os\common\ports\ARMCMx\chcore_timer.h") systime_t stGetCounter(void);
Hi. Your changes not helped. The problem is in the file "chcore_timer.h" - static inline functions use stStartAlarm and others. This file must be linked with extern "C" also. I tried it and it works. But now I have another troubles:
Thanks alexblack this saved me a lot of time searching for the problem.
alexblack wrote:The problem is in the file "chcore_timer.h" - static inline functions use stStartAlarm and others. This file must be linked with extern "C" also. [/code]
Giovanni Looking forward to the update of the file.