打印

2808编译成功,无法运行程序

[复制链接]
6758|25
手机看帖
扫描二维码
随时随地手机跟帖
跳转到指定楼层
楼主
linhai2009|  楼主 | 2009-11-3 13:16 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
我使用的是CCS3.3+补丁,仿真2808simulation形式,不连接仿真器。编译一个很简单的cputimer0中断导致GPIO端口反转的例子。使用的是2808头文件里面自带的“2808_RAM_lnk”这个cmd但是发现编译之后会有很多warning。但是我对比map检查了cmd没有问题,然后我就运行这个程序但是在加载out文件的时候出现了“Trouble Writing Memory Block at 0x3fb000 on Page 1 of Length 0x100: Cannot access memory address 0x3FB000”这个错误。希望大家帮忙分依稀下是哪里出现了问题?
对应的cmd上传到附件里面了。
下面是编译提示:
----------------------  2808_gpio_interrupt.pjt - Debug  ----------------------
[2808_gpio_interrupt.c] "E:\program\CCStudio_v3.3\C2000\cgtools\bin\cl2000" -g -pdsw225 -fr"E:/TMS320FXXX program/2808_GPIO_interrupt/2808_gpio_interrupt/Debug" -d"_DEBUG" -d"LARGE_MODEL" -ml -v28 -@"Debug.lkf" "2808_gpio_interrupt.c"
"2808_gpio_interrupt.c", line 42: warning: last line of file ends without a newline

[DSP280x_CpuTimers.c] "E:\program\CCStudio_v3.3\C2000\cgtools\bin\cl2000" -g -pdsw225 -fr"E:/TMS320FXXX program/2808_GPIO_interrupt/2808_gpio_interrupt/Debug" -d"_DEBUG" -d"LARGE_MODEL" -ml -v28 -@"Debug.lkf" "DSP280x_CpuTimers.c"

[DSP280x_DefaultIsr.c] "E:\program\CCStudio_v3.3\C2000\cgtools\bin\cl2000" -g -pdsw225 -fr"E:/TMS320FXXX program/2808_GPIO_interrupt/2808_gpio_interrupt/Debug" -d"_DEBUG" -d"LARGE_MODEL" -ml -v28 -@"Debug.lkf" "DSP280x_DefaultIsr.c"

[DSP280x_GlobalVariableDefs.c] "E:\program\CCStudio_v3.3\C2000\cgtools\bin\cl2000" -g -pdsw225 -fr"E:/TMS320FXXX program/2808_GPIO_interrupt/2808_gpio_interrupt/Debug" -d"_DEBUG" -d"LARGE_MODEL" -ml -v28 -@"Debug.lkf" "DSP280x_GlobalVariableDefs.c"

[DSP280x_Gpio.c] "E:\program\CCStudio_v3.3\C2000\cgtools\bin\cl2000" -g -pdsw225 -fr"E:/TMS320FXXX program/2808_GPIO_interrupt/2808_gpio_interrupt/Debug" -d"_DEBUG" -d"LARGE_MODEL" -ml -v28 -@"Debug.lkf" "DSP280x_Gpio.c"

[DSP280x_PieCtrl.c] "E:\program\CCStudio_v3.3\C2000\cgtools\bin\cl2000" -g -pdsw225 -fr"E:/TMS320FXXX program/2808_GPIO_interrupt/2808_gpio_interrupt/Debug" -d"_DEBUG" -d"LARGE_MODEL" -ml -v28 -@"Debug.lkf" "DSP280x_PieCtrl.c"

[DSP280x_PieVect.c] "E:\program\CCStudio_v3.3\C2000\cgtools\bin\cl2000" -g -pdsw225 -fr"E:/TMS320FXXX program/2808_GPIO_interrupt/2808_gpio_interrupt/Debug" -d"_DEBUG" -d"LARGE_MODEL" -ml -v28 -@"Debug.lkf" "DSP280x_PieVect.c"

[DSP280x_SysCtrl.c] "E:\program\CCStudio_v3.3\C2000\cgtools\bin\cl2000" -g -pdsw225 -fr"E:/TMS320FXXX program/2808_GPIO_interrupt/2808_gpio_interrupt/Debug" -d"_DEBUG" -d"LARGE_MODEL" -ml -v28 -@"Debug.lkf" "DSP280x_SysCtrl.c"

