我使用的是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
友情提示: 此问题已得到解决,问题已经关闭,关闭后问题禁止继续编辑,回答。
/*
// 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).
/*========================================================= */
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
/*ÏÂÃæÊÇÍâÉèÅäÖÃ*/
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 */
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. */
}
如果是单独一段超过的话会有错误,两段的和超过大小不知道会不会提示。
你看一下map文件,各段大小和使用情况
一周热门 更多>