Standard SDK: Getting Started With Ameba-ZII
Setup of IAR Development Environment
IAR IDE is a complete debugger and C/C++ compiler toolchain for building and debugging embedded application. Under IAR IDE, users can write programs, compile and upload to the board. Also, it supports step-by-step debug function. User can get IAR Embedded Workbench from the official website. install the IDE by following instructions appropriately Note that: 1. Existing IAR version runs under Windows OS only. 2. Version 8.30 or above is recommended for Ameba ZII, to avoid compatibility errors.Know Ameba-ZII Demo Board
Under Ameba-ZII, there 4 types of chipsets available, such as RTL8720CM, RTL8720CF, RTL8720CN, RTL8710CX. In addition, the chipsets can be embedded on Ameba-ZII DEV demo board, which is extended to various I/O interfaces. The corresponding HDK (Hardware Development Kit) documents are available, please contact RTK for further details.Connect to Log Console
FTDI Chip, FT232, on Ameba-ZII board can be used for the log console and debugger. 1) To view the log console, make use of the terminal tool , such as SecureCRT/teraterm/putty and etc,. Open the connection port: 2) Then press the reset button on Ameba board, some messages should be found in the terminal. Note that incorrect messages may appear if baud rate is not properly set. 3) Modify Baud rate on the above console, for examples, under Tera Term, press Setup > Serial port, then, set the speed to 115200 4) Log Console view with Pre-loaded image on Ameba ZII.SDK Build Environment Setup
Debugger Settings J-Link Debugger is recommended for the purposes of downloading code and entering debugger mode on Ameba ZII Debugger Connection There are Serial Wire Debug (SWD) pins on Ameba ZII. To configure the connection between J-link adaptor to SWD pins, please refer below. Setups on Windows OS 1. install J-Link GDB server “J-Link Software and Documentation Pack” available at https://www.segger.com/downloads/jlink Note: To use TrustZone feature, it’s better to download the latest version of J-Link Software. Version 6.40 is used to prepare this document. 2. Open installation location of ‘JLink_V640’ and run “JLinkGDBServer.exe” to start 3. On JLinkGDBServer.exe , make sure the configuration and click ‘OK’. Note: To enable Ameba-ZII which is powered by Cortex-M33, user needs a J-Link debugger with the latest hardware version (refer to https://wiki.segger.com/Software_and_Hardware_Features_Overview for details) 4. Check if the below information is shown properly Note: If J-Link GDB Server is unable to detect the device, close ‘JLinkGDBServer.exe’. unplug and then plug the wires. Then, re-open ‘JLinkGDBServer.exe’.Build First IAR Project on Ameba ZII
The following steps are for first-time developer to build IAR project, under existing RTK SDK What is “Ignore Secure Project” With existing RTK SDK, users can make use of ignore secure mode. [ ‘project_is’ (ignore secure) is the project without TrustZone configuration whereas “project_is” the project consists of TrustZone configuration] Compilation 1. Open SDK/project/realtek_amebaz2_v0_example/EWARM-RELEASE/Project_is.eww. 2. Locate application_is in Work Space, right click application_is and choose “Rebuild All” to compile. 3. Under Build Tab, make sure there is no error after compile. Generate Image Binary Upon compilation completion, the images partition.bin, bootloader.bin, firmware_is.bin and flash_is.bin found in the EWARM-RELEASE\Debug\Exe. 1) partition.bin: stores partition table, recording the address of Boot image and firmware image; 2) bootloader.bin; is bootloader image; 3) firmware_is.bin: is application image; 4) flash_is.bin: links partition.bin, bootloader.bin and firmware_is.bin. Users has to choose flash_is.bin when downloading the image to board by PG Tool. Download After completing compilation without error and generating ‘flash_is.bin’, there are 2 ways to download: 1) Directly download the image binary on to demo board from IAR IDE (as below) Note: even if code is slightly modified, please Make the project first. before download the bin file on the board, otherwise the download fails and below windows is shown. 2) using the PG tool for Ameba-ZII. Please refer to https://github.com/ambiot/ambz2_sdk/tree/master/tools/AmebaZ2/Image_ToolRealtek IoT/Wi-Fi MCU Solutions . All Rights Reserved. Terms of Use