[Linking...] "E:\program\CCStudio_v3.3\C2000\cgtools\bin\cl2000" -@"Debug.lkf"
<Linking>
>> warning: creating output section CpuTimer2RegsFile without SECTIONS
            specification
>> warning: creating output section CpuTimer1RegsFile without SECTIONS
            specification
>> warning: creating output section FlashRegsFile without SECTIONS specification
>> warning: creating output section CpuTimer0RegsFile without SECTIONS
            specification
>> warning: creating output section CsmPwlFile without SECTIONS specification
>> warning: creating output section GpioIntRegsFile without SECTIONS
            specification

相关帖子

沙发
linhai2009|  楼主 | 2009-11-3 13:16 | 只看该作者
>> warning: creating output section SpicRegsFile without SECTIONS specification
>> warning: creating output section SpibRegsFile without SECTIONS specification
>> warning: creating output section ScibRegsFile without SECTIONS specification
>> warning: creating output section SpiaRegsFile without SECTIONS specification
>> warning: creating output section SciaRegsFile without SECTIONS specification
>> warning: creating output section CsmRegsFile without SECTIONS specification
>> warning: creating output section AdcMirrorFile without SECTIONS specification
>> warning: creating output section SpidRegsFile without SECTIONS specification
>> warning: creating output section XIntruptRegsFile without SECTIONS
            specification
>> warning: creating output section PieCtrlRegsFile without SECTIONS
            specification
>> warning: creating output section AdcRegsFile without SECTIONS specification
>> warning: creating output section ECap4RegsFile without SECTIONS specification
>> warning: creating output section ECap2RegsFile without SECTIONS specification
>> warning: creating output section ECap3RegsFile without SECTIONS specification
>> warning: creating output section ECap1RegsFile without SECTIONS specification
>> warning: creating output section GpioDataRegsFile without SECTIONS
            specification
>> warning: creating output section SysCtrlRegsFile without SECTIONS
            specification
>> warning: creating output section I2caRegsFile without SECTIONS specification
>> warning: creating output section EPwm1RegsFile without SECTIONS specification
>> warning: creating output section EPwm2RegsFile without SECTIONS specification
>> warning: creating output section EPwm3RegsFile without SECTIONS specification
>> warning: creating output section EPwm5RegsFile without SECTIONS specification
>> warning: creating output section EPwm4RegsFile without SECTIONS specification
>> warning: creating output section EPwm6RegsFile without SECTIONS specification
>> warning: creating output section ECanaRegsFile without SECTIONS specification
>> warning: creating output section ECanbRegsFile without SECTIONS specification
>> warning: creating output section ECanbLAMRegsFile without SECTIONS
            specification
>> warning: creating output section ECanaMOTORegsFile without SECTIONS
            specification
>> warning: creating output section ECanaLAMRegsFile without SECTIONS
            specification
>> warning: creating output section ECanaMOTSRegsFile without SECTIONS
            specification
>> warning: creating output section GpioCtrlRegsFile without SECTIONS
            specification
>> warning: creating output section ECanbMOTORegsFile without SECTIONS
            specification
>> warning: creating output section EQep1RegsFile without SECTIONS specification
>> warning: creating output section ECanbMOTSRegsFile without SECTIONS
            specification
>> warning: creating output section EQep2RegsFile without SECTIONS specification
>> warning: creating output section DevEmuRegsFile without SECTIONS
            specification
>> warning: creating output section PieVectTableFile without SECTIONS
            specification
>> warning: creating output section ECanbMboxesFile without SECTIONS
            specification
>> warning: creating output section ECanaMboxesFile without SECTIONS
            specification

Build Complete,
  0 Errors, 46 Warnings, 0 Remarks.

使用特权

评论回复
板凳
linhai2009|  楼主 | 2009-11-3 13:17 | 只看该作者
下面是cmd的内容:

/*
// TI File $Revision: /main/1 $
// Checkin $Date: September 16, 2005   13:06:33 $
//###########################################################################
//
// FILE:    2808_RAM_lnk.cmd
//
// TITLE:   Linker Command File For 2808 examples that run out of RAM
//
//          This ONLY includes all SARAM blocks on the 2808 device.
//          This does not include flash or OTP.
//
//          Keep in mind that L0 and L1 are protected by the code
//          security module.
//
//          What this means is in most cases you will want to move to
//          another memory map file which has more memory defined.  
//
//###########################################################################
// $TI Release: DSP280x V1.30 $
// $Release Date: February 10, 2006 $
//###########################################################################
*/

