debug error: No source available for "main() at 0x24598"

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

debug error: No source available for "main() at 0x24598"

2,768 Views
liuxing_hu
Contributor III

MCU: s32k118

compiler: GNU C

Compiler IDE: S32DS PEMicro

When I click "debug" button, the follow error occur, debug configuration is in the attachment

can you help me solve this problem?

liuxing_hu_0-1629520957832.png

 

Debugger Console show the following information

GNU gdb (GNU Tools for ARM Embedded Processors) 7.8.0.20150604-cvs
Copyright (C) 2014 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "--host=i686-w64-mingw32 --target=arm-none-eabi".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word".


monitor selectcore 0
continue
Continuing.

Temporary breakpoint 1, 0x00023398 in main ()
No breakpoint number 2.

 

0 Kudos
15 Replies

2,751 Views
Senlent
NXP TechSupport
NXP TechSupport

Hi@liuxing_hu

      After referring to some of the answers, I feel that it is still a problem of project configuration. If the first answer does not solve your problem, you can send me your DEMO project and I will test it for you. Please let me know if there is any progress.

BR,

     Jim.

0 Kudos

2,754 Views
Senlent
NXP TechSupport
NXP TechSupport

Hi@liuxing_hu

       Is this your first time using it? Have you tried the official routines to run successfully? There are some official routines in the IDE. You can use the official routines to troubleshoot your project configuration errors.

Here is my Debug Information.

Senlent_1-1629685243569.png

 

If the official routine does not run successfully, it may be a problem with your OpenSDA, then you can refer to this answer.

https://community.nxp.com/t5/S32K/S32K148EVB-Dead-after-OpenSDA-Update-Need-help-to-recover/m-p/1205... 

BR!

      Jim.

0 Kudos

2,740 Views
liuxing_hu
Contributor III

Hello Jim

    this is a project created by other colleagues, I just used it.

    Maybe you miss my attachment, my debug is Multilink, not OpenSDA

    by the way, how to use the official routines to troubleshoot project configuration errors ?

0 Kudos

2,734 Views
Senlent
NXP TechSupport
NXP TechSupport

Hi@liuxing_hu

     我以为你用的是官方的开发板,官方的开发板是用的OpenSDA,IDE里面的例程和开发板是配套的. 如果你们自己的板子用的是PE的话,你和你同事确认下你们的IDE版本和配置之类的,看截图还是某些配置不对,先配置个简单的时钟和GPIO之类的,把编译环境跑通,之前遇到过相似的问题,好像是编译器开了优化等级导致不能调试。

 

 

0 Kudos

2,727 Views
liuxing_hu
Contributor III

Hello 

   目前这个工程是别人创建的,已经集成了很多东西,不好再回退。我也猜测是配置哪里有问题,所以在论坛里搜了好久也没有看到类似的问题,你说的编译器开了优化等级导致不能调试,是在哪里看?我也检查下

0 Kudos

2,725 Views
Senlent
NXP TechSupport
NXP TechSupport

Hi.

    工程属性里面,截图如下。

Senlent_0-1629706269601.png

我意思最简单的方法是,你先编写调试好最简单的一个demo程序,这个工程已经能够正常调试下载,然后再把你同事的工程文件一个一个移值进去。我这边没有PE,但是其实OpenSDA调试器是集成了PE的功能的,应该是一样的 ,PE和OpenSDA其实一样的,一家公司的。

之前一个人提问的答案,发给你也参考一下。

https://community.nxp.com/t5/LPCXpresso-IDE/I-get-a-message-that-reads-No-source-available-for-quot-... 

 

BR!

      Jim.

 

0 Kudos

2,722 Views
liuxing_hu
Contributor III

好的,我最后如果实在没办法就尝试下你说的办法,我现在Debug遇到了另外一个问题,如下图

liuxing_hu_0-1629710296863.png

红色的main.c文件路径不是我当前工程的main.c路径,我想把这个路径更新下,你知道在哪里更新这个错误的路径吗?

0 Kudos

2,719 Views
Senlent
NXP TechSupport
NXP TechSupport

Hi.

Senlent_1-1629713276682.png

 

上面是添加.h路径的,下面的是添加.c路径的,无效路径要删了,好像会报错。

祝好!

 

0 Kudos

2,712 Views
liuxing_hu
Contributor III

liuxing_hu_0-1629726127003.png

我的设置如上,下面是空的,上面的.h路径有空文件夹也不会报错,这里没有我之前问题的红色路径呢

我想问下如果建一个简单的工程移植的话,下图中的配置移不过去,只能再重新配置了吧?

liuxing_hu_1-1629726360001.png

 

0 Kudos

2,699 Views
Senlent
NXP TechSupport
NXP TechSupport

Hi,

   是的,你需要把每个引脚从新分配一下(中断什么的也要好好对照一下,以免你没配置),时钟什么的都需要注意下,剩下的模块一个一个对着抄就可以。

他是不是给你的不是工程导出的压缩包阿,感觉直接copy过来的吧,你让它导出工程给你,这样路径不会出错。导出流程是:点击工程,右键export,剩下的选Archive File就是导出压缩包,这样copy过去,再用import进来,一般就不会有什么路径的问题。

Senlent_1-1629766804427.png

多尝试熟悉一下IDE使用吧,要不然后面还是会遇到相似的问题,逃不过去的。

 

0 Kudos

2,697 Views
liuxing_hu
Contributor III

非常感谢你的回复,我也愿意花时间去配置,但我不知道从何开始,没有一个教程指导我一开始应该创建一个什么样的demo工程才能满足我的需求,我尝试去创建下图的example工程,可是编译过程中不断的报错,一开始是报main.c中的cpu.h找不到,等我把原工程里的cpu.h拷贝进去又报cpu.h里的一个头文件找不到,反正就是各种文件找不到,所以我就block住了,不知道怎么开始搭建一个简单的可以debug的工程,方便加微信帮忙吗?13147196344

liuxing_hu_0-1629767498645.png

 

 

0 Kudos

2,692 Views
Senlent
NXP TechSupport
NXP TechSupport

Hi.

      好吧,看来你之前没用过这个IDE,网上这个教程我看了有很多的,这里我不方便贴上第三方参考链接,你搜索S32K DS 教程有很多手把手教你配置的文章,我们工作环境用不了微信,在IDE路径下面也有入门的help文档,这是我的路径C:\NXP\S32DS_ARM_v2018.R1\S32DS\help\pdf。

      example工程完全不需要你自己手动添加文件之类的,你可能没有生成配置,导入以后,点击Generate一下,直接编译就ok了。

Senlent_0-1629768382782.png

 

0 Kudos

2,684 Views
liuxing_hu
Contributor III

非常感谢,那我就在这里和你沟通吧,我点击Generate之后,编译就ok了,但是我还有2个问题

1.help文件有提到怎么创建下图中的所有工程,但是下图中这么多工程,我不知道我该选哪一个创建

2.example工程如果想debug是用什么硬件呢?evb开发板吗?

liuxing_hu_0-1629792192737.png

 

0 Kudos

2,679 Views
Senlent
NXP TechSupport
NXP TechSupport

Hi.

     你选的这个就是对的,example工程是基于EVB开发的,debug的时候还是需要配合EVB开发板的,用在自己的开发板上还是需要修改一下的,但是难度都不大,上手入门挺简单的,不需要你配置复杂的寄存器。

0 Kudos

2,674 Views
liuxing_hu
Contributor III

我还是选的hello_world_s32k118的example工程文件,由于我没有EVB,需要基于自己的118板子调试,修改范围是哪些呢?下图是example工程的components,我是要把这每个都点开,对应我之前的工程设置一遍generate就可以了吗?

liuxing_hu_0-1629795445012.png

 

0 Kudos