The Code generated from S12ZVM_FOC run into error when debugging

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

The Code generated from S12ZVM_FOC run into error when debugging

Jump to solution
1,533 Views
jiangfeng
Contributor III

Hi, Dear Daniel

Thanks for your patience!

I have created a new project in CW10.7 and the put all the *h file and *.c file generated from S12ZVM_FOC into the project . After that I compile the project successfully, however, I run into an error when debugging.

Please help me.  Attached is the program

190065_190065.pngpastedImage_1.png

Original Attachment has been moved to: tt.rar

Labels (1)
1 Solution
1,078 Views
dumitru-daniel_
NXP Employee
NXP Employee

Hi jiangfeng‌,

That is not an error. It is a debugger normal behavior in case it does not finds the C source files.

The ControllerPIpAW is implemented as a function call from a library. That is why only the Disassembly view is visible.

The AMMCLIB is delivered in various forms: precompiled as binaries (free) or in source file format (need to buy it).

Since the toolbox comes with the free version of the AMMCLIB you can't see the C-code source file.

In case you have the AMMCLIB source file version - then you could use the "Edit Source Lookup Path" button to remap the build path from the library to the source file location. That way you will be able to debug through the C-code for the AMMCLIB code.

Hope this clarify your concerns.

Best regards,

Daniel

View solution in original post

0 Kudos
3 Replies
1,079 Views
dumitru-daniel_
NXP Employee
NXP Employee

Hi jiangfeng‌,

That is not an error. It is a debugger normal behavior in case it does not finds the C source files.

The ControllerPIpAW is implemented as a function call from a library. That is why only the Disassembly view is visible.

The AMMCLIB is delivered in various forms: precompiled as binaries (free) or in source file format (need to buy it).

Since the toolbox comes with the free version of the AMMCLIB you can't see the C-code source file.

In case you have the AMMCLIB source file version - then you could use the "Edit Source Lookup Path" button to remap the build path from the library to the source file location. That way you will be able to debug through the C-code for the AMMCLIB code.

Hope this clarify your concerns.

Best regards,

Daniel

0 Kudos
1,078 Views
jiangfeng
Contributor III

Hi, Daniel

My friend,

As a result of the use of codewarrior to download the program which can't run in debugging mode, so my program will not drive my motor spin?

0 Kudos
1,078 Views
dumitru-daniel_
NXP Employee
NXP Employee

Hi jiangfeng‌,

In general, the main difference between the application created, built & download with Matlab and the application built and download with CW/S32DS/any other IDE, consists in:

- linker command file: the one from Matlab is using a special memory arrangement to allow the download via RAppID boot loader and as consequence it expect some reserved areas

- startup up sequence (startup files) which is different. In the IDE, the debugger is performing additional steps to clear up the memory and will download the program&data sections. 

Therefore, you should consider these 2 main difference when you try to build and debug the application via an IDE like CW/S32DS/IAR/etc.

As rule of thumb, if the application works from Matlab/Simulink download via RAppID bootloader or OpenSDA, then in the IDE use case you should consider the modification highlighted above.

Hope this helps!

Daniel