Code not uploading

Moderators: lily.li, violet, jessie, chao.zhang

Post Reply
beckmx
Pre-kindergarten
Pre-kindergarten
Posts: 4
Joined: Sun Jul 22, 2012 12:01 am
Are you a staff member of seeedstudio?: no
Which products/projects are your favorite?: Seeedstudio frame

Code not uploading

Post by beckmx » Sat Dec 26, 2015 2:51 pm

Hello guys, any ideas on why the arduino just stops at "Uploading.." but never finishes doing so?

User avatar
chao.zhang
Kindergarten
Kindergarten
Posts: 81
Joined: Thu Jan 22, 2015 9:55 am

Re: Code not uploading

Post by chao.zhang » Mon Dec 28, 2015 9:35 am

beckmx wrote: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'

kaktus.martin
Pre-kindergarten
Pre-kindergarten
Posts: 13
Joined: Tue Dec 29, 2015 9:33 pm

Re: Code not uploading

Post by kaktus.martin » Thu Dec 31, 2015 5:01 am

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:

Code: Select all

#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);
}

User avatar
chao.zhang
Kindergarten
Kindergarten
Posts: 81
Joined: Thu Jan 22, 2015 9:55 am

Re: Code not uploading

Post by chao.zhang » Thu Dec 31, 2015 10:32 am

kaktus.martin wrote: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:

Code: Select all

#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.

one2345
Pre-kindergarten
Pre-kindergarten
Posts: 1
Joined: Thu Jan 21, 2016 10:59 pm

Re: Code not uploading

Post by one2345 » Thu Jan 21, 2016 11:11 pm

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 ?

Post Reply