Renesas


Renesas Electronics Corporation (TSE: 6723), the world's number one supplier of microcontrollers, is a premier supplier of advanced semiconductor solutions including microcontrollers, SoC solutions and a broad range of analog and power devices.

Exporting to DS 5

Information

In this method, you will need a license of ARMCC for compilation.

Environment

/media/uploads/RyoheiHagimoto/ds5-cmsisdap-component.png

Install Windows serial driver

Install latest Windows Serial Port Driver to setup CMSIS-DAP from the link below:
https://mbed.org/handbook/Windows-serial-configuration

Download DS-5

Download DS-5 v5.19, and install. (You need an Arm account for donwloading.)
・Windows 32bit
・Windows 64bit
・Linux 32bit
・Linux 64bit

Build of DS-5 environment

Exporting to DS-5

  1. Goto Mbed compiler.
  2. Right click at the program you want to export.
  3. Select "Export Program"
    /media/uploads/RyoheiHagimoto/export1.png
  4. Select "Renesas GR-PEACH" for Export Target
    Select "DS-5" for Export Toolchain
    Push "Export"
    /media/uploads/dkato/export_ds5.png
  5. Expand zip file.

Build Process

  1. Create a new DS-5 workspace.
    A) Create a work folder in an arbitrary position.(You can decide the folder name freely)
    B) Copy the source files to the folder created in step A).
    C) Start DS-5.
    D) Select the [File] menu -> [Switch Workspace] -> [Other...].
    E) Click [Browse...] in the [Workspace Launcher] dialog box.
    F) Select the folder created in step A). Then, click [OK].
    G) DS-5 automatically restarts and the [Welcome to DS-5] screen appears.
    H) Close the [Welcome to DS-5] screen.
  2. Select the [Window] menu -> [Show View] -> [Project Explorer].
  3. Right-click the [Project Explorer] view and select [Import...]
  4. In the [Select an import source] of [Import] dialog box, select [General] -> [Existing Projects into Workspace]. Then, click the [Next] button.
  5. In the [Import] dialog box, check [Select root directory] and then click [Browse...].
  6. In the [Reference Folder] dialog box, select the source-file copy destination (folder name created in step 1-A)) and then click [OK].
  7. Check your Mbed project is selected in the [Projects] list and then click [OK] in the [Import] dialog box.
  8. Remove the check mark from [Copy projects into workspace] in the [Import] dialog box.
  9. Click [Finish] in the [Import] dialog box.
  10. Right-click Mbed project displayed in the [Project Explorer] view. Then, select [Clean Project]
  11. Right-click like previous step and then click [Build Project].

  e.g.) The folder structure when making the work folder "C:¥Workspase". Export project is mbed_blinky.
    C:
    +-- Workspace
        +-- mbed_blinky
            |   .cproject
            |   .hgignore
            |   .project
            |   ds5_rz_a1h.launch
            |   GettingStarted.htm
            |   main.cpp
            |   mbed.bld
            |   mbed_blinky.bin    <- When clicking [Build Project], ".bin" file will be created here.
            +-- .hg
            +-- Build              <- When clicking [Build Project], ".axf" file will be created here.
            +-- mbed


Troubleshooting!

If the build fails, please change the following.

Right-click Mbed project displayed in the [Project Explorer] view. Then, select [Properties].
[C/C++ Build] -> [Settings] -> [Source Language] -> [Source Language mode]
/media/uploads/dkato/ds5_source_lang_mode.png


Troubleshooting!

There is a problem with Exporter currently, the compile can not success if you export with DS-5.
However, you can avoid build errors by doing the following procedure.

  1. Right-click on the project name and select "Property".
  2. Select "C / C ++ Build" - "Settings".
  3. Select "Tool Settings" tab.
  4. Select "ARM C++ Compiler" - "Includes".
  5. Add ""${workspace_loc: / $ {ProjName} /mbed_config.h}"" to the "Pre-include" column.
  6. Press "OK" button at the bottom of "Property".


Add DS-5 configuration for the target

Add Mbed RZ/A1H configuration into DS-5.
configdb_v519-20150327.zip

  1. Download above zip file and extract it
  2. Start DS-5
  3. From menu, select [Window] [Preference] and [DS-5] [Configuration Database] press [Add] button
    /media/uploads/RyoheiHagimoto/preferences.png
  4. Browse the configdb folder which you extracted and set configuration name e.g. mbed
    /media/uploads/RyoheiHagimoto/add_config.png
  5. Press [Rebuild database] button
  6. Press [OK] button to close the dialog

Create debug configuration

1. Connection tab

  • From menu in C/C++ perspective or DS-5 debug perspective , select [Run] [Debug Configurations...]
  • Create new configuration from [DS-5 Debugger]
  • Select target: Renesas - RZ/A1H R7S721001 - Bare Metal Debug - Debug Cortex-A9
    /media/uploads/RyoheiHagimoto/debug_configurations.png
  • Set Target Connection to Mbed CMSIS-DAP
  • Select CMSIS-DAP device from [Browse...] of the Connections
    /media/uploads/RyoheiHagimoto/cmsis-dap_e.png

2. File tab

  • Select .axf file of the test program in the Files
    /media/uploads/1050186/ds5_file_tab_exp_ds5.png

3. Debugger tab

  • Run Control : Debug from entry point /media/uploads/dkato/ds5_debugger_tab_exp_ds5.png

4. Debug

  • Copy ".bin" file to Mbed drive
  • Push GR-PEACH's reset button or reconnect USB cable
  • Press [Apply] and [Debug] button to start debug session
  • When rebuilding it and debugging again, press "Disconnect from Target" button and reconnect USB cable /media/uploads/dkato/ds5_debug_2.png

Troubleshooting!

If you want to use the printf(), please disables all semihosting operations.
http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.dui0452b/CHDBCCFA.html
/media/uploads/dkato/ds5_command_submit.png


All wikipages