/* ======================================================
// For Code Composer Studio V2.2 and later
// ---------------------------------------
// In addition to this memory linker command file,
// add the header linker command file directly to the project.
// The header linker command file is required to link the
// peripheral structures to the proper locations within
// the memory map.
//
// The header linker files are found in <base>\DSP281x_Headers\cmd
//   
// For BIOS applications add:      DSP280x_Headers_BIOS.cmd
// For nonBIOS applications add:   DSP280x_Headers_nonBIOS.cmd   
========================================================= */

/* ======================================================
// For Code Composer Studio prior to V2.2
// --------------------------------------
// 1) Use one of the following -l statements to include the
// header linker command file in the project. The header linker
// file is required to link the peripheral structures to the proper
// locations within the memory map                                    */

/* Uncomment this line to include file only for non-BIOS applications */
/* -l DSP280x_Headers_nonBIOS.cmd */

/* Uncomment this line to include file only for BIOS applications */
/* -l DSP280x_Headers_BIOS.cmd */

/* 2) In your project add the path to <base>\DSP280x_headers\cmd to the
   library search path under project->build options, linker tab,
   library search path (-i).
/*========================================================= */

/* Define the memory block start/length for the F2808  
   PAGE 0 will be used to organize program sections
   PAGE 1 will be used to organize data sections

   Notes:
         Memory blocks on F2808 are uniform (ie same
         physical memory) in both PAGE 0 and PAGE 1.  
         That is the same memory region should not be
         defined for both PAGE 0 and PAGE 1.
         Doing so will result in corruption of program
         and/or data.
         
         L0/L1 and H0 memory blocks are mirrored - that is
         they can be accessed in high memory or low memory.
         For simplicity only one instance is used in this
         linker file.
         
         Contiguous SARAM memory blocks can be combined
         if required to create a larger memory block.
*/


MEMORY
{
PAGE 0 :
   /* For this example, H0 is split between PAGE 0 and PAGE 1 */  
   /* BEGIN is used for the "boot to SARAM" bootloader mode   */
   
   BEGIN      : origin = 0x000000, length = 0x000002            
   RAMM0      : origin = 0x000002, length = 0x0003FE
   RAML0      : origin = 0x008000, length = 0x001000   
   PRAMH0     : origin = 0x3FA000, length = 0x001000
   RESET      : origin = 0x3FFFC0, length = 0x000002
   BOOTROM    : origin = 0x3FF000, length = 0x000FC0

使用特权

评论回复
地板
linhai2009|  楼主 | 2009-11-3 13:17 | 只看该作者
PAGE 1 :

   /* For this example, H0 is split between PAGE 0 and PAGE 1 */

   RAMM1    : origin = 0x000400, length = 0x000400
   RAML1    : origin = 0x009000, length = 0x001000     
   DRAMH0   : origin = 0x3FB000, length = 0x001000         
}


SECTIONS
{
   /* Setup for "boot to SARAM" mode:
      The codestart section (found in DSP28_CodeStartBranch.asm)
      re-directs execution to the start of user code.  */
   codestart        : > BEGIN,     PAGE = 0
   ramfuncs         : > RAMM0      PAGE = 0  
   .text            : > PRAMH0,    PAGE = 0
   .cinit           : > RAMM0,     PAGE = 0
   .pinit           : > RAMM0,     PAGE = 0
   .switch          : > RAMM0,     PAGE = 0
   .reset           : > RESET,     PAGE = 0, TYPE = DSECT /* not used, */
   
   .stack           : > RAMM1,     PAGE = 1
   .ebss            : > DRAMH0,    PAGE = 1
   .econst          : > DRAMH0,    PAGE = 1      
   .esysmem         : > RAMM1,     PAGE = 1

   IQmath           : >  PRAMH0,   PAGE = 0
   IQmathTables     : >  BOOTROM, type = NOLOAD, PAGE = 0

     
}

/*
//===========================================================================
// End of file.
//===========================================================================
*/

使用特权

评论回复
5
liliang9554| | 2009-11-4 20:35 | 只看该作者
好长的码……

使用特权

评论回复
6
thf2008| | 2009-11-5 13:13 | 只看该作者
好长的程序:dizzy:

使用特权

