Standard SDK: Getting Started With Ameba-D
Setup of the GCC Development Environment
On Windows, you can use Cygwin as the GCC development environment. Cygwin is a large collection of GNU and open source tools which provide functionality similar to a Linux distribution on Windows. Click http://cygwin.com/ and download the Cygwin package setup-x86.exe for your Windows platform. 1. 32-bit Cygwin is supported both for 32-bit Windows and 64-bit Windows. 2. During the installation of Cygwin package, include ‘Devel -> make’ and ‘Math -> bc’ utilities on the Select Packages page, as below shows.
For Linux, refer to AN0400 Ameba-D Application Note v12.pdf to build the GCC development environment.
Knowledge about Ameba-D Demo Board
For Ameba-D, there are many types of chipsets available, such as RTL8720CS, RTL8721CSM, RTL8722CSM, RTL8720DN, RTL8720DM, RTL8721DM, and RTL8722DM. In addition, the chipsets can be embedded on Ameba-D 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. The hardware block diagram of Ameba-D demo board is shown below. USB TO UART: power supply and log print. The baud rate is 115200bps SWD: SWD interface, used to download images and debug with IAR. Reset button: reset Ameba-D to run firmware after IAR completes download.
Connection to Log Console
On Ameba-D board, FTDI Chip and FT232 can be used for the log console and debugger. To view the log console, make use of the terminal tool , such as SecureCRT/teraterm/putty and etc. We will take our internal tool as an example. 1) Select the corresponding serial uart configure communicate parameter and then open it. 2) Press the Reset button on Ameba-D board. Some messages can be found in the terminal.
Building the First GCC Project on Ameba-D
The following steps are for first-time developer to build GCC project, under existing RTK SDK. Building Code This section illustrates how to build SDK. First, you need to switch to GCC project directory. For Windows, open Cygwin terminal and use $ cd command to change directory to KM0 or KM4 project directory of Ameba-D SDK. Note: You need to replace the {path} to your own SDK location, and add “cygdrive” prefix in front of the SDK location, so that Cygwin can access your file system.
If somehow it is built failed, type $ make clean to clean and then redo the make procedure. After successfully built, the image file is located in project/realtek_amebaD_va0_example/GCC-RELEASE/project_lp/asdk/image, as below shows.
KM4 project
For KM4 project, if the terminal contains “km4_image2_all.bin” and “Image manipulating end” output message, it means that the image has been built successfully, as below shows.
If somehow it built failed, type $ make clean to clean and then redo the make procedure. After built successfully, the image file is located in project/realtek_amebaD_va0_example/GCC-RELEASE/project_hp/asdk/image, as below shows.
Downloading Images to Ameba-D
Realtek provides an image tool to download images on windows.
Assuming that the ImageTool on PC is a server, it sends images files to Ameba (client) through UART. To download image from server to client, the client must enter uart download first.
1) Enter into UART_DOWNLOAD mode.
Realtek IoT/Wi-Fi MCU Solutions . All Rights Reserved. Terms of Use