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.

debug 工程时报错,关于startup.c

一个spi的例程,debug后,全速跑起来后点选终止,会报错: cant find a source file at "D:/startware_gitorious_omapl138/startwarr_01_10_04_01/system_config/armv5/cgt/init.asm",我的工程里没有该路径,希望大家可以指点一下,还有另外一种报错,也是这个路径下,找不到startup.c

  • 改成您电脑上starterware的安装路径,或者说改成您电脑上init.asm所在的路径。
  • 谢谢您的回复。
    首先,我想问的是这个路径在哪里设置,我自己的电脑上没有“startware_gitorious_omapl138”这个文件夹,但是我在c盘ti文件夹“C:/ti/startware_01_10_04_01/system_config/armv5/cgt/init.asm”找到该文件,并添加近来。
    然后重新debug,跑到主循环里循环一次后,再次循环在断点不能停下,点击suspend后停在刚才添加进来的“init.asm”文件。
    118行~130行
    ; Enter the start_boot function. The execution still happens in system mode
    ;
    LDR r10, _start_boot ; Get the address of start_boot
    MOV lr,pc ; Dummy return
    BX r10 ; Branch to start_boot
    SUB pc, pc, #0x08 ; looping

    ; MSR cpsr_c, #MODE_SVC|I_F_BIT ; change to SVC mode
    ; BX lr
    ;
    ; End of the file
    ;
    请问这个是什么情况。
    我看这句话“ SUB pc, pc, #0x08 ; looping”,looping的意思貌似是在循环里,但是这句“Enter the start_boot function. The execution still happens in system mode”感觉应该程序启动后先运行init文件,但是我的情况好像相反,我已经跑进main函数,执行到while循环里,却跳转到这里,我很迷惑。请求赐教!
  • 您指的“一个spi的例程”是starterware里自带的例程吗?
  • 您好,不是的。