查看: 5903|回复: 3

[MPC] MPC5604开发bootloader过程中遇到程序无法下载的问题

[复制链接]

该用户从未签到

1

主题

3

帖子

0

新手上路

Rank: 1

积分
25
最后登录
1970-1-1
发表于 2015-10-16 11:05:37 | 显示全部楼层 |阅读模式

MPC5604开发bootloader过程中,在MPC5604B_FLASH.lcf文件中修改了部分内容,导致程序无法下载,将MPC5604B_FLASH.lcf文件恢复成原来的,程序也能正常下载。(附1为lcf文件内容,附2为程序下载信息)

附1:MPC5604B_FLASH.lcf代码
/* Internal FLASH linker command file for MPC5604C                          */
/*                                                                          */
/*               512KB Flash, 40KB SRAM                                     */
/*                                                                          */
/* Intended to be used for the stationary example project.                  */
/*                                                                          */
/* VERSION:                                                                 */
/*                                                                          */

MEMORY
{
    /*FLASH: 0x00000000 - 0x00007FFFF*/

    /* Fixed location required for RCHW and program entry point. */
    resetvector:           org = 0x00000000,   len = 0x00000008

    /* Contains initializations from __ppc_eabi_init.c,
     MPC56xx_HWInit.c, MPC56xx_init_*.c and the entry point (__startup).
     */
    init:                           org = 0x00000020,   len = 0x00000FE0

     /* Contains interrupt branch tables for both core and INTC module
     and the ISR handlers code. Note, since the vector base address field
     of IVPR is defined within the range [0:19] the table must be loaded
     at an address aligned to 4K boundary.
     */
    exception_handlers:    org = 0x00001000,   len = 0x00001000

    /* Space allocated for user code and device initialization.
    ROM Image address should be set with the start address of this
    segment in order to instruct the runtime to initialize the
    static variables. All the section above are ignored for this action.
    Please see -romaddr linker option.*/
    internal_flash:        org = 0x00002000,   len = 0x00001000

    BOOT_FLASH:                           org = 0x00003000,   len = 0x00005000   

    APP_FLASH:             org = 0x00008000,   len = 0x00038000         /* Application code is from B0F1 */

    /* SRAM: 0x40000000 - 0x40009FFF */
    internal_ram:          org = 0x40000000,   len = 0x00004000        

    BOOT_RAM:                           org = 0x40004000,   len = 0x00003000
    CAN_TX_RAM:                           org = 0x40007800,   len = 0x00000400               
    CAN_RX_RAM:                           org = 0x40007C00,   len = 0x00000400               

    heap  :                org = 0x40008000,   len = 0x00001000
    stack :                org = 0x40009000,   len = 0x00001000

}

/* This will ensure the rchw and reset vector are not stripped by the linker */
FORCEACTIVE { "bam_rchw" "bam_resetvector" }

SECTIONS
{
    .__bam_bootarea LOAD (0x00000000): {} > resetvector

    GROUP : {
    /* Section used for initialization code: __ppc_eabi_init.c,
     MPC56xx_HWInit.c, MPC56xx_init_*.c and the entry point (__startup).
     */
      .init LOAD (0x00000020) : {}
      .init_vle (VLECODE) LOAD (_e_init) : {
        *(.init)
        *(.init_vle)
      }
    } > init

    GROUP : {
    /* Fixed length of 0x800 is required for core interrupt branch table.
    Core IVOR branch table entries must be aligned to 16 bytes.
    */
      .ivor_branch_table (VLECODE) LOAD (0x00001000) : {}

      /* ISR handlers code.*/
      .__exception_handlers  (VLECODE) LOAD (_e_ivor_branch_table) : {}
    } > exception_handlers

    GROUP  : {
      .text : {}
      .text_vle (VLECODE) ALIGN(0x08): {
         *(.text)
         *(.text_vle)
       }
       .rodata (CONST) : {
         *(.rdata)
         *(.rodata)
       }
       .ctors : {}
       .dtors : {}
       extab : {}
       extabindex : {}
    } > internal_flash

    .boot_flash (VLECODE) ALIGN(0x10) LOAD(0x00003000) :{} > BOOT_FLASH
    .app_flash (VLECODE) ALIGN(0x10) LOAD(0x00008000) :{} > APP_FLASH


    GROUP : {
       /* The INTC module for this device contains up to 221 IRQs.*/
       .__uninitialized_intc_handlertable ALIGN(2048) : {}
       .data   : {}
       .sdata  : {}
       .sbss   : {}
       .sdata2 : {}
       .sbss2  : {}
       .bss    : {}
    } > internal_ram
}

