@@ -362,14 +362,11 @@ void vPortStartFirstTask( void )
362362 spin_lock_claim ( configSMP_SPINLOCK_0 );
363363 spin_lock_claim ( configSMP_SPINLOCK_1 );
364364
365- #if configNUMBER_OF_CORES != 1
366- ucPrimaryCoreNum = configTICK_CORE ;
367- configASSERT ( get_core_num () == 0 ); /* we must be started on core 0 */
368- multicore_reset_core1 ();
369- multicore_launch_core1 ( prvDisableInterruptsAndPortStartSchedulerOnCore );
370- #else
371- ucPrimaryCoreNum = get_core_num ();
372- #endif
365+ ucPrimaryCoreNum = configTICK_CORE ;
366+ configASSERT ( get_core_num () == 0 ); /* we must be started on core 0 */
367+ multicore_reset_core1 ();
368+ multicore_launch_core1 ( prvDisableInterruptsAndPortStartSchedulerOnCore );
369+
373370 xPortStartSchedulerOnCore ();
374371
375372 /* Should not get here! */
@@ -611,13 +608,9 @@ void xPortPendSVHandler( void )
611608 " \n"
612609 " adr r0, ulAsmLocals2 \n" /* Get the location of the current TCB for the current core. */
613610 " ldmia r0!, {r2, r3} \n"
614- #if configNUMBER_OF_CORES != 1
615- " ldr r0, [r2] \n" /* r0 = Core number */
616- " lsls r0, r0, #2 \n"
617- " adds r3, r0 \n" /* r3 = &pxCurrentTCBs[get_core_num()] */
618- #else
619- " \n" /* r3 = &pxCurrentTCBs[0] */
620- #endif /* portRUNNING_ON_BOTH_CORES */
611+ " ldr r0, [r2] \n" /* r0 = Core number */
612+ " lsls r0, r0, #2 \n"
613+ " adds r3, r0 \n" /* r3 = &pxCurrentTCBs[get_core_num()] */
621614 " ldr r0, [r3] \n" /* r0 = pxCurrentTCB */
622615 " \n"
623616 " subs r1, r1, #32 \n" /* Make space for the remaining low registers. */
@@ -651,11 +644,7 @@ void xPortPendSVHandler( void )
651644 " subs r1, r1, #48 \n"
652645 " stmia r1!, {r4-r7} \n"
653646 #endif /* portUSE_DIVIDER_SAVE_RESTORE */
654- #if configNUMBER_OF_CORES != 1
655- " ldr r0, [r2] \n" /* r0 = Core number */
656- #else
657- " movs r0, #0 \n"
658- #endif /* configNUMBER_OF_CORES != 1 */
647+ " ldr r0, [r2] \n" /* r0 = Core number */
659648 " push {r3, r14} \n"
660649 " cpsid i \n"
661650 " bl vTaskSwitchContext \n"
0 commit comments