Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
HUOYU
Level 2
Level 2
10 replies posted 10 likes given 5 replies posted

Hi,

I used the TC275_OneEye oscilloscope code example in my project.

In the code, I use CPU0 as the oscilloscope and CPU1 to update the sampled data. The code in CPU0 is almost the same as in the code example, except that initSignals() has been cancelled.

In OneEye, I follow the PDF provided in the code sample. But it can not add signals to the oscilloscope, as shown in the following figure:

HUOYU_0-1704897464274.png

HUOYU_1-1704897487765.png

 

I don't know what caused it. Please help me!

ADS version: 1.9.20
OneEye version: 2.56

0 Likes
1 Solution
Kunqiao_L
Moderator
Moderator
Moderator
First like given 25 likes received 250 replies posted

Hi,

Please followed the last thread we had talked about. 

Could you firstly try the same code example and instruction as mentioned below and test it on OneEye? To see if it still has issue or not. Thanks

Infineon-AURIX_OneEye_DAS_Oscilloscope_1_KIT_TC275_LK-TR-Training-v01_00-EN.pdf 

View solution in original post

16 Replies
Kunqiao_L
Moderator
Moderator
Moderator
First like given 25 likes received 250 replies posted

Hi,

Please followed the last thread we had talked about. 

Could you firstly try the same code example and instruction as mentioned below and test it on OneEye? To see if it still has issue or not. Thanks

Infineon-AURIX_OneEye_DAS_Oscilloscope_1_KIT_TC275_LK-TR-Training-v01_00-EN.pdf 

Hi,

I ported my project to the code example and it worked.

I tried to change the file name:(fig 1)

    "SignalGenerator.h"-->" VCU_Osci.h"

    "SignalGenerator.c"-->" VCU_Osci.c"

HUOYU_0-1705314085247.png

In this case, a CPU trap was encountered while debugging the program(fig 2). This didn't happen to the program without changing the filename. CPU1 and CPU2 do not have any user code.

HUOYU_1-1705314105414.png

May I ask what causes this?

Thanks!

0 Likes
Kunqiao_L
Moderator
Moderator
Moderator
First like given 25 likes received 250 replies posted

Hi HUOYU,

Which project are you working on? If it is not example project, it is hard for us to duplicate issue for further support and our principle is also not support customer specific project that is mass changed.  You could send the whole project to us, if we can easily reproduce your issue.

Does the software normally run while not in the debug session?  It seems like the project or tool chain related issue. Nothing do with OneEyes right?

 

0 Likes

Hi Kunqiao_L,

The project I used is AURIX_OneEye_DAS_Oscilloscope_1_KIT_TC275_LK.

Before changing the filename, I think my program works:
    1. The LED light on the PCB blinks normally;
    2. The sampling value of ADC can be seen through OneEye;
    3. CAN communication sending and receiving are normal.

I also tend to think of Trap issues as more of a toolchain issue. 

I'd be happy to send you the whole project, But I will make some necessary adjustments to the program, such as CAN communication, for a few reasons. After changing the filename, the cropped project still ran into the same problem

Thanks!

0 Likes
Kunqiao_L
Moderator
Moderator
Moderator
First like given 25 likes received 250 replies posted

Hi,

We can't rebuild the project from ADS. Is there any special setting? Otherwise, we can't provide further debug or technical support.

0 Likes

Hi Kunqiao_L,

I didn't have any special Settings for my ADS. In fact, I used ADS directly after installing it.

I did two experiments below:
    1. Create a new workspace, import the project, and the project can be built.

    2.In the New workspace, I created "New AURIX Project" (fig 1)

HUOYU_1-1705650785733.png

and then

         1) delete the original" Cpu0_Main.c ", "Cpu1_Main.c", "Cpu2_Main.c" ;

         2) Copy the folders"User",

             "Libraries->OneEye ", 

            "Libraries-> OneEye ",

            "Libraries-> aurix_pin_mappings.c &. h ",

            "Libraries->pinmapper.pincfg ",

            "Libraries-> MUIR_VCU_V00_10.OneEye "to the new project(fig 2).

HUOYU_0-1705650678704.png

In this case, the project compiles normally. After changing the filename, the project still ran into the trap.

ADS Version : 1.9.20

OneEye Version: 2.56.0.202302101530

 

 

Thank you very much for your help!

0 Likes
Kunqiao_L
Moderator
Moderator
Moderator
First like given 25 likes received 250 replies posted

Hi,

You existing project seems like lost the toolchain path that's why it can't be rebuild from myside. Anyway, I created a new project and copy your changes file and now it compiles.

Unfortunately, I don't have TC275 on my hand, I will try it later. Could you re-describe how the trap begins? Like in the debug mode when you just click the run software?

 

Thanks

0 Likes

Hi Kunqiao_L,

Yes in debug mode, I just clicked to run the software.

The following screenshot shows what it looks like before I change the filename (SignalGenerator.c/.h). Everything (LED pin P32.3 & ADC & OneEye)works fine.

HUOYU_1-1705656726140.png

After changing the filename, 

    "SignalGenerator.h"-->" VCU_Osci.h"

    "SignalGenerator.c"-->" VCU_Osci.c"

HUOYU_2-1705657150914.png

click "rusume" to run software and it encountered a trap.

I've experimented with changing the filename to something else, such as "Ocsi.c/.h," and it worked. However, from my understanding, no matter how the file is changed, it should not affect the result.

Thank you very much for your help!

0 Likes
Kunqiao_L
Moderator
Moderator
Moderator
First like given 25 likes received 250 replies posted

I've experimented with changing the filename to something else, such as "Ocsi.c/.h," and it worked

-> Is trap only happened in the name of VCU_Osci.h/.c?  Which compiler are you using?

0 Likes

Is trap only happened in the name of VCU_Osci.h/.c?  Which compiler are you using?

--> I found a trap when the oscilloscope header file was under "VCU_main.h", like "VCU_Osci.h", "X_Osci".

HUOYU_0-1705661184568.png

The compiler I use is TASKING.

0 Likes
Kunqiao_L
Moderator
Moderator
Moderator
First like given 25 likes received 250 replies posted

Hi HUOYU,

A quick feedback, I have tested the TC27x board and duplicated the trap issue. Good finding, it seems like a linker or compiler issue. It happens when you rename SignalGenerator.c to other name like VCU_Osci.c while Osci.c works fine. Trap was happened in the function "readVADC_volt". For your quick fix would be rename the source file which not cause the trap. 

Let's see TASKING expert if he has some idea or not. 

 

 

 

0 Likes

Hi Kunqiao_L,

The code example Infineon-AURIX_OneEye_DAS_Oscilloscope_1_KIT_TC275_LK can be reproduced on my computer, OneEye also works as expected. 

About the trap, The following information is provided in TriCore® TC1.6P &TC1.6E Core Architecture 32-bit Unified Processor Core User Manual (Volume 1).pdf 

Class 2 — Instruction Errors

TIN 4(ALN) - Data Address Alignment 

HUOYU_0-1706683477396.png

If you have any suggestions or need me to cooperate with the test, please let me know.

Thanks!

 

0 Likes
Kunqiao_L
Moderator
Moderator
Moderator
First like given 25 likes received 250 replies posted

Hi,

This issue is different from what you first raise the question. We can close discussion from here.

I suggest you create a new community question for better tracking and add reference link to this ticket and also you could @ my name. And we will continue from there.

Of course, we will figure it out what is the root cause of it, I am working on it right now.

Thanks

Hi,

That's reasonable advice, and I'll take it.

0 Likes
Kunqiao_L
Moderator
Moderator
Moderator
First like given 25 likes received 250 replies posted

Hi @User13836 

 Could you help me check why this happened: One source file name is changed cause trap(VCU_Osci.c), while change to another name(VCU_Osci.c->Osci.c) it works fine and no trap happened. It seems like the order of the source file is different, and cause the location in the map file is different. Anything else would keep the same. 

See the project in the attachment, the source file locates in User/Src.VCU_Osci.c

Thanks

When the file name is changed, the link order of the object files does change too, since the Eclipse environment is sorting them by name. When the order of the input files does change, the linker output may change too since the linker processes the files from left to right and starts placing the sections. This behavior can only be prevented if the groups included in the linker LSL are explicitly selecting every section by its name and every section name is unique. Then it is possible to force the linker to create the same locate result, independent of the object file order.

But despite of the different locate result, the application should work. Since it does not you'll have to dive into the details to figure out which trap occurs and locate which instruction is causing the trap. This knowledge might help to explain the behavior and mitigate it.

Best regards,

Ulrich Kloidt
TASKING tools support