I'm using syslog through ITM. In this case syslog_channel function is call before ram initialisation in stm32_clockconfig. But syslog channel uses a global variable that is reset to default by the RAM initialization.

This commit is contained in:
Pierre-noel Bouteville 2016-07-14 07:28:38 -06:00 committed by Gregory Nutt
parent 72582b61d9
commit 76f12b1f69
4 changed files with 12 additions and 4 deletions

View File

@ -909,9 +909,6 @@ static inline void efm32_itm_syslog(void)
efm32_enable_auxhfrco();
/* Then perform ARMv7-M ITM SYSLOG initialization */
itm_syslog_initialize();
}
#else
# define efm32_itm_syslog()

View File

@ -275,6 +275,12 @@ void __start(void)
showprogress('C');
#ifdef CONFIG_ARMV7M_ITMSYSLOG
/* Perform ARMv7-M ITM SYSLOG initialization */
itm_syslog_initialize();
#endif
/* Perform early serial initialization */
up_earlyserialinit();

View File

@ -282,6 +282,12 @@ void __start(void)
showprogress('C');
#ifdef CONFIG_ARMV7M_ITMSYSLOG
/* Perform ARMv7-M ITM SYSLOG initialization */
itm_syslog_initialize();
#endif
/* Perform early serial initialization */
#ifdef USE_EARLYSERIALINIT

View File

@ -919,7 +919,6 @@ static inline void rcc_itm_syslog(void)
modifyreg32(STM32_DBGMCU_CR, DBGMCU_CR_TRACEMODE_MASK, DBGMCU_CR_ASYNCH |
DBGMCU_CR_TRACEIOEN);
itm_syslog_initialize();
}
#else
# define rcc_itm_syslog()