For any questions, please visit AmebaIoT officail website and AmebaIoT forum to get more information.
- 1 Getting Started
- 2 Environment Setup
- 3 Building the First Project on Ameba-D
- 4 Downloading Images to Ameba-D
- 5 Release Notes
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 baudrate 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.
Note: 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.
-
32-bit
Cygwin
is supported both for 32-bit Windows and 64-bit Windows. -
During the installation of
Cygwin
package, includeDevel -> make
andMath -> bc
utilities on the Select Packages page, as below shows.
Note: For Linux, please refer to AN0400 Realtek Ameba-D Application Note.pdf on AmebaIoT officail website to build the GCC development environment.
On AmebaD 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.
-
Select the corresponding serial uart configure communicate parameter and then open it.
-
Press the Reset button on Ameba-D board. Some messages can be found in the terminal.
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 addcygdrive
prefix in front of the SDK location, so that Cygwin can access your file system.
cd /cygdrive/{path}/project/realtek_amebaD_va0_example/GCC-RELEASE/project_lp
cd /cygdrive/{path}/project/realtek_amebaD_va0_example/GCC-RELEASE/project_hp
To build SDK for normal image, simply use $ make all
command under the corresponding project directories on Cygwin (Windows).
KM0 project For KM0 project, if the terminal contains km0_image2_all.bin
and Image manipulating end
output message, it means that the image has been built successfully, as below shows.
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 km0_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.
To build SDK for normal image on Linux,
- Set directory to KM0 or KM4 project by entering the following commands in Linux Terminal
cd /{path}/project/realtek_amebaD_va0_example/GCC-RELEASE/project_lp
cd /{path}/project/realtek_amebaD_va0_example/GCC-RELEASE/project_hp
- Under the corresponding directories, execute
$ make all
to build images. You may start withproject_lp
first followed byproject_hp
.-
KM0 project (project_lp)
- For KM0 project, if the terminal contains
km0_image2_all.bin
andImage manipulating end
output message, it means that the image has been built successfully.
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 inproject/realtek_amebaD_va0_example/GCC-RELEASE/project_lp/asdk/image
. - For KM0 project, if the terminal contains
-
KM4 project (project_hp)
- For KM4 project, if the terminal contains
km0_image2_all.bin
andImage manipulating end
output message, it means that the image has been built successfully.
If somehow it built failed, type
$ make clean
to clean and then redo the make procedure. After built successfully, the image file is located inproject/realtek_amebaD_va0_example/GCC-RELEASE/project_hp/asdk/image
, as below shows. - For KM4 project, if the terminal contains
-
Note: If you encountered any error message like:
make[1]: execvp: /{path}/ambd_sdk/project/realtek_amebaD_va0_example/GCC-RELEASE/project_lp/asdk/gnu_utility/prepend_header.sh: **Permission denied**
Makefile:198: recipe for target 'linker_loader' failed
Please run the following command to grant the execution permission for the all corresponding files:
chmod -R 777 {path}/project/realtek_amebaD_va0_example/GCC-RELEASE/
Realtek provides an image tool to download images on windows.
- Environment Requirements: EX. WinXP, Win 7 Above, Microsoft .NET Framework 3.5
ImageTool.exe
Location:SDK\tools\AmebaD\Image_Tool\ImageTool.exe
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.
-
Enter into UART_DOWNLOAD mode.
- Push the UART DOWNLOAD button and keep it pressed.
- Re-power on the board or press the Reset button.
- Release the UART DOWNLOAD button.
Now, Ameba board gets into UART_DOWNLOAD mode and is ready to receive data.
-
Click Chip Select(in red) on UI and select chip AmebaD.
-
Select the corresponding serial port and transmission baud rate. The default baudrate is 1.5Mbps (recommended).
-
Click the Browse button to select the images (km0_boot_all.bin/km4_boot_all.bin/km0_km4_image2.bin) to be programmed and input addresses.
- The image path is located in:
{path}\project\realtek_amebaD_va0_example\GCC-RELEASE\project_lp\asdk\image
and{path}\project\realtek_amebaD_va0_example\GCC-RELEASE\project_hp\asdk\image
, where {path} is the location of the project on your own computer. - The default target address is the SDK default image address, you can use it directly.
- The image path is located in:
-
Click Download button to start. The progress bar will show the transmit progress of each image. You can also get the message of operation successfully or errors from the log window.
Note: For Bluetooth Examples, currently we only support
BT_Peripheral
,BT_Central
,BT_Scatternet
, andBT_Simple_Config
four examples.
mbed_flash_winbond_block_protect
example result expected to be different fromreadme.txt
. This is caused by the brand of flash chip might be different on different versions of module or dev board.