查看: 3015|回复: 3

[已解决] Kinetic系列MCU KL25的ICF文件 求解释(已解决)

[复制链接]

该用户从未签到

1

主题

2

帖子

0

新手上路

Rank: 1

积分
1
最后登录
1970-1-1
发表于 2013-12-30 15:47:27 | 显示全部楼层 |阅读模式
 现在只在用FRDM-KL25Z开发板学习HIDBootloader功能.
用的是freescale的参考例程AN4764SW_Freescale_HID_Bootloader_r10
不过,对于ICF文件,还有一些细节没有搞明白.
下面红色字体部分,这些section是定义在其它文件中的吗? 具体是什么意思?
我都找不到这些section在哪里定义的.
另外这个bootloader是怎么实现跳转到用户代码区域的,
我看到启动代码,都是跳到main()去,那就跳到bootloader的main()去啊.怎么跳到用户代码去的?
*********************************************************
void start(void)

        /* Disable the watchdog timer */
 //       SIM_COPC = 0x00;
        FTFA_FPROT3 = 0xFE;
  
        /* Copy any vector or data sections that need to be in RAM */
        common_startup();
 
        /* Perform clock initialization, default UART initialization,
         * initializes clock out function, and enables the abort button
         */
//        sysinit();
        
        /* Jump to main process */
        main();
}
********************************************************************
/*###ICF### Section handled by ICF editor, don't touch! ****/
/*-Editor annotation file-*/
/* IcfEditorFile="$TOOLKIT_DIR$\config\ide\IcfEditor\cortex_v1_0.xml" */
/*-Memory Regions-*/
define symbol __ICFEDIT_region_ROM1_start__ = 0xC0;
define symbol __ICFEDIT_region_ROM1_end__   = 0x400;
define symbol __ICFEDIT_region_ROM2_start__ = 0x410;
define symbol __ICFEDIT_region_ROM2_end__   = (128*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__     = 0;
define symbol __ICFEDIT_cfm_start__        = 0x400;
 
/*-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      = 0x00000000;
define exported symbol __VECTOR_RAM        = __ICFEDIT_region_RAM_start__ - 0x410;
 
define exported symbol __BOOT_STACK_ADDRESS = __region_RAM2_end__ - 8;
 
//DAS define symbol __code_start__ = 0x00000410;//********
define symbol __code_start__ = 0x000000C0;//********
 
define memory mem with size = 4G;
define region ROM_region   = mem:[from __ICFEDIT_region_ROM1_start__   to __ICFEDIT_region_ROM1_end__] | mem:[from __ICFEDIT_region_ROM2_start__   to __ICFEDIT_region_ROM2_end__];// | mem:[from __region_FlexNVM_start__ to __region_FlexNVM_end__];//********
define region RAM_region   = mem:[from __ICFEDIT_region_RAM_start__   to __ICFEDIT_region_RAM_end__] | mem:[from __region_RAM2_start__ to __region_RAM2_end__];
 
define block CSTACK    with alignment = 8, size = __ICFEDIT_size_cstack__   { };
define block HEAP      with alignment = 8, size = __ICFEDIT_size_heap__     { };
 
initialize manually { readwrite };
initialize manually { section .data};
initialize manually { section .textrw };
do not initialize  { section .noinit };
 
define block CodeRelocate { section .textrw_init };
define block CodeRelocateRam { section .textrw };
place at address mem:__ICFEDIT_intvec_start__ { readonly section .intvec };
place at address mem:__ICFEDIT_cfm_start__ { readonly section .cfm };
place at address mem:__code_start__ { readonly section .noinit, block CodeRelocate, readonly object FlashProgramCheck.o, readonly object FlashProgramLongword.o, readonly object USB_ICP.o, readonly object USB_HID.o, readonly object Flash_InitD.o};
 
place in ROM_region   { readonly};
 
place in RAM_region   { readwrite, block CodeRelocateRam,
                        block CSTACK, block HEAP };
我知道答案 目前已有3人回答
回复

使用道具 举报

  • TA的每日心情
    开心
    2018-7-2 06:04
  • 签到天数: 1 天

    连续签到: 1 天

    [LV.1]初来乍到

    59

    主题

    2888

    帖子

    10

    金牌会员

    Rank: 6Rank: 6

    积分
    6020
    最后登录
    2020-9-28
    发表于 2013-12-30 17:28:07 | 显示全部楼层

    RE:Kinetic系列MCU KL25的ICF文件 求解释

    你好
    能否提供一下AN4764SW_Freescale_HID_Bootloader_r10哪里下载?
    该会员没有填写今日想说内容.
    回复 支持 反对

    使用道具 举报

  • TA的每日心情
    开心
    2018-7-2 06:04
  • 签到天数: 1 天

    连续签到: 1 天

    [LV.1]初来乍到

    59

    主题

    2888

    帖子

    10

    金牌会员

    Rank: 6Rank: 6

    积分
    6020
    最后登录
    2020-9-28
    发表于 2014-1-21 11:07:28 | 显示全部楼层

    回复:Kinetic系列MCU KL25的ICF文件 求解释

    推荐你看一下JiCheng的博客,里面有一篇关于icf文件的解析。
    blog.chinaaet.com/detail/27024.html
    该会员没有填写今日想说内容.
    回复 支持 反对

    使用道具 举报

    该用户从未签到

    10

    主题

    102

    帖子

    0

    中级会员

    Rank: 3Rank: 3

    积分
    413
    最后登录
    2016-12-7
    发表于 2015-3-28 17:24:50 | 显示全部楼层
    学习了,不知道哪里有介绍map文件的文章
    回复 支持 反对

    使用道具 举报

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

    本版积分规则

    关闭

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

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

    GMT+8, 2025-7-22 21:44 , Processed in 0.088545 second(s), 23 queries , MemCache On.

    Powered by Discuz! X3.4

    Copyright © 2001-2024, Tencent Cloud.

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