This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

f28035 的高分辨率捕捉口HRcapture 的中断 配置出现"HRCap1RegsFile" without a SECTIONS的警告是为什么?

Other Parts Discussed in Thread: CCSTUDIO, CONTROLSUITE

我看了TI的Example_2803xHRCap_Capture_HRPwm的例程,然后根据上面的步骤逐渐对应给自己的程序中配置HRCAP1,当检测到下降沿的时候进入HRCAP1——ISR中断函数进行处理,我在DSP2803x_GlobalVariableDefs.c(原来没有如下代码)中加入如下代码时:

//----------------------------------------
#ifdef __cplusplus
#pragma DATA_SECTION("HRCap1RegsFile")
#else
#pragma DATA_SECTION(HRCap1Regs,"HRCap1RegsFile");
#endif
volatile struct HRCAP_REGS HRCap1Regs;

//----------------------------------------
#ifdef __cplusplus
#pragma DATA_SECTION("HRCap2RegsFile")
#else
#pragma DATA_SECTION(HRCap2Regs,"HRCap2RegsFile");
#endif
volatile struct HRCAP_REGS HRCap2Regs;

//----------------------------------------

我编译程序就出现以下警告

[Linking...] "C:\CCStudio_v3.3PLA\C2000\cgtools\bin\cl2000" -@"Debug.lkf"
<Linking>
warning: creating output section "HRCap1RegsFile" without a SECTIONS
   specification
warning: creating output section "HRCap2RegsFile" without a SECTIONS
   specification

请问专家这是为什么,具体怎样解决,谢谢!

  • CMD文件也要相应的增加HRCap1RegsFile和HRCap2RegsFile,在Non BIOS的CMD中增加。

    否则找不到对应Memroy的关系啊

  • 谢谢你的回复,可是我不知道怎么增加,刚才看着Non BIOS里面的其他代码,加了两句

    /*** Peripheral Frame 1 Register Structures ***/
       HRCap1RegsFile    : > HRCAP1,       PAGE = 1

       HRCap2RegsFile    : > HRCAP2,       PAGE = 1

    编译后,出来好多错误,

    [Linking...] "C:\CCStudio_v3.3PLA\C2000\cgtools\bin\cl2000" -@"Debug.lkf"
    <Linking>
    "E:\\epwm\\program\\20140110_Open_Branches\\3k-4k_TL2_Master\\branches\\DSP2803x_common\\cmd\\DSP2803x_Headers_nonBIOS.cmd", line 133: warning:
       memory range not found: HRCAP1 on page 1
    "E:\\epwm\\program\\20140110_Open_Branches\\3k-4k_TL2_Master\\branches\\DSP2803x_common\\cmd\\DSP2803x_Headers_nonBIOS.cmd", line 133: error:
       no valid memory range(NULL) available for placement of "HRCap1RegsFile"
    "E:\\epwm\\program\\20140110_Open_Branches\\3k-4k_TL2_Master\\branches\\DSP2803x_common\\cmd\\DSP2803x_Headers_nonBIOS.cmd", line 133: error:
       run placement fails for object "HRCap1RegsFile", size 0x20 (page 1)
    "E:\\epwm\\program\\20140110_Open_Branches\\3k-4k_TL2_Master\\branches\\DSP2803x_common\\cmd\\DSP2803x_Headers_nonBIOS.cmd", line 134: warning:
       memory range not found: HRCAP2 on page 1
    "E:\\epwm\\program\\20140110_Open_Branches\\3k-4k_TL2_Master\\branches\\DSP2803x_common\\cmd\\DSP2803x_Headers_nonBIOS.cmd", line 134: error:
       no valid memory range(NULL) available for placement of "HRCap2RegsFile"
    "E:\\epwm\\program\\20140110_Open_Branches\\3k-4k_TL2_Master\\branches\\DSP2803x_common\\cmd\\DSP2803x_Headers_nonBIOS.cmd", line 134: error:
       run placement fails for object "HRCap2RegsFile", size 0x20 (page 1)

    求高手指点这个怎么添加?非常感谢

     

  • 找出原因了,谢谢您的回复和指点,是我没有分配具体的地址,我的那个手册是之前的没有更新,在controlSUITE中重新找了一份手册,里面有HRCAP的register map,再次感谢您的支持

  • You are welcome.

    请在“问题是否被解答” 后面,点击“是” 进行确认,Thanks for your coopeartion.

  • 您好 我在官网中下载的例程中没有HRCAP的,您能给我发一份么?我的qq是28254927

  • 其实在TI 的control suit里面是有Hrcap的例程的。 

    只是在control suit里面直接搜不出来, 需要自己到 control suit的安装文件里面去找。  大致路径如下:

    C:\ti\controlSUITE\device_support\f2803x\v130\DSP2803x_examples_ccsv5\hrcap_capture_hrpwm