From 8032d6ee66dee5d9dfc08d5793a6424b76238fbe Mon Sep 17 00:00:00 2001 From: bsongis Date: Sat, 20 Sep 2014 13:01:50 +0200 Subject: [PATCH] Constructors called on static objects - I really need them now :) --- radio/src/strhelpers.cpp | 7 +++++++ .../Source/Templates/gcc_ride7/startup_stm32f2xx.s | 4 +++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/radio/src/strhelpers.cpp b/radio/src/strhelpers.cpp index 3eba7a617..ba518744e 100755 --- a/radio/src/strhelpers.cpp +++ b/radio/src/strhelpers.cpp @@ -36,8 +36,14 @@ #include "opentx.h" +#if !defined(BOOT) const pm_char s_charTab[] PROGMEM = "_-.,"; +char hex2zchar(uint8_t hex) +{ + return (hex >= 10 ? hex-9 : 27+hex); +} + char idx2char(int8_t idx) { if (idx == 0) return ' '; @@ -142,6 +148,7 @@ char * strcat_zchar(char * dest, char * name, uint8_t size, const char *defaultN return &dest[len]; } #endif +#endif #if defined(CPUARM) || defined(SDCARD) char * strAppend(char * dest, const char * source) diff --git a/radio/src/targets/taranis/STM32F2xx_StdPeriph_Lib_V1.1.0/Libraries/CMSIS/Device/ST/STM32F2xx/Source/Templates/gcc_ride7/startup_stm32f2xx.s b/radio/src/targets/taranis/STM32F2xx_StdPeriph_Lib_V1.1.0/Libraries/CMSIS/Device/ST/STM32F2xx/Source/Templates/gcc_ride7/startup_stm32f2xx.s index 65757dd85..cccf3f7a6 100644 --- a/radio/src/targets/taranis/STM32F2xx_StdPeriph_Lib_V1.1.0/Libraries/CMSIS/Device/ST/STM32F2xx/Source/Templates/gcc_ride7/startup_stm32f2xx.s +++ b/radio/src/targets/taranis/STM32F2xx_StdPeriph_Lib_V1.1.0/Libraries/CMSIS/Device/ST/STM32F2xx/Source/Templates/gcc_ride7/startup_stm32f2xx.s @@ -99,7 +99,9 @@ LoopFillZerobss: cmp r2, r3 bcc FillZerobss /* Call the clock system intitialization function.*/ - bl SystemInit + bl SystemInit +/* Call C++ constructors for static objects */ + bl __libc_init_array /* Call the application's entry point.*/ bl main bx lr