评论回复
7
thf2008| | 2009-11-5 13:16 | 只看该作者
你使用了TI的外设寄存器文件库,但是cmd文件里面没有定义这些寄存器文件所在的section,你需要自己把这些寄存器文件对应的section定义加入到cmd中。

使用特权

评论回复
8
linhai2009|  楼主 | 2009-11-5 13:41 | 只看该作者
谢谢7楼的回复

使用特权

评论回复
9
linhai2009|  楼主 | 2009-11-5 13:42 | 只看该作者
这两天我改了一下,下面是我修改好的CMD文件,编译和链接已经没有问题了,但是下载程序还是有问题。
/*
// TI File $Revision: /main/1 $
// Checkin $Date: September 16, 2005   13:06:33 $
//###########################################################################
//
// FILE:    2808_RAM_lnk.cmd
//
// TITLE:   Linker Command File For 2808 examples that run out of RAM
//
//          This ONLY includes all SARAM blocks on the 2808 device.
//          This does not include flash or OTP.
//
//          Keep in mind that L0 and L1 are protected by the code
//          security module.
//
//          What this means is in most cases you will want to move to
//          another memory map file which has more memory defined.  
//
//###########################################################################
// $TI Release: DSP280x V1.30 $
// $Release Date: February 10, 2006 $
//###########################################################################
*/

/* ======================================================
// For Code Composer Studio V2.2 and later
// ---------------------------------------
// In addition to this memory linker command file,
// add the header linker command file directly to the project.
// The header linker command file is required to link the
// peripheral structures to the proper locations within
// the memory map.
//
// The header linker files are found in <base>\DSP281x_Headers\cmd
//   
// For BIOS applications add:      DSP280x_Headers_BIOS.cmd
// For nonBIOS applications add:   DSP280x_Headers_nonBIOS.cmd   
========================================================= */

/* ======================================================
// For Code Composer Studio prior to V2.2
// --------------------------------------
// 1) Use one of the following -l statements to include the
// header linker command file in the project. The header linker
// file is required to link the peripheral structures to the proper
// locations within the memory map                                    */

/* Uncomment this line to include file only for non-BIOS applications */
/* -l DSP280x_Headers_nonBIOS.cmd */

/* Uncomment this line to include file only for BIOS applications */
/* -l DSP280x_Headers_BIOS.cmd */

/* 2) In your project add the path to <base>\DSP280x_headers\cmd to the
   library search path under project->build options, linker tab,
   library search path (-i).
/*========================================================= */

使用特权

评论回复
10
linhai2009|  楼主 | 2009-11-5 13:42 | 只看该作者
/* Define the memory block start/length for the F2808  
   PAGE 0 will be used to organize program sections
   PAGE 1 will be used to organize data sections

   Notes:
         Memory blocks on F2808 are uniform (ie same
         physical memory) in both PAGE 0 and PAGE 1.  
         That is the same memory region should not be
         defined for both PAGE 0 and PAGE 1.
         Doing so will result in corruption of program
         and/or data.
         
         L0/L1 and H0 memory blocks are mirrored - that is
         they can be accessed in high memory or low memory.
         For simplicity only one instance is used in this
         linker file.
         
         Contiguous SARAM memory blocks can be combined
         if required to create a larger memory block.
*/


