📄 start8fx.asm
字号:
;;====================================================================
; MB951xx Series C Compiler,
; (C) FUJITSU MICROELECTRONICS EUROPE
;
; Startup file for memory and basic controller initialisation
;=====================================================================
.PROGRAM start
.TITLE start
;--------------------------------------------------------------------------
;====================================================================
; 1 Contents
;====================================================================
;
; 1 Contents
; 2 Disclaimer
; 3 History
; 4 Settings
; 4.1 Modbyte
; 4.2 Clock Mode Selection
; 4.3 Main-PLL Clock Selection
; 4.4 Sub-PLL Clock Selection
; 4.5 DIV Clock Selection (Machine clock division ratio)
; 4.6 Stack Size
; 4.7 Flash Security
; 4.8 MCU Series
; 4.9 Monitor Debugger
; 5 Section and Data Declaration
; 5.1 Several fixed addresses
; 5.2 External declaration of symbols
; 5.3 Definition to stack area
; 5.4 Definition to start address of data, const and code section
; 5.5 Monitor Debugger configuration data
; 5.6 Define Reset vector and Modebyte
; 5.7 Flash Security section
; 6 Start-Up Code
; 6.1 Set stack pointer
; 6.2 Set register bank, direct bank pointer and I flag
; 6.3 Set ILM to the lowest level(3)
; 6.4 Set PLL (PLCC)
; 6.5 Set System Clock (SYCC)
; 6.6 Copy initial value *CONST(ROM) section to *INIT(RAM) section
; 6.7 Zero clear of *VAR section
; 6.8 call main routine
;
;====================================================================
; 2 Disclaimer
;====================================================================
; FUJITSU MICROELECTRONICS EUROPE GMBH
; Pittlerstrasse 47, 63225 Langen, Germany
; Tel.:++49 6103 690-0, Fax -122
;
; The following software is for demonstration purposes only.
; It is not fully tested, nor validated in order to fulfil
; its task under all circumstances. Therefore, this software
; or any part of it must only be used in an evaluation
; laboratory environment.
; This software is subject to the rules of our standard
; DISCLAIMER, that is delivered with our SW-tools on the
; Fujitsu Microcontrollers DVD (V5.0 or higher "\START.HTM") or
; on our Internet Pages:
; http://www.fme.gsdc.de/gsdc.htm
; http://emea.fujitsu.com/microelectronics
;
;====================================================================
; 3 History
;====================================================================
;
; Version 1.30 07 Nov 07 M. Vogel
; - added new series MB95160
; - added monitor debugger settings
;
; Version 1.20 23 Jun 06 M. Vogel
; - added new series MB95140/150
; - corrected setting for flash security
;
; Version 1.10 14 Dec 05 M. Vogel
; - Added definition of MCU Series in 4.8
; - Location of Flash Security Byte depending on Series definition
;
; Version 1.00 12 Oct 04 H. Wech
; - Created for Softune Workbench V30L29
;
;====================================================================
; 4 Settings
;====================================================================
; CHECK ALL OPTIONS WHETHER THEY FIT TO THE APPLICATION;
;
; Configure this startup file in the "Settings" section. Search for
; comments with leading "; <<<". This points to the items to be set.
;
#set OFF 0
#set ON 1
;
;
;====================================================================
; 4.1 Modbyte
;====================================================================
# set SINGLE_CHIP 0 ; single chip mode, no external bus interface
# set EXTERNAL_BUS 1 ; external bus interface
;
# set MODEBYTE SINGLE_CHIP ; <<< set modebyte
;
; The Mode Byte defines whether an external bus interface is available or not.
; it is read after the reset vector. Please have a look at the Hardware manual
; of the used microcontroller for further information on that topic
;
;
;====================================================================
; 4.2 Clock Mode Selection
;====================================================================
# set SUB 0 ; Sub clock mode
# set SUB_PLL 1 ; Sub PLL clock mode
# set MAIN 2 ; Main clock mode
# set MAIN_PLL 3 ; Main PLL mode
# set NOCLOCK FF ; Do not touch the clock and PLL register
;
#set CLOCKMODE MAIN_PLL ; <<< Clock seletion
;
;
;====================================================================
; 4.3 Main-PLL Clock Selection
;====================================================================
# set MAINPLL_OFF 0 ; No Main-clock setting
# set MAINPLLx1 1 ; Original oscillator clock x1
# set MAINPLLx2 2 ; Original oscillator clock x2
# set MAINPLLx2p5 3 ; Original oscillator clock x2.5
;
#set CLOCKSPEED MAINPLLx2p5 ; <<< set PLL speed
;
;
;====================================================================
; 4.4 Sub-PLL Clock Selection
;====================================================================
# set SUBPLL_OFF 0 ; No Sub-clock setting
# set SUBPLLx2 1 ; Original oscillator clock x2
# set SUBPLLx3 2 ; Original oscillator clock x3
# set SUBPLLx4 3 ; Original oscillator clock x4
;
#set SUBCLOCKSPEED SUBPLL_OFF ; <<< set Sub-clock PLL speed
;
;
;====================================================================
; 4.5 DIV Clock Selection (Machine clock division ratio)
;====================================================================
# set CLK_0 0 ; Original oscillator div 1
# set CLK_4 1 ; Original oscillator div 4
# set CLK_8 2 ; Original oscillator div 8
# set CLK_16 3 ; Original oscillator div 16
;
#set CLOCKDIV CLK_0 ; <<< set DIV clock ratio
;
;
;====================================================================
; 4.6 Stack Size
;====================================================================
;
# set STACKSIZE 64 ; <<< Stack size
;
;
;====================================================================
; 4.7 Flash Security
;====================================================================
;
# set FLASHSECURITY OFF ; <<< Define Flash Security (ON / OFF)
;
;
;====================================================================
; 4.8 MCU Series Selection
;====================================================================
#set MB95100 0 ; Bassoon Series, 64pin
#set MB95110 1 ; Clarinet Series, 48/52pin
#set MB95120 2 ; Tuba Series, 100pin with LCDC
#set MB95130 3 ; Flute Series, 28/30pin
#set MB95140 4 ; Oboe Series, 32pin
#set MB95150 5 ; Trumpet, 48/52pin with LCDC
#set MB95160 6 ; Trombone, 64pin with LCDC
;
#set MCU_SERIES MB95100 ; <<< set MCU Series
;
;
;====================================================================
; 4.9 Monitor Debugger
;====================================================================
;
#set USER_PASSWORD 0xFFFFFFFF ; <<< Define User Password for
; monitor debugger entry (32bit)
;
;
; <<< END OF SETTINGS >>>
;
;
;====================================================================
; 5 Section and Data Declaration
;====================================================================
;====================================================================
; 5.1 Several fixed addresses
;====================================================================
PLLC .EQU 0x06 ; PLL register
SYCC .EQU 0x07 ; Clock select control register
;
;
;====================================================================
; 5.2 External declaration of symbols
;====================================================================
.EXPORT __start
.IMPORT _main
.IMPORT _SetClockMainToPll
.IMPORT LMEMTOMEM
.IMPORT LMEMCLEAR
.IMPORT _RAM_INIT
.IMPORT _ROM_INIT
.IMPORT _RAM_DIRINIT
.IMPORT _ROM_DIRINIT
#ifdef MONITORDEBUGGER_CONFIGURATION
.IMPORT _AutoBootCheck
.EXPORT _FGMTBL_STARTADR
.EXPORT _FGMTBL_STACKTOP
.EXPORT _FGMTBL_ABOOTADR
.EXPORT _FGMTBL_PASSWORD
#endif
;--------------------------------------------------------------------------
; 5.3 Definition to stack area
;--------------------------------------------------------------------------
.SECTION STACK, STACK, ALIGN=1
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -