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.

CLA的函数调用问题

文档里说CLA 没有堆栈,不支持函数的嵌套,那请问CLA只允许调用一层函数吗?

  • CLA是汇编架构,且只支持中断任务,所以确实是没有堆栈的,但CLA C 编译器可以帮助实现C编程,但是有比较多的语言限制,不过C还是存在堆栈的,只是名字改成了sratchpad而已。

    比如你提到的,CLA只允许调用一个函数,该函数不能再嵌套调用其它函数,不过那是最开始的编译器版本的限制,后面的新编译器是可以支持无限层函数调用的,请参考下面链接的Function Nesting以及它提到的Function Structure and Calling Conventions 

    http://processors.wiki.ti.com/index.php/C2000_CLA_C_Compiler#Compiler_Conventions_and_Restrictions

    http://processors.wiki.ti.com/index.php/C2000_CLA_C_Compiler#Function_Structure_and_Calling_Conventions