/****************************************************************************/
/* boards/z16/z16f/z16f2800100zcog/scripts/z16f2800100zcog.linkcmd          */
/*                                                                          */
/* Licensed to the Apache Software Foundation (ASF) under one or more       */
/* contributor license agreements.  See the NOTICE file distributed with    */
/* this work for additional information regarding copyright ownership.  The */
/* ASF licenses this file to you under the Apache License, Version 2.0 (the */
/* "License"); you may not use this file except in compliance with the      */
/* License.  You may obtain a copy of the License at                        */
/*                                                                          */
/*   http://www.apache.org/licenses/LICENSE-2.0                             */
/*                                                                          */
/* Unless required by applicable law or agreed to in writing, software      */
/* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT*/
/* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.  See the*/
/* License for the specific language governing permissions and limitations  */
/* under the License.                                                       */
/*                                                                          */
/****************************************************************************/

-FORMAT=OMF695,INTEL32
-map -maxhexlen=64 -quiet -sort NAME=ascending -unresolved=fatal
-warnoverlap -NOxref -warn -debug -NOigcase

RANGE ROM    $000000 : $007FFF
RANGE RAM    $FFB000 : $FFBFFF
RANGE IODATA $FFC000 : $FFFFFF
RANGE EROM   $008000 : $01FFFF
RANGE ERAM   $800000 : $87FFFF

CHANGE NEAR_TEXT=NEAR_DATA
CHANGE FAR_TEXT=FAR_DATA

ORDER FAR_BSS,  FAR_DATA
ORDER NEAR_BSS, NEAR_DATA
COPY  NEAR_DATA EROM
COPY  FAR_DATA  EROM

define _0_exit             = 0
define _low_near_romdata   = copy base of NEAR_DATA
define _low_neardata       = base of NEAR_DATA
define _len_neardata       = length of NEAR_DATA
define _low_far_romdata    = copy base of FAR_DATA
define _low_fardata        = base of FAR_DATA
define _len_fardata        = length of FAR_DATA
define _low_nearbss        = base of NEAR_BSS
define _len_nearbss        = length of NEAR_BSS
define _low_farbss         = base of FAR_BSS
define _len_farbss         = length of FAR_BSS
define _near_heaptop       = highaddr of RAM
define _far_heaptop        = highaddr of ERAM
define _far_stack          = highaddr of ERAM
define _near_stack         = highaddr of RAM
define _near_heapbot       = top of RAM
define _far_heapbot        = top of ERAM

define _SYS_CLK_SRC        = 1
define _SYS_CLK_FREQ       = 20000000

define __EXTCT_INIT_PARAM  = $80
define __EXTCS0_INIT_PARAM = $8012
define __EXTCS1_INIT_PARAM = $8001
define __EXTCS2_INIT_PARAM = $0000
define __EXTCS3_INIT_PARAM = $0000
define __EXTCS4_INIT_PARAM = $0000
define __EXTCS5_INIT_PARAM = $0000

define __PFAF_INIT_PARAM   = $ff
define __PGAF_INIT_PARAM   = $ff
define __PDAF_INIT_PARAM   = $ff00
define __PAAF_INIT_PARAM   = $0000
define __PCAF_INIT_PARAM   = $0000
define __PHAF_INIT_PARAM   = $0300
define __PKAF_INIT_PARAM   = $0f

/* arch/z16/src/Makefile will append target, object and library paths below */