MEMORY
{
PAGE 0 :
   /* For this example, H0 is split between PAGE 0 and PAGE 1 */  
   /* BEGIN is used for the "boot to SARAM" bootloader mode   */
   
   BEGIN      : origin = 0x000000, length = 0x000002            
   RAMM0      : origin = 0x000002, length = 0x0003FE
   RAML0      : origin = 0x008000, length = 0x001000   
   PRAMH0     : origin = 0x3FA000, length = 0x001000
   RESET      : origin = 0x3FFFC0, length = 0x000002
   BOOTROM    : origin = 0x3FF000, length = 0x000FC0               

         
PAGE 1 :

   /* For this example, H0 is split between PAGE 0 and PAGE 1 */

   RAMM1    : origin = 0x000400, length = 0x000400
   RAML1    : origin = 0x009000, length = 0x001000     
   DRAMH0   : origin = 0x3FB000, length = 0x001000
   /*&Iuml;&Acirc;&Atilde;&aelig;&Ecirc;&Ccedil;&Iacute;&acirc;&Eacute;è&Aring;&auml;&Ouml;&Atilde;*/
   DEV_EMU     : origin = 0x000880, length = 0x000180     /* device emulation registers */
   FLASH_REGS  : origin = 0x000A80, length = 0x000060     /* FLASH registers */
   CSM         : origin = 0x000AE0, length = 0x000010     /* code security module registers */
   
   ADC_MIRROR  : origin = 0x000B00, length = 0x000010     /* ADC Results register mirror */
   
   CPU_TIMER0  : origin = 0x000C00, length = 0x000008     /* CPU Timer0 registers */
   CPU_TIMER1  : origin = 0x000C08, length = 0x000008     /* CPU Timer0 registers (CPU Timer1 & Timer2 reserved TI use)*/
   CPU_TIMER2  : origin = 0x000C10, length = 0x000008     /* CPU Timer0 registers (CPU Timer1 & Timer2 reserved TI use)*/

   PIE_CTRL    : origin = 0x000CE0, length = 0x000020     /* PIE control registers */
   PIE_VECT    : origin = 0x000D00, length = 0x000100     /* PIE Vector Table */

   ECANA       : origin = 0x006000, length = 0x000040     /* eCAN-A control and status registers */
   ECANA_LAM   : origin = 0x006040, length = 0x000040     /* eCAN-A local acceptance masks */
   ECANA_MOTS  : origin = 0x006080, length = 0x000040     /* eCAN-A message object time stamps */
   ECANA_MOTO  : origin = 0x0060C0, length = 0x000040     /* eCAN-A object time-out registers */
   ECANA_MBOX  : origin = 0x006100, length = 0x000100     /* eCAN-A mailboxes */

   ECANB       : origin = 0x006200, length = 0x000040     /* eCAN-B control and status registers */
   ECANB_LAM   : origin = 0x006240, length = 0x000040     /* eCAN-B local acceptance masks */
   ECANB_MOTS  : origin = 0x006280, length = 0x000040     /* eCAN-B message object time stamps */
   ECANB_MOTO  : origin = 0x0062C0, length = 0x000040     /* eCAN-B object time-out registers */
   ECANB_MBOX  : origin = 0x006300, length = 0x000100     /* eCAN-B mailboxes */

使用特权

评论回复
11
linhai2009|  楼主 | 2009-11-5 13:42 | 只看该作者
EPWM1       : origin = 0x006800, length = 0x000022     /* Enhanced PWM 1 registers */
   EPWM2       : origin = 0x006840, length = 0x000022     /* Enhanced PWM 2 registers */
   EPWM3       : origin = 0x006880, length = 0x000022     /* Enhanced PWM 3 registers */
   EPWM4       : origin = 0x0068C0, length = 0x000022     /* Enhanced PWM 4 registers */
   EPWM5       : origin = 0x006900, length = 0x000022     /* Enhanced PWM 5 registers */
   EPWM6       : origin = 0x006940, length = 0x000022     /* Enhanced PWM 6 registers */

   ECAP1       : origin = 0x006A00, length = 0x000020     /* Enhanced Capture 1 registers */
   ECAP2       : origin = 0x006A20, length = 0x000020     /* Enhanced Capture 2 registers */
   ECAP3       : origin = 0x006A40, length = 0x000020     /* Enhanced Capture 3 registers */
   ECAP4       : origin = 0x006A60, length = 0x000020     /* Enhanced Capture 4 registers */         

   EQEP1       : origin = 0x006B00, length = 0x000040     /* Enhanced QEP 1 registers */
   EQEP2       : origin = 0x006B40, length = 0x000040     /* Enhanced QEP 2 registers */   

   GPIOCTRL    : origin = 0x006F80, length = 0x000040     /* GPIO control registers */
   GPIODAT     : origin = 0x006FC0, length = 0x000020     /* GPIO data registers */
   GPIOINT     : origin = 0x006FE0, length = 0x000020     /* GPIO interrupt/LPM registers */
                 
   SYSTEM      : origin = 0x007010, length = 0x000020     /* System control registers */
   SPIA        : origin = 0x007040, length = 0x000010     /* SPI-A registers */
   SCIA        : origin = 0x007050, length = 0x000010     /* SCI-A registers */
   XINTRUPT    : origin = 0x007070, length = 0x000010     /* external interrupt registers */

   ADC         : origin = 0x007100, length = 0x000020     /* ADC registers */
   SPIB        : origin = 0x007740, length = 0x000010     /* SPI-B registers */

   SCIB        : origin = 0x007750, length = 0x000010     /* SCI-B registers */
   SPIC        : origin = 0x007760, length = 0x000010     /* SPI-C registers */

   SPID        : origin = 0x007780, length = 0x000010     /* SPI-D registers */
   
   I2CA        : origin = 0x007900, length = 0x000040     /* I2C-A registers */
   
   CSM_PWL     : origin = 0x3F7FF8, length = 0x000008     /* Part of FLASHA.  CSM password locations. */         
}

