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

2019-07-25 14:32发布

我使用的是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:programCCStudio_v3.3C2000cgtoolsincl2000" -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:programCCStudio_v3.3C2000cgtoolsincl2000" -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:programCCStudio_v3.3C2000cgtoolsincl2000" -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:programCCStudio_v3.3C2000cgtoolsincl2000" -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:programCCStudio_v3.3C2000cgtoolsincl2000" -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:programCCStudio_v3.3C2000cgtoolsincl2000" -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:programCCStudio_v3.3C2000cgtoolsincl2000" -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:programCCStudio_v3.3C2000cgtoolsincl2000" -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:programCCStudio_v3.3C2000cgtoolsincl2000" -@"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
友情提示: 此问题已得到解决,问题已经关闭,关闭后问题禁止继续编辑,回答。
该问题目前已经被作者或者管理员关闭, 无法添加新回复
19条回答
linhai2009
1楼-- · 2019-07-25 15:56
 精彩回答 2  元偷偷看……
linhai2009
2楼-- · 2019-07-25 17:35
下面是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_Headerscmd
//   
// 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_headerscmd 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
3楼-- · 2019-07-25 18:09
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.
//===========================================================================
*/
liliang9554
4楼-- · 2019-07-25 22:06
好长的码……
thf2008
5楼-- · 2019-07-26 03:56
好长的程序:dizzy:
thf2008
6楼-- · 2019-07-26 07:51
 精彩回答 2  元偷偷看……

一周热门 更多>