Code not uploading

Hello guys, any ideas on why the arduino just stops at “Uploading…” but never finishes doing so?

Hi beckmx,

could you please be a bit more specific? Or have you tried replug-in and re-upload the code?

I am thinking this could be caused because you’ve choose the wrong board, make sure you’ve chose ‘Tools\board\RePhone’

Same Problem here… adding a thread to my program ends with not able upload new code again. The only solution was to reflash the firmware with the FirmwareUpdater.
If I comment out the “break;” line in the while loop, uploading works without problems after reflashing firmware.

I’m just wondering because the debug interface should not hang if a faulty running program is flashed?!?

I’m using Eclipse with the MTK Assist SDK 2.0.46

Here is my example code:

#include "vmtype.h"
#include "vmsystem.h"
#include "vmthread.h"
#include "ResID.h"

VM_THREAD_HANDLE main_thread_handle;

VMINT32 main(VM_THREAD_HANDLE thread_handle, void* user_data)
{
	vm_thread_sleep(1);

	while(1)
	{
		//LOOP
               break;
	}

	return 0;
}

void system_event_handle(VMINT system_event, VMINT parameter)
{
    switch (system_event)
    {
        case VM_EVENT_CREATE:
                main_thread_handle = vm_thread_create(main, NULL, 200);
        	break;
        case VM_EVENT_QUIT:
        case VM_EVENT_PAINT:
        case VM_EVENT_CARD_PLUG_OUT:
        case VM_EVENT_CELL_INFO_CHANGE:
        case VM_EVENT_LOW_BATTERY:
        case VM_EVENT_UPDATE_FAIL:
        default:
        	break;
    }
}

void vm_main(void)
{
	vm_pmng_register_system_event_callback(system_event_handle);
}

Hi kaktus,

I’ve just tried your code it works fine on my computer.

Every time you the code is uploaded, the device will reboot itself, and during this time you wont be able to flash any applications.

You would have to wait until the reboot is complete and the LED indicator on the Xadow gsm+ble shows green, then you can upload another code in it.

hi:

I use Arduino IDE to start RePhone and follow the step of wiki. But I can’t update the LinkIt Firmware Updater. I do turn off the Rephone and plug in the battery. It always time out. how can I solve this problem ?