Skip to content

Commit 2af3a82

Browse files
Oleg Kapshiicy-opm
authored andcommitted
Removed PSoC6 SystemInit Workaround for ARM compiler
1 parent 401a3c8 commit 2af3a82

File tree

5 files changed

+4
-29
lines changed

5 files changed

+4
-29
lines changed

targets/TARGET_Cypress/TARGET_PSOC6/TARGET_CY8C62XX/TARGET_MCU_PSOC6_M0/system_psoc6_cm0plus.c

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -193,13 +193,6 @@ void mailbox_init(void);
193193
*******************************************************************************/
194194
void SystemInit(void)
195195
{
196-
/* Workaround to avoid twice SystemInit() call when ARMC5 compiler is used */
197-
static uint32_t temp_var = 0;
198-
199-
if (temp_var == 0)
200-
{
201-
temp_var = 1;
202-
203196
Cy_PDL_Init(CY_DEVICE_CFG);
204197

205198
/* Restore FLL registers to the default state as they are not restored by the ROM code */
@@ -299,8 +292,6 @@ void SystemInit(void)
299292
#else/* !defined(CY_IPC_DEFAULT_CFG_DISABLE) */
300293
Cy_SemaIpcFlashInit();
301294
#endif /* !defined(CY_IPC_DEFAULT_CFG_DISABLE) */
302-
303-
}
304295
}
305296

306297

targets/TARGET_Cypress/TARGET_PSOC6/TARGET_CY8C62XX/device/system_psoc6.h

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -539,11 +539,7 @@ extern "C" {
539539
* \addtogroup group_system_config_system_functions
540540
* \{
541541
*/
542-
#if defined(__ARMCC_VERSION)
543-
extern void SystemInit(void) __attribute__((constructor));
544-
#else
545-
extern void SystemInit(void);
546-
#endif /* (__ARMCC_VERSION) */
542+
extern void SystemInit(void);
547543

548544
extern void SystemCoreClockUpdate(void);
549545
/** \} group_system_config_system_functions */

targets/TARGET_Cypress/TARGET_PSOC6/TARGET_CY8CKIT_062_4343W/device/system_psoc6.h

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -539,11 +539,7 @@ extern "C" {
539539
* \addtogroup group_system_config_system_functions
540540
* \{
541541
*/
542-
#if defined(__ARMCC_VERSION)
543-
extern void SystemInit(void) __attribute__((constructor));
544-
#else
545-
extern void SystemInit(void);
546-
#endif /* (__ARMCC_VERSION) */
542+
extern void SystemInit(void);
547543

548544
extern void SystemCoreClockUpdate(void);
549545
/** \} group_system_config_system_functions */

targets/TARGET_Cypress/TARGET_PSOC6/TARGET_CY8CKIT_062_BLE/device/system_psoc6.h

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -539,11 +539,7 @@ extern "C" {
539539
* \addtogroup group_system_config_system_functions
540540
* \{
541541
*/
542-
#if defined(__ARMCC_VERSION)
543-
extern void SystemInit(void) __attribute__((constructor));
544-
#else
545-
extern void SystemInit(void);
546-
#endif /* (__ARMCC_VERSION) */
542+
extern void SystemInit(void);
547543

548544
extern void SystemCoreClockUpdate(void);
549545
/** \} group_system_config_system_functions */

targets/TARGET_Cypress/TARGET_PSOC6/TARGET_CY8CMOD_062_4343W/device/system_psoc6.h

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -539,11 +539,7 @@ extern "C" {
539539
* \addtogroup group_system_config_system_functions
540540
* \{
541541
*/
542-
#if defined(__ARMCC_VERSION)
543-
extern void SystemInit(void) __attribute__((constructor));
544-
#else
545-
extern void SystemInit(void);
546-
#endif /* (__ARMCC_VERSION) */
542+
extern void SystemInit(void);
547543

548544
extern void SystemCoreClockUpdate(void);
549545
/** \} group_system_config_system_functions */

0 commit comments

Comments
 (0)