mirror of
https://github.com/eclipse-threadx/threadx.git
synced 2025-11-16 12:34:48 +00:00
99 lines
5.7 KiB
ArmAsm
99 lines
5.7 KiB
ArmAsm
;/**************************************************************************/
|
|
;/* */
|
|
;/* Copyright (c) Microsoft Corporation. All rights reserved. */
|
|
;/* */
|
|
;/* This software is licensed under the Microsoft Software License */
|
|
;/* Terms for Microsoft Azure RTOS. Full text of the license can be */
|
|
;/* found in the LICENSE file at https://aka.ms/AzureRTOS_EULA */
|
|
;/* and in the root directory of this software. */
|
|
;/* */
|
|
;/**************************************************************************/
|
|
;
|
|
;
|
|
;/**************************************************************************/
|
|
;/**************************************************************************/
|
|
;/** */
|
|
;/** ThreadX Component */
|
|
;/** */
|
|
;/** Initialize */
|
|
;/** */
|
|
;/**************************************************************************/
|
|
;/**************************************************************************/
|
|
;
|
|
|
|
.text
|
|
|
|
;
|
|
;/**************************************************************************/
|
|
;/* */
|
|
;/* FUNCTION RELEASE */
|
|
;/* */
|
|
;/* _tx_initialize_low_level RXv1/GNURX */
|
|
;/* 6.1.11 */
|
|
;/* AUTHOR */
|
|
;/* */
|
|
;/* William E. Lamie, Microsoft Corporation */
|
|
;/* */
|
|
;/* DESCRIPTION */
|
|
;/* */
|
|
;/* This function is responsible for any low-level processor */
|
|
;/* initialization, including setting up interrupt vectors, setting */
|
|
;/* up a periodic timer interrupt source, saving the system stack */
|
|
;/* pointer for use in ISR processing later, and finding the first */
|
|
;/* available RAM memory address for tx_application_define. */
|
|
;/* */
|
|
;/* INPUT */
|
|
;/* */
|
|
;/* None */
|
|
;/* */
|
|
;/* OUTPUT */
|
|
;/* */
|
|
;/* None */
|
|
;/* */
|
|
;/* CALLS */
|
|
;/* */
|
|
;/* None */
|
|
;/* */
|
|
;/* CALLED BY */
|
|
;/* */
|
|
;/* _tx_initialize_kernel_enter ThreadX entry function */
|
|
;/* */
|
|
;/* RELEASE HISTORY */
|
|
;/* */
|
|
;/* DATE NAME DESCRIPTION */
|
|
;/* */
|
|
;/* 08-02-2021 William E. Lamie Initial Version 6.1.8 */
|
|
;/* 10-15-2021 William E. Lamie Modified comment(s), */
|
|
;/* resulting in version 6.1.9 */
|
|
;/* 01-31-2022 William E. Lamie Modified comment(s), */
|
|
;/* resulting in version 6.1.10 */
|
|
;/* 04-25-2022 William E. Lamie Modified comment(s), */
|
|
;/* resulting in version 6.1.11 */
|
|
;/* */
|
|
;/**************************************************************************/
|
|
.global __tx_initialize_low_level
|
|
__tx_initialize_low_level:
|
|
|
|
;
|
|
; /* Save the first available memory address. */
|
|
; _tx_initialize_unused_memory = (VOID_PTR) &free_mem_start;
|
|
;
|
|
MOV.L #_end, R1 ; Pickup unused memory address
|
|
MOV.L #__tx_initialize_unused_memory, R2
|
|
MOV.L R1,[R2] ; Save first free memory address
|
|
|
|
; /* Set priority of SWINT to 1. */
|
|
MOV.L #0x87303, r1
|
|
MOV.L #1, r2
|
|
MOV.B r2, [r1]
|
|
|
|
; /* Enable SWINT. */
|
|
MOV.L #0x87203,r1
|
|
MOV.B [r1], r2
|
|
OR #(1 << 3), r2
|
|
MOV.B r2, [r1]
|
|
|
|
RTS
|
|
|
|
.end
|