aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--platform/ext/target/mps2/an521/armclang/startup_cmsdk_mps2_an521_bl2.s9
1 files changed, 8 insertions, 1 deletions
diff --git a/platform/ext/target/mps2/an521/armclang/startup_cmsdk_mps2_an521_bl2.s b/platform/ext/target/mps2/an521/armclang/startup_cmsdk_mps2_an521_bl2.s
index 404f2a5d..615d608c 100644
--- a/platform/ext/target/mps2/an521/armclang/startup_cmsdk_mps2_an521_bl2.s
+++ b/platform/ext/target/mps2/an521/armclang/startup_cmsdk_mps2_an521_bl2.s
@@ -1,5 +1,5 @@
;/*
-; * Copyright (c) 2016-2018 ARM Limited
+; * Copyright (c) 2016-2019 ARM Limited
; *
; * Licensed under the Apache License, Version 2.0 (the "License");
; * you may not use this file except in compliance with the License.
@@ -162,6 +162,13 @@ Reset_Handler PROC
EXPORT Reset_Handler [WEAK]
IMPORT SystemInit
IMPORT __main
+ ; Only run on core 0
+ MOV r0, #0x50000000
+ ADD r0, #0x0001F000
+ LDR r0, [r0]
+ CMP r0,#0
+not_the_core_to_run_on
+ BNE not_the_core_to_run_on
LDR R0, =SystemInit
BLX R0
LDR R0, =__main