Debugging GR-Peach

17 Jun 2016

developer.mbed.org/teams/Renesas/wiki/Exporting-to-e2studio-with-CMSIS_DAP-DBG

"Exporting to e2studio with CMSIS_DAP DBG"

\media\uploads\kg1\jlink_debug4s

This is satisfactory using GR-PEACH_blinky but needs the extra action "reset board". Stepping over lines (F6) is ok but why:

google search: openocd "cortex_a maskisr" ???

sourceforge.net/p/openocd/mailman/message/34601993/

github.com/mbedmicro/mbed/blob/master/workspace_tools/export/e2studio_rz_a1h_gdbinit.tmpl

devel.rtems.org/wiki/Debugging/OpenOCD/Xilinx_Zynq

The above links do not explain why this is necessary. Please explain. ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ developer.mbed.org/teams/Renesas/wiki/Exporting-to-e2studio-with-J_Link-debug

\media\uploads\kg1\jlink_debug9s

\media\uploads\kg1\jlink_debug5s

Should this run to the first statement in main.cpp?

Stepping over lines (F6) is ok. +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ developer.mbed.org/users/WiredHome/code/RA8875_Demo/

"simple demo program for a graphics library"

Using the online arm compiler this demo program compiles and runs on the GR-Peach.

The next step is to try this mbed demo program and debug it in e2studio:

\media\uploads\kg1\jlink_debug6s

\media\uploads\kg1\jlink_debug8s

\media\uploads\kg1\jlink_debug7s

With a little help (using F8) it runs to the first statement in main.cpp

Using F6 at this first statement it fails.

What modifications to the demo code are necessary to achieve the GR-Peach_blinky result?

+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

This item is available at:

https://developer.mbed.org/forum/platform-76-Renesas-GR-PEACH-community/topic/26212/?page=1#comment-50130

or at developer.mbed.org/forum/platforms/ -> GR-Peach and clicking on "days ago".

18 Jun 2016

Kevin

I am investigating this - Can SEGGERS JLink provide any insight about driver interface options. I dont have Zynq devices or access.

Thank You , I apologize I do not have any immediate answers.

Xtrm Designs LLC - grpeach

19 Jun 2016

Thank you for your reply. My original post was first released on 20 May 2016 after a very slow approval by support@mbed.org aka Austin Blackstone (mbed) due to "This post is awaiting moderation." I say "released" but in fact it has never appeared on develop.mbed.org If you go to developer.mbed.org/forum/platforms/ -> GR-Peach you will see that there has been 10 posts like mine. You will only find one posted called "Renesas sales". I am not the only user who has complained: https://developer.mbed.org/forum/bugs-suggestions/topic/26003/ (posted four months ago) So Renesas has had nine interested persons/organisations that from the customer's point of view, have been ignored.

With regard to debugging I believe the "fix" for (https://developer.mbed.org/teams/Renesas/wiki/Exporting-to-e2studio-with-CMSIS_DAP-DBG) OpenOCD is interfering with SEGGERS JLink ( https://developer.mbed.org/teams/Renesas/wiki/Exporting-to-e2studio-with-J_Link-debug ).

/media/uploads/kg1/debug-jlink.txt

With great disappointment, I can only advise others who wish to use mbed libraries not to consider GR-Peach.

Regards, Kevin Gordon.

19 Jun 2016

Kevin Gordon,

I understand and agree with your frustrations on this issue. So far this is what I have extracted from your organizations use case. - The Jlink path has several, at least five (5), limitations and constraints listed below in the following chart it may have more capability than the OpenOCD option. Without seeing an actual run with 6 breakpoints, connect/disconnect sequence on GR Peach board, etc its hard for me to discern which is the root cause of the reported issue. Its the weekend here and we will have more support as Monday 20 June rolls around.

/media/uploads/pateshian/checking_the_following_and_j_link_vs_mbed_org_seggers_gr-peach.pdf

20 Jun 2016

I have marked this post for "follow" hence I will check back for your future replies. I also have a logon for https://gcc-renesas.com/ Thank you.

20 Jun 2016

Hello Kevin,

[Q1]

This is satisfactory using GR-PEACH_blinky but needs the extra action
"reset board". Stepping over lines (F6) is ok but why:
google search: openocd "cortex_a maskisr" ???

[A1]

When Stepping over lines (F6) is done, script described in ".gdbinit" works the following sequence:

  1. interrupt mask on
  2. single stepping
  3. interrupt mask off

If Stepping over lines (F6) is done on the situation that the program breaks at break point and an interrupt request has set,
an interrupt hander will be called promptly, and after the handler the program returns to the address at which break-point is set. Then the program will break.

The program counter seems not to be changed after Stepping over lines (F6).

To avoid this, the script is described in ".gdbinit".

Same script works with following operation:
- step into (F5)
- step over (F6)
- step return (F7)

When you want to do "Resume" in the same situation, do "step" before doing "Resume".

If you do not need this, remove ".gdbinit" or rename it.

[Q2]

Should this run to the first statement in main.cpp?

[A2]

Select [Startup] tab of the [Debug configurations] and check [Resume] box.
Then, click [Apply] and [Debug].

After connecting GR-PEACH, your program will break at the begining of main() function.

I have updated https://developer.mbed.org/teams/Renesas/wiki/Exporting-to-e2studio-with-J_Link-debug.

[Q3]

What modifications to the demo code are necessary to achieve the GR-Peach_blinky result?

[A3]

GR-Peach_blinky needs no modification.

When I build the project below, compilation error occurs.
https://developer.mbed.org/users/WiredHome/code/RA8875_Demo/

Please share your project for GR-PEACH.

22 Jun 2016

Kevin Gordon,

We have a reply in review/moderation so it should be out soon. Very respectfully.

Xtrm DEsigns LLC GR-PEACH

11 Jul 2016

@Ryo Hagimoto Thank you for your answers. They were most helpful. I am struggling to understand A3. /media/uploads/kg1/robot4.zip Attached is a E-squared project file with the RA8875 library included. This project has the pins correctly set for GR-Peach. Is this what you meant by "shared"? I missed your reply because the mbed notification system is not good. If you wish please use gordonkevin117(at)gmail.com Many thanks, Kevin.