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.

[参考译文] TMS320F28379D:将 ramfuncs:转换为 TI.ramfunc

Guru**** 2465890 points
Other Parts Discussed in Thread: SYSBIOS

请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

https://e2e.ti.com/support/microcontrollers/c2000-microcontrollers-group/c2000/f/c2000-microcontrollers-forum/1400406/tms320f28379d-convert-ramfuncs-to-ti-ramfunc

器件型号:TMS320F28379D
Thread 中讨论的其他器件:SYSBIOS

工具与软件:

大家好、我有一个旧工程、其中 ramfuncs 段如下所示、我想迁移 usinf TI.ramfunc

SECTIONS
{
   ramfuncs:            LOAD = FLASHB | FLASHC | FLASHD | FLASHE PAGE = 0, ALIGN(8)
                        RUN = RAMGS0123_DMA
                        LOAD_START(_RamfuncsLoadStart)
                        LOAD_SIZE(_RamfuncsLoadSize)
                        RUN_START(_RamfuncsRunStart)
                        {
                          //*(.text:_SCOPE_func1)
                          *(.text:_xdc_runtime_Timestamp_get32__F)
                          //*(.text:_ti_sysbios_family_c28_TimestampProvider_get32__E)
                          *(.text:_ti_sysbios_family_c28_Timer_getExpiredCounts__E)
                          *(.text:_ti_sysbios_family_c28_Hwi_getInterruptFlag__E)
                          //*(.text:_xdc_runtime_Timestamp_SupportProxy_get32__E)
                          *(.text:_ti_sysbios_family_c28_Hwi_switchAndDispatch__I)
                          *(.text:_ti_sysbios_family_c28_Hwi_dispatchCore__I)
                        }
}

以下代码尝试失败:

SECTIONS
{
 
 
      .TI.ramfunc : {} LOAD = FLASHB | FLASHC | FLASHD | FLASHE,
                             RUN = RAMGS0123_DMA,
                             LOAD_START(_RamfuncsLoadStart),
                             LOAD_SIZE(_RamfuncsLoadSize),
                             LOAD_END(_RamfuncsLoadEnd),
                             RUN_START(_RamfuncsRunStart)
                          {
                            //*(.text:_SCOPE_func1)
                            *(.text:_xdc_runtime_Timestamp_get32__F)
                            //*(.text:_ti_sysbios_family_c28_TimestampProvider_get32__E)
                            *(.text:_ti_sysbios_family_c28_Timer_getExpiredCounts__E)
                            *(.text:_ti_sysbios_family_c28_Hwi_getInterruptFlag__E)
                            //*(.text:_xdc_runtime_Timestamp_SupportProxy_get32__E)
                            *(.text:_ti_sysbios_family_c28_Hwi_switchAndDispatch__I)
                            *(.text:_ti_sysbios_family_c28_Hwi_dispatchCore__I)
                          },                          
                             RUN_SIZE(_RamfuncsRunSize),
                             RUN_END(_RamfuncsRunEnd),
                             PAGE = 0, ALIGN(8)
}

它可以编译但退出代码(中止)。 这是发生了特别与 XDC ... 和 ti_sysbios 行已启用。

我已经尝试了评论所有这些和程序运行良好。

此外、我尝试使用__ atribulte__((ramfunc))将函数 scope_func1添加到 RAM 中、构建和运行很好:


欢迎提供任何帮助  

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    我忘记添加这样一点:如果我只对*(.text:_scope_func1) 取消了注释、那么我会收到以下警告:
    警告#10068-D:无匹配部分

    这就是为什么我尝试使用 __ atribulte__(ramfunc)。 但最好将每个函数都包含在链接器文件中