Skip to content

Commit

Permalink
Removed PSoC6 SystemInit Workaround for ARM compiler
Browse files Browse the repository at this point in the history
  • Loading branch information
Oleg Kapshii authored and cy-opm committed Mar 13, 2019
1 parent 401a3c8 commit 2af3a82
Show file tree
Hide file tree
Showing 5 changed files with 4 additions and 29 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -193,13 +193,6 @@ void mailbox_init(void);
*******************************************************************************/
void SystemInit(void)
{
/* Workaround to avoid twice SystemInit() call when ARMC5 compiler is used */
static uint32_t temp_var = 0;

if (temp_var == 0)
{
temp_var = 1;

Cy_PDL_Init(CY_DEVICE_CFG);

/* Restore FLL registers to the default state as they are not restored by the ROM code */
Expand Down Expand Up @@ -299,8 +292,6 @@ void SystemInit(void)
#else/* !defined(CY_IPC_DEFAULT_CFG_DISABLE) */
Cy_SemaIpcFlashInit();
#endif /* !defined(CY_IPC_DEFAULT_CFG_DISABLE) */

}
}


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -539,11 +539,7 @@ extern "C" {
* \addtogroup group_system_config_system_functions
* \{
*/
#if defined(__ARMCC_VERSION)
extern void SystemInit(void) __attribute__((constructor));
#else
extern void SystemInit(void);
#endif /* (__ARMCC_VERSION) */
extern void SystemInit(void);

extern void SystemCoreClockUpdate(void);
/** \} group_system_config_system_functions */
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -539,11 +539,7 @@ extern "C" {
* \addtogroup group_system_config_system_functions
* \{
*/
#if defined(__ARMCC_VERSION)
extern void SystemInit(void) __attribute__((constructor));
#else
extern void SystemInit(void);
#endif /* (__ARMCC_VERSION) */
extern void SystemInit(void);

extern void SystemCoreClockUpdate(void);
/** \} group_system_config_system_functions */
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -539,11 +539,7 @@ extern "C" {
* \addtogroup group_system_config_system_functions
* \{
*/
#if defined(__ARMCC_VERSION)
extern void SystemInit(void) __attribute__((constructor));
#else
extern void SystemInit(void);
#endif /* (__ARMCC_VERSION) */
extern void SystemInit(void);

extern void SystemCoreClockUpdate(void);
/** \} group_system_config_system_functions */
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -539,11 +539,7 @@ extern "C" {
* \addtogroup group_system_config_system_functions
* \{
*/
#if defined(__ARMCC_VERSION)
extern void SystemInit(void) __attribute__((constructor));
#else
extern void SystemInit(void);
#endif /* (__ARMCC_VERSION) */
extern void SystemInit(void);

extern void SystemCoreClockUpdate(void);
/** \} group_system_config_system_functions */
Expand Down

0 comments on commit 2af3a82

Please sign in to comment.