/* Freescale CodeWarrior compiler address designations */

_stack_addr = ADDR(stack)+SIZEOF(stack);
_stack_end  = ADDR(stack);
_heap_addr  = ADDR(heap);
_heap_end   = ADDR(heap)+SIZEOF(heap);


/* Exceptions Handlers Location (used in Exceptions.c IVPR initialization)*/

EXCEPTION_HANDLERS    = ADDR(exception_handlers);

/* L2 SRAM Location (used for L2 SRAM initialization) */

L2SRAM_LOCATION = 0x40000000;

附2:程序下载记录信息
Starting 3rd party flash programming...
GDI: Mtwks Callback(MTWKS_CB_PROJECTACCESS, Section : STARTUP, Entry : SPECIFY_NETWORKCARD_ENABLED, Value : 0, R) => DI_ERR_NONFATAL
INF: Copyright 2012 P&E Microcomputer Systems,Inc.
INF: Command Line :"E:\Freescale\CW MCU v10.6\eclipse\..\MCU\bin\de.exe" -noni -language en -ORBendPoint giop:tcp:127.0.0.1: -ORBtraceLevel 0
INF: CMD>RE
INF: Initializing.
INF: Target has been RESET and is active.
INF: CMD>CM E:\Freescale\CW MCU v10.6\MCU\bin\Plugins\support\EPPC\gdi\P&E\freescale_mpc5604b_1x32x128k_cflash.pcp
INF: Initializing.
INF: Initialized.
INF: ;version 1.11, 02/04/2014, Copyright P&E Microcomputer Systems, www.pemicro.com [560x_512k_cflash]
INF: ;device Freescale, MPC5604B, 1x32x128k, desc=CFlash
INF: ;begin_cs device=$00000000, length=$00080000, ram=$40000000
INF: Loading programming algorithm ...
INF: Done.
INF: CMD>EM
INF: Erasing.
INF: Module has been erased.
INF: CMD>PM
INF: Programming.
INF: Processing Object File Data ...
INF: Error during programming.
ERR: Error Programming flash of device
ERR: Error occured during Flash programming.
GDI: Mtwks Callback(MTWKS_CB_PROJECTACCESS, Section : DEFAULT, Entry : MODE11, Value : Unknown Processor, R) => DI_ERR_NONFATAL
GDI: Mtwks Callback(MTWKS_CB_PROJECTACCESS, Section : Unknown Processor, Entry : REGISTERMASK, Value : *.reg, R) => DI_ERR_NONFATAL
GDI: Mtwks Callback(MTWKS_CB_PROJECTACCESS, Section : Unknown Processor, Entry : RESETADDR, Value : -1007091700, R) => DI_ERR_NONFATAL
GDI: Mtwks Callback(MTWKS_CB_PROJECTACCESS, Section : Unknown Processor, Entry : WATCHADDR, Value : 0, R) => DI_ERR_NONFATAL
GDI: Mtwks Callback(MTWKS_CB_PROJECTACCESS, Section : Unknown Processor, Entry : FLASHALG, Value : , R) => DI_ERR_NONFATAL



我知道答案 目前已有3人回答
微信截图_20151016110256.png
回复

使用道具 举报

该用户从未签到

1

主题

3

帖子

0

新手上路

Rank: 1

积分
25
最后登录
1970-1-1
 楼主| 发表于 2015-10-16 13:05:54 | 显示全部楼层
整个工程可以编译通过,但是下载不了,总是报错~~在线等
回复 支持 反对

使用道具 举报

该用户从未签到

7

主题

250

帖子

0

高级会员

Rank: 4

积分
628
最后登录
2016-5-3
发表于 2015-10-16 20:10:23 | 显示全部楼层
貌似很高端啊,先留着备用
回复 支持 反对

使用道具 举报

  • TA的每日心情
    郁闷
    2019-3-2 02:12
  • 签到天数: 22 天

    连续签到: 1 天

    [LV.4]偶尔看看III

    5

    主题

    462

    帖子

    0

    金牌会员

    Rank: 6Rank: 6

    积分
    1539
    最后登录
    2022-8-25
    发表于 2015-10-16 22:10:10 | 显示全部楼层
    修改的肯定不对,或许修改的超出芯片的值了。
    该会员没有填写今日想说内容.
    回复 支持 反对

    使用道具 举报

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

    本版积分规则

    关闭

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

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

    GMT+8, 2025-7-22 10:20 , Processed in 0.092692 second(s), 25 queries , MemCache On.

    Powered by Discuz! X3.4

    Copyright © 2001-2024, Tencent Cloud.

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