瀏覽代碼

Don't use naked attribute on startup code

main
PaulStoffregen 4 年之前
父節點
當前提交
a2246a5a02
共有 1 個檔案被更改,包括 1 行新增3 行删除
  1. +1
    -3
      teensy4/startup.c

+ 1
- 3
teensy4/startup.c 查看文件

@@ -43,7 +43,7 @@ void startup_default_early_hook(void) {}
void startup_early_hook(void) __attribute__ ((weak, alias("startup_default_early_hook")));
void startup_default_late_hook(void) {}
void startup_late_hook(void) __attribute__ ((weak, alias("startup_default_late_hook")));
__attribute__((section(".startup"), optimize("no-tree-loop-distribute-patterns"), naked))
__attribute__((section(".startup"), optimize("no-tree-loop-distribute-patterns")))
void ResetHandler(void)
{
unsigned int i;
@@ -105,8 +105,6 @@ void ResetHandler(void)
set_arm_clock(F_CPU);
#endif

asm volatile("nop\n nop\n nop\n nop": : :"memory"); // why oh why?

// Undo PIT timer usage by ROM startup
CCM_CCGR1 |= CCM_CCGR1_PIT(CCM_CCGR_ON);
PIT_MCR = 0;

Loading…
取消
儲存