使用特权

评论回复
12
linhai2009|  楼主 | 2009-11-5 13:43 | 只看该作者
SECTIONS
{
   /* Setup for "boot to SARAM" mode:
      The codestart section (found in DSP28_CodeStartBranch.asm)
      re-directs execution to the start of user code.  */
   codestart        : > BEGIN,     PAGE = 0
   ramfuncs         : > RAMM0      PAGE = 0  
   .text            : > PRAMH0,    PAGE = 0
   .cinit           : > RAMM0,     PAGE = 0
   .pinit           : > RAMM0,     PAGE = 0
   .switch          : > RAMM0,     PAGE = 0
   .reset           : > RESET,     PAGE = 0, TYPE = DSECT /* not used, */
   
   .stack           : > RAMM1,     PAGE = 1
   .ebss            : > DRAMH0,    PAGE = 1
   .econst          : > DRAMH0,    PAGE = 1      
   .esysmem         : > RAMM1,     PAGE = 1

/*&Iuml;&Acirc;&Atilde;&aelig;&Ecirc;&Ccedil;&Iacute;&acirc;&Eacute;è·&Ouml;&Aring;&auml; */
PieVectTableFile : > PIE_VECT,   PAGE = 1

/*** Peripheral Frame 0 Register Structures ***/
   DevEmuRegsFile    : > DEV_EMU,     PAGE = 1
   FlashRegsFile     : > FLASH_REGS,  PAGE = 1
   CsmRegsFile       : > CSM,         PAGE = 1
   AdcMirrorFile     : > ADC_MIRROR,  PAGE = 1   
   CpuTimer0RegsFile : > CPU_TIMER0,  PAGE = 1
   CpuTimer1RegsFile : > CPU_TIMER1,  PAGE = 1
   CpuTimer2RegsFile : > CPU_TIMER2,  PAGE = 1  
   PieCtrlRegsFile   : > PIE_CTRL,    PAGE = 1      

/*** Peripheral Frame 1 Register Structures ***/
   ECanaRegsFile     : > ECANA,       PAGE = 1
   ECanaLAMRegsFile  : > ECANA_LAM    PAGE = 1   
   ECanaMboxesFile   : > ECANA_MBOX   PAGE = 1
   ECanaMOTSRegsFile : > ECANA_MOTS   PAGE = 1
   ECanaMOTORegsFile : > ECANA_MOTO   PAGE = 1
   
   ECanbRegsFile     : > ECANB,       PAGE = 1
   ECanbLAMRegsFile  : > ECANB_LAM    PAGE = 1   
   ECanbMboxesFile   : > ECANB_MBOX   PAGE = 1
   ECanbMOTSRegsFile : > ECANB_MOTS   PAGE = 1
   ECanbMOTORegsFile : > ECANB_MOTO   PAGE = 1
   
   EPwm1RegsFile     : > EPWM1        PAGE = 1   
   EPwm2RegsFile     : > EPWM2        PAGE = 1   
   EPwm3RegsFile     : > EPWM3        PAGE = 1   
   EPwm4RegsFile     : > EPWM4        PAGE = 1   
   EPwm5RegsFile     : > EPWM5        PAGE = 1   
   EPwm6RegsFile     : > EPWM6        PAGE = 1
   
   ECap1RegsFile     : > ECAP1        PAGE = 1   
   ECap2RegsFile     : > ECAP2        PAGE = 1   
   ECap3RegsFile     : > ECAP3        PAGE = 1   
   ECap4RegsFile     : > ECAP4        PAGE = 1

   EQep1RegsFile     : > EQEP1        PAGE = 1   
   EQep2RegsFile     : > EQEP2        PAGE = 1               

   GpioCtrlRegsFile  : > GPIOCTRL     PAGE = 1
   GpioDataRegsFile  : > GPIODAT      PAGE = 1
   GpioIntRegsFile   : > GPIOINT      PAGE = 1
   
/*** Peripheral Frame 2 Register Structures ***/
   SysCtrlRegsFile   : > SYSTEM,      PAGE = 1
   SpiaRegsFile      : > SPIA,        PAGE = 1
   SciaRegsFile      : > SCIA,        PAGE = 1
   XIntruptRegsFile  : > XINTRUPT,    PAGE = 1
   AdcRegsFile       : > ADC,         PAGE = 1
   SpibRegsFile      : > SPIB,        PAGE = 1
   ScibRegsFile      : > SCIB,        PAGE = 1
   SpicRegsFile      : > SPIC,        PAGE = 1
   SpidRegsFile      : > SPID,        PAGE = 1
   I2caRegsFile      : > I2CA,        PAGE = 1
               
/*** Code Security Module Register Structures ***/
   CsmPwlFile        : > CSM_PWL,     PAGE = 1
/*IQmath*/   
   IQmath           : >  PRAMH0,   PAGE = 0
   IQmathTables     : >  BOOTROM, type = NOLOAD, PAGE = 0

     
}

