查看: 2370|回复: 2

[求助] KL26Z, 开发boot前,做跳转实验,一直失败,SOS!!!

[复制链接]

该用户从未签到

9

主题

52

帖子

1

注册会员

Rank: 2

积分
138
最后登录
2018-11-29
发表于 2015-7-6 12:04:37 | 显示全部楼层 |阅读模式
用官方demo中的两个LED工程分别充当BOOT和APP,
红色蓝色交替闪亮的作为boot,红色绿色闪亮的作为APP,

计划, APP偏移22K,

然后,我在boot中的跳转代码为:
typedef void ( *JumpLocation )(void);

。。。。。。。
JumpLocation funJump;

delay 10s;

。。。。。。。
//偏移22K, 0x5800
funJump = ( JumpLocation )(0x5800+4);
__set_MSP(0x5800+4);
funJump();


然后,APP中修改ICF文件,
/*-Memory Regions-*/
define symbol __ICFEDIT_region_ROM_start__ = 0x5800; //0;                                                //0x5800;                                                                                      //offset=22k;  //0x0;
define symbol __ICFEDIT_region_ROM_end__   = 0x0001ffff;//__ICFEDIT_region_ROM_start__ + ((128-22)*1024);//(128*1024);        //((128-22)*1024);      //********
define symbol __ICFEDIT_region_RAM_end__   = 0x20000000;
define symbol __ICFEDIT_region_RAM_start__ = __ICFEDIT_region_RAM_end__ - (16*1024)/4 + 0x410;   //********
/*-Specials-*/
define symbol __ICFEDIT_intvec_start__ = 0x5800;//__ICFEDIT_region_ROM_start__;

/*-Sizes-*/
define symbol __ICFEDIT_size_cstack__ = (1*1024);   //********
define symbol __ICFEDIT_size_heap__   = (2*1024);   //********
/**** End of ICF editor section. ###ICF###*/

define symbol __region_RAM2_start__        = 0x20000000;
define symbol __region_RAM2_end__          = __region_RAM2_start__ + ((16*1024)*3)/4;//********

define exported symbol __VECTOR_TABLE      = 0x00005800;//0x00000000;
define exported symbol __VECTOR_RAM        = 0x00005800;//0x00000000;//__ICFEDIT_region_RAM_start__ - 0x410;

define exported symbol __BOOT_STACK_ADDRESS = __region_RAM2_end__ - 8;

define symbol __code_start__ = 0x00000410+__ICFEDIT_region_ROM_start__;//********

。。。。。。。。。。


然后两边都出Bin,按照22K偏移,拼成一个bin,JLINK烧下去,
运行结果,,只有boot在跑,10秒后,似乎有一个跳转动作,但最终还是红蓝闪亮,没出现期望中的红绿闪亮。



我知道答案 目前已有2人回答

BootDemo.zip

2.73 MB, 下载次数: 5, 下载积分: 威望 1

回复

使用道具 举报

该用户从未签到

9

主题

52

帖子

1

注册会员

Rank: 2

积分
138
最后登录
2018-11-29
 楼主| 发表于 2015-7-7 18:01:42 | 显示全部楼层
今天上午,深圳的FAE  River, 已经帮我解决了此问题,谢谢!
回复 支持 反对

使用道具 举报

  • TA的每日心情
    奋斗
    2017-7-7 17:21
  • 签到天数: 16 天

    连续签到: 1 天

    [LV.4]偶尔看看III

    13

    主题

    82

    帖子

    0

    中级会员

    Rank: 3Rank: 3

    积分
    251
    最后登录
    1970-1-1
    发表于 2017-5-22 14:32:30 | 显示全部楼层
    yangzhengyong 发表于 2015-7-7 18:01
    今天上午,深圳的FAE  River, 已经帮我解决了此问题,谢谢!

    可以问下是怎么解决的吗
    回复 支持 反对

    使用道具 举报

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

    本版积分规则

    关闭

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

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

    GMT+8, 2025-7-19 16:08 , Processed in 0.090080 second(s), 23 queries , MemCache On.

    Powered by Discuz! X3.4

    Copyright © 2001-2024, Tencent Cloud.

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