RePhone can be a learning tool for you to start interesting projects. Currently, RePhone supports various development environment and development languages, you can either built applications with C/C++ based on Eclipse IDE, Arduino IDE, or with Lua and JavaScript.
This wiki is a User Guide to help you start your RePhone project with Eclipse IDE.
Before you download the Arduino IDE for RePhone, make sure you have a PC with the following:
Now please click the following icons to download and install the Eclipse IDE for C/C++ Developers from the official Eclipse website. The IDE installation may require an appropriate JAVA SE Development Kit 8 to be installed on your PC.
To make use of the RePhone and Eclipse IDE, you would need to install the LinkIt Assist 2502 Eclipse plug-in in the same folder as the Eclipse IDE, where the ‘eclipse.exe’ is located.
To install the LinkIt Assist 2502 SDK 2.0.46, you need to do the following:
Step 1. Download the LinkIt Assist 2502 SDK 2.0.46 zip file.
Step 2. Extract the content of the LinkIt Assist 2502 SDK 2.0.46 zip file. There are tools in addition to the Eclipse plug-in included in the SDK so considering extracting the content to a permanent location. If you extract the content to a temporary location the installer will give you the option to move it to a permanent location.
Step 3. Make sure that the Eclipse IDE is not running.
Step 4. Run the LinkIt Assist 2502 SDK 2.0.46 installer ‘InstallPlugins.exe’ as shown in the following figure:
Step 5. In the Welcome Page, Click ‘Next’
Step 6. Now you will be asked to select the Eclipse IDE location. Click ‘Browse’ and locate the folder in which you installed Eclipse IDE (the designated folder where you installed the ‘Eclipse IDE for C/C++ Developer’) Click ‘OK’ and ‘Next’.
Step 7. In Move SDK to permanent location, check ‘Move LinkIt Assist 2502 2.0 package to new folder’ if you have extracted the zip file in a temporary location. Click ‘Browse’ and locate a permanent location in which to store the SDK. Then Click ‘Next’ to the next step.
Step 8. In Ready to install the SDK. Review the selected locations if they are OK click ‘Install’.
Step 9. At the last step of installation, check ‘Install the MediaTek USB Driver’ if this is your first time to install a LinkIt SDK, then click ‘Finish’ to complete the installation.
Step 10. Once the plug-in installation is finished, there will be a folder named ‘LINKIT_ASSIST_SDK’ in the location where you installed the Eclipse IDE.
You can also find the plug-ins in your Eclipse window once you open the "eclipse.exe", see the Step 8 in the following section - "Create Your First Project: Hello World"
NB: Please be noticed that flash the firmware will delete all the settings and files(images, musics) stored in the RePhone, please make sure you have been aware of this before you flash/update the firmware.
I know you’ve been agog about your RePhone and can’t wait to start programming, just hold on a second, before you do that, it is essential to make sure the firmware of the core module - Xadow GSM+BLE corresponds to the LinkIt Assist SDK you just installed.
Here I’introduce two ways to update/flash the firmware of your RePhone.
Step 1. Firstly, make sure your Xadow GSM+BLE is disconnected from your PC, then download the latest RePhone SDK on our Github, unzip it.
Step 2. Launch the ‘FirmwareUpdater.exe’ in the SDK folder you just installed, it can be found in the path ’eclipse\LINKIT_ASSIST_SDK\tools\FirmwareUpdater\FirmwareUpdater.exe’
Step 3. In the LinkIt Firmware Updater window, select ‘Others’ as the platform in the pull-down list. Then Locate ...\SEEED02A_DEMO_PCB01_gprs_MT2502_S00.MAUI_11CW1418SP5_W15_29.bin\SEEED02A_DEMO_BB.cfg
Step 4. Click the green update button, and follow the 2 step instructions on the screen, make sure the Xadow GSM+BLE is powered (connected to the battery) when connect it to PC.
Step 5. Wait until the download finish.
Step 6. When the firmware update complete this will be confirmed in the Download Complete page, click ‘OK’ and exit the updater.
Step 1. Almost there! Now launch eclipse.exe. If this is your first time using the Eclipse IDE, you will be asked to select a Workspace for your eclipse projects. In Workspace Launcher, click Browse to find a proper location as your Workspace. I recommend you to set your workspace in the same location you installed the Eclipse IDE.
Step 2. To create a new RePhone application - in the Eclipse File menu, point to new and click Other. Or you can simply use the CTRL+N shortcut key.
Step 3. In the New window, expand the LinkIt Assist 2502 SDK 2.0 folder and select Application(*.vxp)
Step 4. Now you are lead to theLinkIt Assist 2502 SDK 2.0 Wizard
"
Step 5. Congrats! XD You just created your first project! Now open the project from the C/C++ Projects pane and double click "hello_world.c" file, as shown below
Step 6. Before uploading the application, you need to
Step 7. Open Device Manager to check for the COM ports. There will be two COM ports (the COM number might be different in your PC):
Open Device Manager by clicking the Start button, clicking Control Panel, clicking System and Security, and then, under System, clicking Device Manager. If you're prompted for an administrator password or confirmation, type the password or provide confirmation. See the following image:
Step 8. Almost there! Put the following code into the "hello_world.c":
#include "vmsystem.h" #include "vmtype.h" #include "vmlog.h" #include "vmtimer.h" #include "ResID.h" #include "hello_world.h" VM_TIMER_ID_PRECISE sys_timer_id = 0; void sys_timer_callback(VM_TIMER_ID_PRECISE sys_timer_id, void* user_data) { vm_log_info("Hello World!"); } void handle_sysevt(VMINT message, VMINT param) { switch (message) { case VM_EVENT_CREATE: sys_timer_id = vm_timer_create_non_precise(1000, sys_timer_callback, NULL); break; case VM_EVENT_PAINT: break; case VM_EVENT_QUIT: break; } } void vm_main(void) { vm_pmng_register_system_event_callback(handle_sysevt); }
Step 9. Open the Monitor in the LinkIt Assist Plug-in.
You will be asked to Set Database Path, if not, point to Config menu and click Set Database Path
The COM number of the Debug Port might be different on your PC, just make sure it is the MTK USB Debug Port listed in Device Manager.
If the window is not showing, point to Config menu and click Configure RS232...
Step 10. You've done a great job!! Now say "Hello" to the world!
Please be noticed that reset your Rephone to defaults will delete all the settings and files(images, musics) in the RePhone, do aware of this before you reset it to defaults.
To reset your RePhone to DEFAULTS:
1. Follow the instructions in "Update/Flash the Firmware" section to flash the firmware
2. Download the RePhone_Create_Kit_VXP file
3. Enter the RePhone Mass Storage Mode
4. Copy everything under the file named "RePhone Create Kit VXP" into the RePhone 5MB mass storage.
5. Restart your RePhone then its done. As reset have deleted all the files, you would have to put an mp3 file in the mass storage as well for the use of ringtone.
We’ve been looking for a better place where our backers (RePhone Users) can sit together, warmly and comfortably, have conversations about RePhone, discuss technical problems, share ideas/projects, and give feedback on the modules’ development in the future. And then here we go, the RePhone Community.
Now join us in the RePhone Community!
Together we seek answers, make interesting stuff, care about each other, and share our experiences.
As RePhone is mostly developed with the LinkIt Assist SDK, and Mediatek has made a very detailed developer guide for the developers, to find more info you can refer to :