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

📄 start.asm

📁 一个实时操作系统的源代码。包括任务的调度机制、文件系统等
💻 ASM
📖 第 1 页 / 共 4 页
字号:
;====================================================================
; $Id: START.ASM,v 3.8 2004/04/15 15:37:46 hloesc Exp $
;====================================================================
; THIS SAMPLE CODE IS PROVIDED AS IS AND IS SUBJECT TO ALTERATIONS.  
;  FUJITSU MICROELECTRONICS ACCEPTS NO RESPONSIBILITY OR LIABILITY   
;         FOR ANY ERRORS OR ELIGIBILITY FOR ANY PURPOSES.            
;                                                                    
;    Startup file for memory and basic controller initialisation     
;                                                                    
;    MB90500/MB90300/MB90400/MB90800/MB90600 Series C Compiler,      
;    (compatible but untested for MB90700/MB90700H/MB90200)          
;                                                                    
;    (C) FUJITSU MICROELECTRONICS EUROPE 1998-2003                   
;====================================================================

          .PROGRAM  STARTUP  
          .TITLE    "STARTUP FILE FOR MEMORY INITIALISATION"

;====================================================================
; 1  Contents
;====================================================================
; 1   Contents
; 2   Disclaimer
; 3   History
;
; 4   SETTINGS              (USER INTERFACE)
; 4.1   Controller Family
; 4.2   Memory model
; 4.3   Constant Data Handling
; 4.4   Stack Type and Stack Size
; 4.5   General Register Bank
; 4.6   Low-Level Library Interface
; 4.7   Clock Selection
; 4.8   External Bus Interface
; 4.9   Reset Vector
; 4.10  Enable RAMCODE Copying
; 4.11  Enable information stamps in ROM
;
; 5   Section and Data Declaration
; 5.1   Several fixed addresses (fixed for MB90xxx controllers)
; 5.2   Declaration of __near addressed data sections
; 5.3   Declaration of RAMCODE section and labels
; 5.4   Declaration of sections containing other sections description
; 5.5   Stack area and stack top definition
; 5.6   Direct page register dummy label definition
;
; 6   Start-Up Code
; 6.1   Import external symbols
; 6.2   Program start (the reset vector should point here)
; 6.3   "NOT RESET YET" WARNING
; 6.4   Initialisation of processor status
; 6.5   Set clock ratio 
; 6.6   Set external bus configuaration
; 6.7   Copy initial values to data areas.
; 6.8   Clear uninitialised data areas to zero
; 6.9   Prepare stacks and set the active stack type
; 6.10  Set Data Bank Register (DTB) and Direct Page Register (DPR)
; 6.11  Wait for PLL to stabilise
; 6.12  Initialise Low-Level Library Interface
; 6.13  Call C-language main function
; 6.14  Shut down library
; 6.15  Program end loop
; 6.16  Configuration stamp in ROM (currently test only)
; 6.17  Debug address specification
;
;====================================================================
; 2  Disclaimer
;====================================================================
;                  FUJITSU MICROELECTRONICS EUROPE GMBH
;                  Am Siebenstein 6-10, 63303 Dreieich          
;                  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 CD 
;    "Microcontrollers - Documentation & Software" (V3.4) or
;    see our Internet Page -                                      
;    http://www.fme.fujitsu.com/products/micro/disclaimer.html

;
;====================================================================
; 3  History
;====================================================================
; $Id: START.ASM,v 3.8 2004/04/15 15:37:46 hloesc Exp $

#define VERSION  "3.08"
/*
$Log: START.ASM,v $
Revision 3.8  2004/04/15 15:37:46  hloesc
- missing underscore in __psccr (copy and paste error)

Revision 3.7  2004/04/05 10:33:53  hloesc
- missing colon after CVS "Log" command

Version 3.06      05 April 2004,  HLo
- checked in CVS
- changed back to manual setting of EXTENDED_PLL, since clearing register could
  be necessary, if exist

Version 3.05      01 April 2004,  HLo
- removed setting EXTENDED_PLL
  It is now set automatically, if PLL factor is set higher than 4
- changed _psccr reference to __psccr

Version 3.04      02. Jan 2004,  HLo
- removed fixed address PSCCR, because it is not fixed

Version 3.03      18. Dec 2003,  HLo
- configuration option for Version stamp and Configuration stamp
- DATA2 and INIT2 added to list of cleared/initialised sections

Version 3.02      26. June 2003  HLo
- more NOP instructions after PLL disable for faster PLL types
- on default stack is filled with pattern
- size alignment for stack re-added 
- initialise stack by stack symbols to force linkage of
  externaly defined stack or to force linker error
- label _start plus one NOP moved before "notresetwarning", in 
  order to achieve same cycle count for evaluation chip and Flash
  chip with fixed reset vector.
- pre-setting stack with pattern is now default

Version 3.01      12 May 2003  HWe
- ADDRESSMODE for External Bus Interface added


Version 3.00      30 Jan 2003  HLo
- branch 2.02b merged to 3.00: added NOP after PLL disable
- stack size specified in bytes now
- new: additional PLL factors for MB90340/350/480
- new: option to preset stack with pattern
- new: symbols to access stack in C
- new: option to skip reservation of stack area
- new: LX-family MB90800 added

Version 2.03      06 Feb 2002  HLo
- company name/link updated 
- CONST2/CINIT2 section added to support split CONST area

Version 2.02      20 Aug 2001  NPo
- MB90300 family added

Branch  2.02b     16 Nov 99    MSt
- insert wait loop to check if PLL has stopped

Version 2.01      11 Oct 99    HLo
- unused macros WIDTH_8 and WIDTH_16 removed

Version 2.00      23 July 99    HLo
- decriptors of __near sections now in DCLEAR/DTRANS
- code for __near section init removed, now initialised by DCLEAR
  and DTRANS processing
- RAMCODE option added
- table of contents added
- memory model AUTO renamed to AUTOMODEL
- CONSTDATA mode AUTOCONST introduced to make it clearer

Version 1.12      23 June 99    HLo
- CLIBINIT is using ON/OFF instead of extra macro now

Version 1.11      1 June 99     HLo
- confusing old line with comment removed, was refering to unused
  old BUSWIDTH

Version 1.10      17 May 99     HLo
- change in 1.09 (MODEBYTE) related to BUSWIDTH was not complete

Version 1.09      12 May 99     HLo
- MB90400 family added
- several coments changed
- INTROM_EXTBUS macro was wrong
- BUSWIDTH macro removed, now resolved from bus signal
- disclaimer added
- disabling interrupts added

Version 1.08      16 April 99   JRo
- Version placed in separate section (caused problems with fixed
  reset vector)
  
Version 1.07      01 April 99   HLo
- Version string had wrong number (1.05 instead of 1.06)
- Copyright slightly changed

Version 1.06      18 Feb 99   HLo
- default external bus configuration: WR signal enabled
- ROMMIRROR macro processing simplified (less warnings>

Version 1.05      28 Oct 98   HLo
- CALL/CALLP _exit was not differed

Version 1.04      21 Oct 98   HLo
- ROM mirror option added
- _exit call added
- bug: EQU ON/OFF move to upper lines 

Version 1.03      19 Oct 98   HLo
- bug: SEGCOPY macro: used size changed from sizeof(src) to 
  sizeof(dest). It was conflicting with RAMCONST, if compiler
  is set to ROMCONST.

Version 1.02      16 Oct 98   HLo
- memory model AUTO introduced (use far calls only and repair
  stack, if necessary
- colons removed from EQU labels
- stream_init call added
- RAMCONST set as default (also for ROMCONST systems)

Version 1.01      31 Aug 98   HLo
- bug: conditional for reset vector was missing

Version 1.00      25 Aug 98   HLo
- original version
*/
;====================================================================

;====================================================================
; 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  Controller Family
;====================================================================

#set      MB90700   0             ; FFMC-16
#set      MB90200   1             ; FFMC-16F
#set      MB90600   2             ; FFMC-16L
#set      MB90500   3             ; FFMC-16LX
#set      MB90400   4             ; FFMC-16LX
#set      MB90300   5             ; FFMC-16LX
#set      MB90800   6             ; FFMC-16LX

#set      FAMILY    MB90500        ; <<< select family

; NOTE: This startup file is not suitable for MB90610 series. Use
; start610.asm instead.

;====================================================================
; 4.2  C-language Memory model
;====================================================================

                                   ;      data      code   
#set      SMALL     0              ;     16 Bit    16 Bit
#set      MEDIUM    1              ;     16 Bit    24 Bit
#set      COMPACT   2              ;     24 Bit    16 Bit
#set      LARGE     3              ;     24 Bit    24 Bit
#set      AUTOMODEL 4              ; works always, might occupy two
                                   ; additional bytes


#set      MEMMODEL  AUTOMODEL      ; <<< C-memory model

⌨️ 快捷键说明

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