GR-PEACH is an Mbed enabled platform which combines the advantages of the Mbed ecosystem and Arduino UNO form factor.

Debugging GR-Peach

21 May 2016

https://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.png 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" ???

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

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

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

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

"Exporting to e2studio with J_Link debug" /media/uploads/kg1/jlink_debug9s.png

/media/uploads/kg1/jlink_debug5s.png

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

Stepping over lines (F6) is ok. +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ https://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.png

/media/uploads/kg1/jlink_debug8s.png

/media/uploads/kg1/jlink_debug7s.png

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?

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.

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.