查看: 1847|回复: 1

mc9s08pa32 修改堆栈问题

[复制链接]

该用户从未签到

24

主题

96

帖子

0

中级会员

Rank: 3Rank: 3

积分
228
最后登录
2019-3-31
发表于 2016-1-25 14:37:30 | 显示全部楼层 |阅读模式
/* This is a linker parameter file for the mc9s08pa32 */

NAMES END /* CodeWarrior will pass all the needed files to the linker by command line. But here you may add your own files too. */

SEGMENTS /* Here all RAM/ROM areas of the device are listed. Used in PLACEMENT below. */
    Z_RAM                    =  READ_WRITE   0x0048 TO 0x00FF;   
    RAM                      =  READ_WRITE   0x0100 TO 0x07FF;
     
    SS_RAM                      =  READ_WRITE   0x0800 TO 0x103F; /********/
            
    ROM                      =  READ_ONLY    0x8000 TO 0xFF6F;
    ROM1                     =  READ_ONLY    0xFF80 TO 0xFFAF;
    EEPROM                   =  READ_ONLY    0x3100 TO 0x31FF;
/* INTVECTS                 =  READ_ONLY    0xFFB0 TO 0xFFFF; Reserved for Interrupt Vectors */
END

PLACEMENT /* Here all predefined and user segments are placed into the SEGMENTS defined above. */
     
    FAR_RAM                      /* non-zero page variables */
                                        INTO  RAM;
                                       
    SSTACK                              INTO  SS_RAM;  /*********/                                    
   
    _PRESTART,                          /* startup code */
    STARTUP,                            /* startup data structures */
    ROM_VAR,                            /* constant variables */
    STRINGS,                            /* string literals */
    VIRTUAL_TABLE_SEGMENT,              /* C++ virtual table segment */
    DEFAULT_ROM,
    COPY                                /* copy down information: how to initialize variables */
                                        INTO  ROM; /* ,ROM1: To use "ROM1" as well, pass the option -OnB=b to the compiler */

    _DATA_ZEROPAGE,                     /* zero page variables */   
    MY_ZEROPAGE, DEFAULT_RAM            INTO  Z_RAM;
        
END

                                                            
STACKSIZE 0x200


VECTOR 0 _Startup /* Reset vector: this is the default entry point for an application. */

/*******/部分为改动部分,改动后程序运行不正常,请问错误的地方?

回复

使用道具 举报

该用户从未签到

124

主题

3600

帖子

0

金牌会员

Rank: 6Rank: 6

积分
5781
最后登录
1970-1-1
发表于 2016-1-26 09:20:33 | 显示全部楼层
那请问楼主改动的目标是什么呢,以及具体改动了哪些呢?
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 注册/登录

本版积分规则

关闭

站长推荐上一条 /3 下一条

Archiver|手机版|小黑屋|恩智浦技术社区

GMT+8, 2025-8-3 09:01 , Processed in 0.078755 second(s), 20 queries , MemCache On.

Powered by Discuz! X3.4

Copyright © 2001-2024, Tencent Cloud.

快速回复 返回顶部 返回列表