/*
//===========================================================================
// End of file.
//===========================================================================
*/
问题和之前的一样还是0X3FB000这个地址没有办法下载内容,但是这个地址明明就是我定义好的数据段呀,而且我检查了v2808的map,其中0x3fa000~0x3fc000都是sram,我将前一半放到了程序段,后一般放到了数据段,这样应该没有问题吧?

使用特权

评论回复
13
thf2008| | 2009-11-6 10:47 | 只看该作者
或者是.ebss     .econst这两段的内容加起来超过了DRAMH0的大小。
如果是单独一段超过的话会有错误,两段的和超过大小不知道会不会提示。
你看一下map文件,各段大小和使用情况

使用特权

评论回复
14
linhai2009|  楼主 | 2009-11-6 11:02 | 只看该作者
我都没有使用仿真器仅仅是电脑的sim仿真,因此不存在芯片的问题。只能单独看看是不是超过了这个范围。不过应该不会,我的程序非常简单。几乎和例程里面的cpu_timer0一样小,因此不可能会出现不够的情况呀?

使用特权

评论回复
15
thf2008| | 2009-11-7 23:30 | 只看该作者
我在打开软件的时候就提示错误了。可能我配置不对,以前没用过软件仿真。是不是你的也有这个问题?
都要设置什么啊

使用特权

评论回复
16
thf2008| | 2009-11-7 23:31 | 只看该作者
Trouble Writing Memory Block at 0x3fa442 on Page 0 of Length 0x442: Cannot access memory address 0x3FA000
我的是这样的提示
于是我把有关H0的部分都改到L0 和L1就没问题了

使用特权

评论回复
17
thf2008| | 2009-11-7 23:31 | 只看该作者
软仿真的存储器地址分配不同,具体有什么区别我还没找到,
需要重新定义cmd,虽然编译没错,但是不能运行。
在软件仿真下,程序代码存储区好像必须设置在1000h以后。
而程序复位必须设置为:VECS:origin =0h
有待证实

使用特权

评论回复
18
linhai2009|  楼主 | 2009-11-8 00:20 | 只看该作者
之前也没有做过单纯的软件仿真,都是在开发板上跑程序,我上面的设置在开发板上没有问题。估计就是地址分配的问题。唉还得查查资料。

使用特权

评论回复
19
linhai2009|  楼主 | 2009-11-8 09:54 | 只看该作者
刚才尝试着修改了一下,可以运行,load也没有问题。不过程序会停在关闭看门狗那句上,有一个while循环,等待标志位置一,因此我怀疑还是编译CCS设置的问题吧?又或者CCS本身只能最编译的检查而不能真正的仿真出结果??这个太奇怪了吧?估计还是设置有问题,希望有哪位用过2808的simulator模式的朋友能指导一下。

使用特权

评论回复
20
thf2008| | 2009-11-8 09:55 | 只看该作者
我两种simulator都用过了,我觉得还是跟地址分配有关,程序会停留在初始化阶段,就是某个地址不对,没法初始化。

使用特权

评论回复
发新帖 我要提问
您需要登录后才可以回帖 登录 | 注册

本版积分规则

191

主题

1930

帖子

2

粉丝