Advertisement

Quick Links

Ameba-D Application Note
RTL8722DM
Build and Debug Environment Setup – IAR
This document illustrates how to build Realtek low power Wi-Fi software under IAR SDK environment.
Application Note
All information provided in this document is subject to legal disclaimers.
© REALTEK 2020. All rights reserved.
1

Advertisement

Table of Contents
loading

Summary of Contents for Realtek RTL8722DM

  • Page 1 Ameba-D Application Note RTL8722DM Build and Debug Environment Setup – IAR This document illustrates how to build Realtek low power Wi-Fi software under IAR SDK environment. Application Note All information provided in this document is subject to legal disclaimers. © REALTEK 2020. All rights reserved.
  • Page 2: Iar Embedded Workbench

    Ameba-D Application Note IAR Build Environment Setup This chapter illustrates how to setup IAR development environment for Realtek Ameba-D SDK, including building projects, downloading images and debugging. Requirement 1.1.1 IAR Embedded Workbench IAR provides an IDE environment for code building, downloading, and debugging. Check “IAR Embedded Workbench” on http://www.iar.com/, and a trail version is available for 30 days.
  • Page 3: Antenna Description

    Fig 1-3 J-Link and Ameba-D SWD connection 1.2.3 Connecting with RLX Probe Refer to Fig 1-4 and Fig 1-5 to connect Ameba-D SWD interface with RLX Probe. Application Note All information provided in this document is subject to legal disclaimers. © REALTEK 2020. All rights reserved.
  • Page 4 Project Build Configuration Configure TrustZone Enable MP km4_bootloader km4_bootloader - is km4_bootloader - tz km4_application km4_application - is km4_application - tz Application Note All information provided in this document is subject to legal disclaimers. © REALTEK 2020. All rights reserved.
  • Page 5 Variant > Core, verify the CPU configurations according to Fig 1-7. Right click the project and choose “Rebuild All”, as Fig 1-8 shows. The km0_bootloader and km0_application should compile in order. Application Note All information provided in this document is subject to legal disclaimers. © REALTEK 2020. All rights reserved.
  • Page 6 Ameba-D Application Note Fig 1-7 KM0 processor options Fig 1-8 Building KM0 project Application Note All information provided in this document is subject to legal disclaimers. © REALTEK 2020. All rights reserved.
  • Page 7 Click Project > Options, General Options > Target > Processor Variant > Core, verify the CPU configurations according to Fig 1-9. Fig 1-9 KM4 processor options Application Note All information provided in this document is subject to legal disclaimers. © REALTEK 2020. All rights reserved.
  • Page 8 After compile, the images km4_boot_all.bin and km0_km4_image2.bin can be seen in project\realtek_amebaD_va0_example\EWARM- RELEASE\Debug\Exe\km4_image. For MP configurations, the km0_km4_image2_mp.bin would be generated instead. Application Note All information provided in this document is subject to legal disclaimers. © REALTEK 2020. All rights reserved.
  • Page 9 Click Project > Options > Debugger > Setup > Driver, and choose “J-Link/J-Trace”, as Fig 1-13 shows. Click Debugger > J-Link/J-Trace > Connection > Interface, and choose “SWD”, as Fig 1-14 shows. Application Note All information provided in this document is subject to legal disclaimers. © REALTEK 2020. All rights reserved.
  • Page 10 Ameba-D Application Note Fig 1-12 Switching to the target project view Fig 1-13 J-Link debugger setup Application Note All information provided in this document is subject to legal disclaimers. © REALTEK 2020. All rights reserved.
  • Page 11 Note: The board must be reset before opening the RLX Probe, otherwise the connection may fail. Fig 1-15 RLX Probe setup Application Note All information provided in this document is subject to legal disclaimers. © REALTEK 2020. All rights reserved.
  • Page 12 When downloading, Ameba-D prints the log, as Fig 1-18 shows. You can check the log to see if download is successful. Application Note All information provided in this document is subject to legal disclaimers. © REALTEK 2020. All rights reserved.
  • Page 13 Note: Considering KM4 is power-on by KM0, you should make sure that KM0 has already boot up before debug KM4. For KM0, there is no such requirement because KM0 is power-on immediately after reset. Application Note All information provided in this document is subject to legal disclaimers. © REALTEK 2020. All rights reserved.
  • Page 14 Toggles a breakpoint at the statement or instruction that contains or is located near the cursor in the source window. The “Toggle Breakpoint” button is on the debug toolbar, as Fig 1-21 shows. Fig 1-20 Running to main() when debug Application Note All information provided in this document is subject to legal disclaimers. © REALTEK 2020. All rights reserved.
  • Page 15 “ew .pc = 0xxxxxxxxx” and change the address to the appointed value, as Fig 1-22 and Fig 1-23 shows. Fig 1-22 Setting the target address Application Note All information provided in this document is subject to legal disclaimers. © REALTEK 2020. All rights reserved.
  • Page 16 Because Ameba-D has two CPU cores, and a post-build script will be run after make, sometimes the debug or download thread cannot get the correct AXF file for debug or download, the error like Fig 1-24 happens. Application Note All information provided in this document is subject to legal disclaimers. © REALTEK 2020. All rights reserved.
  • Page 17 To avoid this error, you should build manually before debug or download, and disable auto-build from Tools > Options > Project > Make before debugging, as Fig 1-25 shows. Application Note All information provided in this document is subject to legal disclaimers. © REALTEK 2020. All rights reserved.
  • Page 18 Note: Considering only SRAM and PSRAM contains secure regions, the code in km4_secure project should be placed either in “@PSRAM” or in “@SRAM”. It can’t be placed outside these two groups. Application Note All information provided in this document is subject to legal disclaimers. © REALTEK 2020. All rights reserved.
  • Page 19 “main.c” file in the target example to project\realtek_amebaD_va0_example\src\src_hp and replace the original one. For example, you can copy “main.c” from project\realtek_amebaD_va0_example\example_sources\I2C\mbed\i2c_int_mode\src to use i2c_int_mode example code, as Fig 1-27 shows. Application Note All information provided in this document is subject to legal disclaimers. © REALTEK 2020. All rights reserved.
  • Page 20: Memory Section

    A7 (PSRAM): This section is read-write data in PSRAM (0x2000000 to 0x23FFFFF).  BTTRACE: This section is reserved for BTTRACE.  A5 (XIP): This section is read-only data in XIP. Application Note All information provided in this document is subject to legal disclaimers. © REALTEK 2020. All rights reserved.
  • Page 21: Memory Size

    Memory Size in XIP XIP can only place text section, so there is only one section called A5. A5 has size 0x8afe8. Application Note All information provided in this document is subject to legal disclaimers. © REALTEK 2020. All rights reserved.
  • Page 22: Federal Communication Commission Interference Statement

    However, there is no guarantee that interference will not occur in a particular installation. If this equipment does Application Note All information provided in this document is subject to legal disclaimers. © REALTEK 2020. All rights reserved.
  • Page 23: Industry Canada Statement

    LABEL OF THE END PRODUCT: The final end product must be labeled in a visible area with the following " Contains TX FCC ID: TX2-RTL8722DM ". If the size of the end product is larger than 8x10cm, then the following FCC part 15.19 statement has to also be available on the label: This device complies with Part 15 of FCC rules.
  • Page 24 Dans le cas où ces conditions ne peuvent être satisfaites (par exemple pour certaines configurations d'ordinateur portable ou de certaines co- Application Note All information provided in this document is subject to legal disclaimers. © REALTEK 2020. All rights reserved.
  • Page 25 This transmitter module is authorized only for use in device where the antenna may be installed such that 20 cm may be maintained between the antenna and users. The final end product must be labeled in a visible area with the following: “Contains IC:6317A-RTL8722DM”.

Table of Contents