📄 start.lst
字号:
307
308 #set ROMCONST 0 ; works only
with compiler ROMCONST
309 #set RAMCONST 1 ; works with
BOTH compiler settings
310 #set AUTOCONST RAMCONST ; works with
BOTH compiler settings
311
312 #set CONSTDATA AUTOCONST ; <<< set RAM
/ROM/AUTOCONST
313
314 ; - AUTOCONST (default) is a the same as RAMCONS
T
315 ; - RAMCONST/AUTOCONST should always work, even
if compiler is set to
316 ; ROMCONST. If compiler is set to ROMCONST and
this startup file is
317 ; set to RAMCONST or AUTOCONST, this startup f
ile will generate an
318 ; empty section CINIT in RAM. However, the cod
_____________________________________________________________________________
F2MC-16 Family SOFTUNE Assembler V30L11 2008-01-06 16:22:06 Page: 10
STARTUP FILE FOR MEMORY INITIALISATION
SN LOC OBJ LLINE SOURCE
e, which copies from
319 ; CONST to CINIT will not have any effect, bec
ause size of section 0.
320 ; - It is highly recommended to set the compiler
to ROMCONST for
321 ; single-chip mode or internal ROM+ext bus. Th
e start-up file
322 ; should be set to AUTOCONST.
323 ; - ROMCONST setting on systems with full extern
al bus requires exter-
324 ; nal address mapping.
325 ; Single-chip can be emulated by the emulator
debugger.
326 ; ROM mirror can also be used with simulator.
327 ;
328 ; see also MIRROR options of external bus settin
gs
329
330 ;===============================================
=====================
331 ; 4.5 Stack Type and Stack Size
332 ;===============================================
=====================
333
334 #set USRSTACK 0 ; user stack: for m
ain program
335 #set SYSSTACK 1 ; system stack: for
main program and interrupts
336
337 #set STACKUSE SYSSTACK ; <<< set active
stack
338
339 #set STACK_RESERVE ON ; <<< reserve st
ack area in this module
340 #set STACK_SYS_SIZE 768 ; <<< byte size
of System stack
341 #set STACK_USR_SIZE 2 ; <<< byte size
of User stack
342
343 #set STACK_FILL ON ; <<< fills the
stack area with pattern
344 #set STACK_PATTERN 0x55AA ; <<< the patter
n to write to stack
345
346 ; - If the active stack is set to SYSSTACK, it i
s used for main program
347 ; and interrupts. In this case, the user stack
could be set to a dummy
348 ; size.
349 ; If the active stack is set to user stack, it
is used for the main
350 ; program but the system stack s automatically
activated, if an inter-
351 ; rupt is serviced. Both stack areas must have
_____________________________________________________________________________
F2MC-16 Family SOFTUNE Assembler V30L11 2008-01-06 16:22:06 Page: 11
STARTUP FILE FOR MEMORY INITIALISATION
SN LOC OBJ LLINE SOURCE
a reasonable size.
352 ; - If STACK_RESERVE is ON, the sections USTACK
and SSTACK are reserved
353 ; in this module. Otherwise, they have to be r
eserved in other modules.
354 ; If STACK_RESERVE is OFF, the size definition
s STACK_SYS_SIZE and
355 ; STACK_USR_SIZE have no meaning.
356 ; - Even if they are reverved in other modules,
they are still initialised
357 ; in this start-up file.
358 ; - Filling the stack with pattern allows to dyn
amically check the stack
359 ; area, which had already been used.
360 ;
361 ; - If only system stack is used and SSB is link
ed to a different bank
362 ; than USB, make sure that all C-modules (whic
h generate far pointers
363 ; to stack data) have "#pragma SSB". Applies o
nly to exclusive confi-
364 ; gurations.
365 ; - Note, several library functions require quit
e a big stack (due to
366 ; ANSI). Check the stack information files (*.
stk) in the LIB\907
367 ; directory.
368
369 ;===============================================
=====================
370 ; 4.6 General Register Bank
371 ;===============================================
=====================
372
373 #set REGBANK 0 ; <<< set def
ault register bank
374
375 ; set the General Register Bank that is to be us
ed after startup.
376 ; Usually, this is bank 0, which applies to addr
ess H'180..H'18F. Set
377 ; in the range from 0 to 31.
378 ; Note: All used register banks have to be reser
ved (linker options).
379
380 #if REGBANK > 31 || REGBANK < 0
381 X # error REGBANK setting out of range
382 #endif
383
384 ;===============================================
=====================
385 ; 4.7 Low-Level Library Interface
386 ;===============================================
=====================
_____________________________________________________________________________
F2MC-16 Family SOFTUNE Assembler V30L11 2008-01-06 16:22:06 Page: 12
STARTUP FILE FOR MEMORY INITIALISATION
SN LOC OBJ LLINE SOURCE
387
388 #set CLIBINIT OFF ; <<< select
extended library usage
389
390 ; This option has only to be set, if stream-IO/s
tandard-IO function of
391 ; the C-libraray have to be used (printf(), fope
n()...). This also
392 ; requires low-level functions to be defined by
the application
393 ; software.
394 ; For other library functions like (e.g. sprintf
()) all this is not
395 ; necessary. However, several functions consume
a large amount of stack.
396
397 ;===============================================
=====================
398 ; 4.8 Clock Selection
399 ;===============================================
=====================
400
401 #set NOCLOCK 0 ; do not touc
h CKSCR register
402 #set MAINCLOCK 1 ; select main
clock (1/2 external)
403 #set PLLx1 2 ; set PLL to
x1 ext. clock/quartz
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -