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.

AM2432: CCS, source code for disassembled code

Part Number: AM2432


[日本語]
SORTE_Gプログラムをデバッグしていた所、Disassemblyされたコードにソースコードには存在しないコードが挿入されていました。

現在、存在しないコードが挿入される原因が分かっていません。
なぜ、存在しないコードが挿入されているのでしょうか。
注記1:
 ビルドは以下の手順で行っています。
  1.SORTE_g_deviceをビルド(PRU0とPRU1)
  2.SORTE_g_masterをビルド
  3.SORTE_G_am243x-lp_r5fss0-0_freertos_ti-arm-clang(R5Fアプリケーション)をビルド
注記2;
 SORTE_g_device/SORTE_g_masterをビルドした時に作成されるヘッダファイル(SORTE_g_xxxxx_PRUx.h)は、
 SORTE_G_am243x-lp_r5fss0-0_freertos_ti-arm-clangにコピーされている事は確認いたしました。
注記3:
 SORTE_G_am243x-lp_r5fss0-0_freertos_ti-arm-clang内にあるSORTE_g_xxxxx_PRUx.hをCCS上で開き、
 SORTE_g_device/SORTE_g_masterをビルドした時に作成されるヘッダファイル(SORTE_g_xxxxx_PRUx.h)の内容を
 コピーしてからSORTE_G_am243x-lp_r5fss0-0_freertos_ti-arm-clangをビルドすると正常にDisassemblyされていました。

[English]
When I was debugging the SORTE_G program, I found that code that did not exist in the source code was inserted into the disassembled code.

It is currently unknown what causes the non-existent code to be inserted.
Why is non-existent code being inserted?
Note 1:
The build is performed using the following steps.
1.Build SORTE_g_device (PRU0 and PRU1)
2.Build SORTE_g_master
3. Build SORTE_G_am243x-lp_r5fss0-0_freertos_ti-arm-clang (R5F application)
Note 2;
We have confirmed that the header file (SORTE_g_xxxxx_PRUx.h) created when building SORTE_g_device/SORTE_g_master is copied to SORTE_G_am243x-lp_r5fss0-0_freertos_ti-arm-clang.
Note 3:
Open SORTE_g_xxxxx_PRUx.h in SORTE_G_am243x-lp_r5fss0-0_freertos_ti-arm-clang on CCS, copy the contents of the header file (SORTE_g_xxxxx_PRUx.h) created when building SORTE_g_device/SORTE_g_master, and then SORTE_G_am243x-l p_r5fss0-0_freertos_ti -When building arm-clang, it was disassembled normally.

  • Hi Shimizu-san,

    Typically this happens when source code symbols and real assembler code do not match.

    To avoid this, perform the following.

    1. Make sure that all assembler header files are copied over to the ARM project (you said that you did this, but I just added it here for completeness).

    2. Please re-build the ARM application, or clean it first and build it. Sometimes, when the ARM application was build, and only the PRU header files have been copied over, the ARM compiler does not detect the new assembly header files and think it does not need to build the application again.

    3. When you load the symbols, please make sure that you load the symbols from the correct PRU project (in case you have multiple development directories/branches).

    In case it still does not work, then do the following test to identify further root cause.

    a. When you are at this condition as shown in the screenshot, look at the program counter (PC) in the register view, and note it down

    b. Load the PRU assembler .out file into the PRU. It typically stops at main label.

    c. Set the PC counter to the value you have noted down in point (a)

    d. Does the source code now fit to the disassembly view?

    Regards,

     Thomas