Difference between revisions of "Using RTT on RZ A1H"

From SEGGER Wiki
Jump to: navigation, search
Line 43: Line 43:
   
 
''Setup\sram_placement.xml'':
 
''Setup\sram_placement.xml'':
  +
<Root name="SRAM Section Placement">
 
  +
<Root name="SRAM Section Placement">
[...]
 
  +
[...]
<MemorySegment name="$(ISRAM_NAME:Internal SRAM);SRAM;SDRAM;DRAM">
 
  +
<MemorySegment name="$(ISRAM_NAME:Internal SRAM);SRAM;SDRAM;DRAM">
<ProgramSection load="Yes" name=".vectors" />
 
<ProgramSection alignment="4" load="Yes" name=".fast" />
+
<ProgramSection load="Yes" name=".vectors" />
  +
<ProgramSection alignment="4" load="Yes" name=".fast" />
</MemorySegment>
 
<MemorySegment name="RTT_AREA">
+
</MemorySegment>
  +
<MemorySegment name="RTT_AREA">
<ProgramSection alignment="4" load="No" name=".bss._SEGGER_RTT" />
 
<ProgramSection alignment="4" load="No" name=".bss._acUpBuffer" />
+
<ProgramSection alignment="4" load="No" name=".bss._SEGGER_RTT" />
<ProgramSection alignment="4" load="No" name=".bss._acDownBuffer" />
+
<ProgramSection alignment="4" load="No" name=".bss._acUpBuffer" />
  +
<ProgramSection alignment="4" load="No" name=".bss._acDownBuffer" />
</MemorySegment>
 
  +
</MemorySegment>
</Root>
 
  +
</Root>

Revision as of 19:05, 1 February 2016

This page explains how to use SEGGER Real-Time-Terminal (RTT) on the Renesas RZ/A1H family devices. As the setup on the target project side is slightly different from IDE to IDE, in the following some sample setups for different IDEs are explained.

SEGGER Embedded Studio

There is a sample project for Embedded Studio available that demonstrates how to configure the project + target application for using RTT with Renesas RZ/A1H on a RSK-RZA1H starter kit. The sample project can be downloaded here: xxxxxxxxxxxxxxxxxxxxxxx The sample project is based on a generic SEGGER embOS trial start project for the Renesas RSK-RZA1H starter kit with some modifications to make it usable with RTT.

Minimum requirements

The following are the minimum requirements to use RTT on the Renesas RZ:

  • Embedded Studio V2.14 or later
  • A current J-Link model
  • J-Link software V5.11d (beta), V5.20 (release) or later

Specifics modifications in sample project

In the following, the specific modifications that have been performed on the example project, are explained.

MMU configuration

The RTT control block as well as the RTT buffers have to be located in a uncached memory region for which physical address is identical to the virtual address. The MMU configuration functions of embOS 1 MB MMU regions/memory blocks. The MMU is configured in __low_level_init() of Setup\RTOSInit_R7S72100.c:

// Init MMU and caches. This defines the virtual memory map, which is used during execution.
// Memory mapping should be complete, meaning 4096 entries.
// Code below fills in ascending VAddr order
//
OS_ARM_MMU_InitTT(_TranslationTable);
//                                         Mode                      VAddr  PAddr  Size[MB]
OS_ARM_MMU_AddTTEntries(_TranslationTable, OS_ARM_CACHEMODE_C_NB,    0x000, 0x000, 0x040);    // CS0 space, 64MB NOR Flash (16bit BUS on Eval-Board)
[...]
OS_ARM_MMU_AddTTEntries(_TranslationTable, OS_ARM_CACHEMODE_NC_NB,   0x600, 0x600, 0x001);    // 1MB internal RAM mirror space => Reserved for RTT
OS_ARM_MMU_AddTTEntries(_TranslationTable, OS_ARM_CACHEMODE_C_B,     0x601, 0x601, 0x009);    // 9MB internal RAM mirror space, used as RAM for application

Memory region assignment

After reserving a specific memory region for the RTT variables, the linker needs to be told to place the variables in this memory region. Setup\MemoryMap_R7S72100.xml:

<Root name="ARM" >
  <MemorySegment start="0x60020000" size="0x0E0000" access="Read/Write" name="RTT_AREA" />
  <MemorySegment start="$(SRAM_START:0x60100000)" size="$(SRAM_SIZE:0x900000)" access="Read/Write" name="SRAM" />
</Root>

Setup\sram_placement.xml:

<Root name="SRAM Section Placement">
 [...]
 <MemorySegment name="$(ISRAM_NAME:Internal SRAM);SRAM;SDRAM;DRAM">
   <ProgramSection load="Yes" name=".vectors" />
   <ProgramSection alignment="4" load="Yes" name=".fast" />
 </MemorySegment>
 <MemorySegment name="RTT_AREA">
   <ProgramSection alignment="4" load="No" name=".bss._SEGGER_RTT" />
   <ProgramSection alignment="4" load="No" name=".bss._acUpBuffer" />
   <ProgramSection alignment="4" load="No" name=".bss._acDownBuffer" />
 </MemorySegment>
</Root>