Crashes when executing APEX example on SBC-S32V234

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

Crashes when executing APEX example on SBC-S32V234

ソリューションへジャンプ
3,361件の閲覧回数
jorge_barrio
Contributor I

I am using S32 Design Studio Version: 3.2  to generate some examples and compiling them on a development board: SBC-S32V234. After installing different packages (please see installation details in image attached), I managed to successfully compile the APEX project (example apex2_add).

I am able to download the executable apex2_add.elf in the board and execute it, but it crashes straight away It crashes when executing function APEX_Init (). This is not crashing because I am trying to debug it from the IDE, this is crashing when I copy the executable to the board and try to execute it there as a normal executable. When it crashes  says: "segmentation fault". When I debugged I noticed that it crashes when executing the function global_hal_AllReset(0) inside the function APEX_Init().

I have to say that I have been trying many different configurations. The only time I managed to successfully compile and execute one demo example is when I downloaded VisionSDK_S32V2_RTM_1_4_1.bin and installed it. In that case, I defined the environment variables of my Ubuntu 16.04 computer shell to point to the compilers provided by this installation. I then compile the code in the folder "s32v234_sdk/demos/apex/apex_add/build-v234ce-gnu-linux-d" to successfully compile this example. Only in that case I managed to execute this example in the board successfully.

However the recommended S32 Design Studio IDE does not provide a good executable for this development board. I noticed that this IDE is using the VSDK_S32V2_RTM_1_3_0 instead of the latest RTM_1_4_1 which successfully compiled the demo codeas I mentioned before.

I wonder what I am missing here since I am not even able to successfully execute the demo code provided for version RTM_1_3_0 even though I point all compilers to the ones provided for that version. I guess I am missing some important settings. Please help!!

I would really appreciate some help with this since it is very frustrating and I have already run out of ideas.

Thank you very much in advance for your help.

タグ(4)
0 件の賞賛
返信
1 解決策
3,050件の閲覧回数
mikedoidge
NXP Employee
NXP Employee

Hi jorge.barrio@animal-dynamics.com‌,

My apologies about the delays in reply. I'm not sure about the approval requirement for your posts. I think maybe since it is late in the day here when we get your response that we don't have a chance to reply until the next day.

You are loading a BSP version onto an SD card which is installed to the board. This is where the incompatibility could occur. If you used a BSP from the v1.4 VSDK when you programmed the SD card, then it could cause an issue with the example project from the v1.3 VSDK. I have not tried this combination, so I cannot say for sure. What I do know is that the tool and the examples work well and that other customers have been successful in using them both. So I would like to be certain that this possible BSP mismatch is not the cause before I try to consider what else could be the issue for you. I know this board comes shipped with something already programmed to the SD card, but as they have made changes to that over time, I'm not confident that what you received is appropriate for the S32 Design Studio and VisionSDK example project use case. I think it may be a more basic BSP. So if you didn't update this then it could also be the cause of the issue.

I hope you will have some more patience with this and try to check this again.

Best Regards,

Mike

元の投稿で解決策を見る

6 返答(返信)
3,050件の閲覧回数
jorge_barrio
Contributor I

Dear mikedoidge‌,

First of all, thank you very much for your support and patience. We are trying to assess this product for our range of autonomous vehicles, but so far I have not been very successful to test it properly.

Now I have finally installed the recommended version 3.1(unfortunately this version was a bit difficult to find on the web since it came across version 3.2 in first place). Please see attached image with the version of the packages installed.

I have compile one the project example available to test if the system works. I have create the same project as in one of the videos apex2_orb_cv. I ran the executable in the board itself and through a remote connection in the IDE. The result in both cases is the same, the executable crashes at the very beginning while initialization of the APEX (inside APEX_Init function, while doing global_hal_AllReset(0) ).  Please see image attached where you can see the point where code crashes. I have also attached the content when it crashes while executing the code through the gdb debugger since it seems to provide additional information.

I have noticed in one of the videos that you are using a different development board that the one we have (SBC-S32V234)  while you are using a different one (S32V234EVB). Do I need to define some specific settings for our board when compiling the project since they might have slightly different configuration settings? This could be the reason to not be able to initialize the APEX properly?

Again thank you very much for your support.

Kind regards,

Jorge

root@s32v234sbc:~/vsdk# gdb apex2_orb_cv.elf
GNU gdb (GDB) 8.0.1
Copyright (C) 2017 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 "aarch64-fsl-linux".
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"...
Reading symbols from apex2_orb_cv.elf...done.
(gdb) run
Starting program: /home/root/vsdk/apex2_orb_cv.elf
warning: File "/lib/libthread_db-1.0.so" auto-loading has been declined by your `auto-load safe-path' set to "$debugdir:$datadir/auto-load".
To enable execution of this file add
add-auto-load-safe-path /lib/libthread_db-1.0.so
line to your configuration file "/home/root/.gdbinit".
To completely disable this security protection add
set auto-load safe-path /
line to your configuration file "/home/root/.gdbinit".
For more information about this security protection see the
"Auto-loading safe path" section in the GDB manual. E.g., run from the shell:
info "(gdb)Auto-loading safe path"
warning: Unable to find libthread_db matching inferior's thread library, thread debugging will not be available.

Program received signal SIGSEGV, Segmentation fault.
0x000000000041fba0 in global_hal_cmemIFReset (apexID=0)
at ../../../../../libs/apex/drivers/user/src/global_hal.cpp:120
120 ../../../../../libs/apex/drivers/user/src/global_hal.cpp: No such file or directory.

1.S32DS_version.PNG

2.CaptureIDE_Crash.PNG

0 件の賞賛
返信
3,050件の閲覧回数
mikedoidge
NXP Employee
NXP Employee

Hello jorge.barrio@animal-dynamics.com‌,

I have considered the scenario you have described. I think the most likely cause for the issue is due to incompatibility with the BSP. You have indicated that you can get it to work with the code from the VSDK v1.4, however, the S32 Design Studio is supporting VSDK 1.3. The BSP which is supported by the VSDK is included in the VSDK. If you use the VSDK v1.3, but the BSP from VSDK v1.4, then it is possible there are some changes to the APIs. So if you try to build and execute an example from VSDK v1.3, but you use the BSP which is supported by VSDK v1.4, then the same would be true. I would suggest that you check that you are using the correct BSP version with the VSDK in which it is supported.

Please let us know your findings.

Best Regards,

Mike

0 件の賞賛
返信
3,050件の閲覧回数
jorge_barrio
Contributor I

Hello mikedoidge

Thank you very much for your reply.

In my last email where I showed the version 3.1 installed and explained that the generated code does not run on the board. I already uninstalled all previous software used such as VSDK1.4 and previous S32DS version 3.2 which I also used on my first tests. I tried somehow have a clean install of the system to avoid problems, but still got issues. The generated code was still not  running on the development board.

As a last test, I have also install S32DS 3.1 in a fresh machine in case there was some old settings in my laptop which might have caused this issues. Unfortunately, I was also unsuccessful this time as well since the APU compiler fails to compile the code by generating some errors while compiling the solution. To be honest, I cannot see this working and I have tried so many different configurations. It will be a nice tool when it works, but at the moment it does not look good. In addition the communication to get some support is quite slow since every post needs to get approved before I can get any answer. If there was any way to speed up things I would be very graceful.

If you need to get some information from my computer to do further investigation, please let me know since I am happy to provided it to you. If getting the executable generated will help to find out what the problem might be I am also happy to send it through.

Kind regards,

Jorge

0 件の賞賛
返信
3,051件の閲覧回数
mikedoidge
NXP Employee
NXP Employee

Hi jorge.barrio@animal-dynamics.com‌,

My apologies about the delays in reply. I'm not sure about the approval requirement for your posts. I think maybe since it is late in the day here when we get your response that we don't have a chance to reply until the next day.

You are loading a BSP version onto an SD card which is installed to the board. This is where the incompatibility could occur. If you used a BSP from the v1.4 VSDK when you programmed the SD card, then it could cause an issue with the example project from the v1.3 VSDK. I have not tried this combination, so I cannot say for sure. What I do know is that the tool and the examples work well and that other customers have been successful in using them both. So I would like to be certain that this possible BSP mismatch is not the cause before I try to consider what else could be the issue for you. I know this board comes shipped with something already programmed to the SD card, but as they have made changes to that over time, I'm not confident that what you received is appropriate for the S32 Design Studio and VisionSDK example project use case. I think it may be a more basic BSP. So if you didn't update this then it could also be the cause of the issue.

I hope you will have some more patience with this and try to check this again.

Best Regards,

Mike

3,050件の閲覧回数
jorge_barrio
Contributor I

Hi mikedoidge

Your were right. I installed the BSP v1.3 on my sd-card (VisionSDK_S32V2_RTM_1_3_0_img_yocto) and that fixed the problem. Now I am able to successfully execute the compiled code in the IDE.

I think that the problem is that following the instructions on the tutorials I flashed the sd card with the latest BSP version available and I could not imagine that this would be the problem.

Thank you so much for all your support on this problem!

Kind regards,

Jorge

0 件の賞賛
返信
3,050件の閲覧回数
mikedoidge
NXP Employee
NXP Employee

Hello jorge.barrio@animal-dynamics.com‌,

As we indicated on your other thread on the same topic, https://community.nxp.com/message/1229168?commentID=1229168&et=watches.email.thread#comment-1229168, you have an invalid installation configuration. The Vision Extension Package for S32V2xx v.1.0.0 should be installed to S32 Design Studio v3.1. We have not updated it for v3.2 yet. Unfortunately, we cannot support issues reported for invalid installation configurations. Please try to install S32 Design Studio v3.1 and then the Vision Extension Package for S32V2xx v.1.0.0. Once you have done this and tried the example project in the correct installation configuration, please provide a reply on whether you continue to experience the issues you have reported here.

The S32 Design Studio does not support the VisionSDK_S32V2_RTM_1_4_1. When we add support for the VisionSDK within the S32 Design Studio v3.2, it will be for a later version and should be released in the new few months. For now, we support the VisionSDK v1.3 within the S32 Design Studio v3.1.

I suggest that you review the videos (S32DS - list of Videos ) and the tutorials (https://community.nxp.com/docs/DOC-342771 ) which have been provided and were conducted using the S32 Design Studio v3.1 with the Vision Extension Package for S32V2xx v.1.0.0 on the hardware SBC-S32V234. They work well and perhaps through them you will identify the cause of your issue.

Best Regards,

Mike

0 件の賞賛
返信