⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 mcf523x_lo.s

📁 motorola 针对coldfire 5275 评估板的Dbug bootloader源程序
💻 S
字号:
/*
 * File:    mcf523x_lo.s
 * Purpose: Lowest level routines for the MCF523x.
 *
 * Notes:   
 */

#ifdef _UNDERSCORE_
#define mcf523x_init        _mcf523x_init
#define main                _main
#endif
 
    .extern ___IPSBAR
    .extern ___SRAM
    .extern ___SRAM_SIZE
    .extern ___FLASH
    .extern ___SP_INIT
    .extern mcf5xxx_wr_rambar0
    .extern mcf5xxx_wr_rambar1
    .extern mcf523x_init
    .extern main
    .extern _mcf523x_init
    .extern _main

    .global asm_startmeup
    .global _asm_startmeup
    .global cpu_cache_flush
    .global _cpu_cache_flush


    .text

/********************************************************************
 * This is the main entry point upon hard reset.
 */
asm_startmeup:
_asm_startmeup:
    
    move.w  #0x2700,sr

    /* Initialize IPSBAR */
    move.l  #(___IPSBAR + 1),d0
    move.l  d0,0x40000000
    
    /* Initialize RAMBAR1: locate SRAM and validate it */
    move.l  #(___SRAM + 0x21),d0
    .long   0x4e7b0C05      /* movec d0,RAMBAR1 */

    /* Point Stack Pointer into SRAM temporarily */
    move.l  #___SRAM,d0
    add.l   #___SRAM_SIZE,d0
    move.l  d0,sp

    /* Initialize mcf523x periphs, etc */
    jsr     _mcf523x_init

    /* Relocate Stack Pointer */ 
    move.l  #___SP_INIT,sp

    /* Jump to the main process */
    jmp     _main
    
    bra     .
    nop
    nop
    halt

/********************************************************************
 * The MCF523x cache can be configured as instruction, data or split.
 * Invalidate the entire cache.
 */
cpu_cache_flush:
_cpu_cache_flush:
    nop                     /* sync */
    move.l  #0x01000000,d0  /* Invalidate the I-Cache */
    movec   d0,cacr
    rts

    .end

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -