Renesas RZ/N1S-DB Quick Start Manual Download Page 8

2.4  OpenOCD Debugger 

This section provides basic information on how to connect a debugger to the ARM Cortex A7 CPU 
on the board. The board uses an FTDI device to provide JTAG over USB which is supported via 
the 

OpenOCD

  software.  Note  that  openocd  v0.10.0  adds  support  for  MMU  address  translation 

and cache flushing which is required to debug the Linux kernel or other OS that uses the MMU to 
remap memory ranges. However, if you connect to the target after it has executed code to enable 
the MMU and cache, download performance will be significantly slower due to the MMU table look 
ups.  OpenOCD  v0.10.0  has  issues  debugging  ARM  Thumb2  code,  so  please  build  the  latest 
version. 

git clone  http://repo.or.cz/openocd.git 
cd openocd 
./bootstrap 
./configure --disable-jlink  
make clean 
make 
sudo make install 

OpenOCD provides a “gdbserver” so you can connect to Eclipse or other debuggers that supports 
this  protocol.  The  following  instructions  detail  how  to  connect  to  the  gdbserver  using  the  gdb 
command line debugger. 

Ensure switch SW5-6 is OFF and switch SW3 is OFF, i.e. away from the white bar. 

Below we show basic commands to get you started with GDB. Further details on using OpenOCD 
with GDB can be found at 

http://openocd.org/doc/html/GDB-and-OpenOCD.html

. 

Connect to the board using the configuration file provided by Renesas. This starts a GDBServer 
which  you  can  connect  to  from  gdb  or  any  other  debugger  that  supports  connecting  to  a 
GDBServer. 

openocd -f renesas-rzn1s-openocd.cfg 

In  a  separate  terminal,  you  can  now  connect  using  gdb.  Specify  the  U-Boot  elf  file  on  the 
command line. You can use the -tui option to show source code in a simplified GUI: 

arm-linux-gnueabihf-gdb -tui u-boot 

... 
(gdb) 

target remote localhost:3333

 

Read symbols from the ELF file specified on the gdb command line, u-boot in this example, and 
download the code to the RZ/N1 SRAM: 

(gdb) 

load 

Loading section .text, size 0x1ffc0 lma 0x200a0000 
... 
Start address 0x200a0000, load size 217553 

Note: The U-Boot elf file is actually different to the binary image, so download the binary 

(gdb) 

mon load_image u-boot.bin 0x200a0000 bin 

Step into the code: 

(gdb) 

Set a breakpoint at the start of a function: 

(gdb) 

b board_init 

Run the code until you hit a breakpoint: 

(gdb) 

 

Summary of Contents for RZ/N1S-DB

Page 1: ...on and is subject to change by Renesas Electronics Corp without notice Please review the latest information published by Renesas Electronics Corp through various means including the Renesas Technology Corp website http www renesas com www renesas com RZ N1S DB Board U Boot System on Chip Target Device RZ N1S R01QS0008EG0104 June 8 2018 Quick Start Guide ...

Page 2: ...of the binary payload the destination for the payload and optional signature information For the purposes of this document we assume that the device allows SPKGs without a signature Note The BootROM will only allow an SPKG payload to be written to internal SRAM as writing to QSPI is board specific Normally on the RZ N1S DB board when the board is reset the BootROM will load an SPKG from QSPI Typic...

Page 3: ...e board are shown below CN3 USB Function SW2 Boot Mode SW9 Soft Reset CN14 Power via USB CN7 Debug Connector SW5 Multiplexer Setup SW4 SW Dip Switch CN5 ETH5 CN1 ETH4 CN6 FTDI serial over USB FTDI JTAG over USB Power Connector SW3 SW1 RXCLK4 SW7 RXCLK5 SW12 SW10 SW11 ...

Page 4: ... Not used OFF Other switches Switch SW ON white bar SW OFF Default Setting SW3 JTAG Mode ARM Coresight Mode OFF SW10 Boot from NAND Boot from QSPI OFF SW11 LCD pull up LCD pull down ON SW12 LCD pull up LCD pull down ON SW1 RXCLK4 from PHY RXCLK4 from GPIO61 ON SW7 RXCLK5 from PHY RXCLK5 from GPIO61 ON Extension Board The relevant switches of the Extension Board are shown below CN15 CN16 PHY2 3 MDI...

Page 5: ...ports will exist The board uses the 3rd port for UART output at 115200 8 n 1 On Linux PCs if you have no other serial over USB devices attached this is accessed using dev ttyUSB2 If the board is powered by USB press switch SW9 to perform a soft reset If you wish to use Ethernet but do not have an Extension Board you can connect CN1 on the board to a dedicated Network Interface Card NIC on your PC ...

Page 6: ...oad U Boot to SRAM On your host PC run sudo dfu util D u boot rzn1s324 db bin spkg 4 U Boot should run and the RZ N1 serial port presents you with a console similar to this U Boot 2017 01 Model RZ N1S DB board DRAM 4 MiB MMC sdhci 0x40100000 0 SF Detected mx25l25635f with page size 256 Bytes erase size 64 KiB total 32 MiB mapped at 10000000 In serial 0x40060000 Out serial 0x40060000 Err serial 0x4...

Page 7: ...showing the following output on the terminal BOOTLOADER STAGE0 for RZN1 Boot source QSPI 00 BOOTLOADER STAGE0 Success Bootloader stage0 END Execute 2nd Stage Bootloader which has been loaded and verified U Boot 2017 01 Model RZ N1S DB board DRAM 4 MiB MMC sdhci 0x40100000 0 SF Detected mx25l25635f with page size 256 Bytes erase size 64 KiB total 32 MiB mapped at 10000000 In serial 0x40060000 Out s...

Page 8: ... Ensure switch SW5 6 is OFF and switch SW3 is OFF i e away from the white bar Below we show basic commands to get you started with GDB Further details on using OpenOCD with GDB can be found at http openocd org doc html GDB and OpenOCD html Connect to the board using the configuration file provided by Renesas This starts a GDBServer which you can connect to from gdb or any other debugger that suppo...

Page 9: ...RZ N1S DB Board U Boot ...

Reviews: