Device: mcf52258
RTOS: MQX 3.8.1
Compilier: Eclipse 10.2
Host OS: Win 7 64bit
MQX project loaded with Codewarrior.
1) Load MQX project using Codewarrior. Close Codewarrior.
2) Open Codewarrior, select the bootloader project.
3) System initaliazes into MQX project without any issues.
MQX project loaded with bootloader.
1) Run bootloader project from Codewarrior.
2) Load MQX project with bootloader over usb.
3) Use memory browser to verify MQX project was loaded.
4) Bootloader loads stack pointer and jumps to program counter.
5) nothing happens.
Note that I have to convert the s-record to a binary file format in windows before I can download the MQX project with bootloader. When I use the memory browser the downloaded code looks the same as the one loaded by codewarrior.
Any idea what I am missing here?
Thanks,
-Vince
解決済! 解決策の投稿を見る。
Hi Vincent,
Before jumping to the MQX application from the bootloader please make sure all interrupts have been disabled.
Did you configure your MQX application to have its vector table in RAM?
Most of the MQX applications are setup to have vector table in ROM (aka Flash).
The #define gets added to the user_config.h to change default settings:
#define MQX_ROM_VECTORS | 0 | //DES 0=RAM, 1=ROM vectors (default in small_ram_config.h) |
I'm assuming you updated your linker script for the MQX application to live in upper flash.
Freescale Application Notes to help out:
AN4379
AN4368
Also search this community with keyword "bootloader".
Regards,
David
Hi Vincent,
Before jumping to the MQX application from the bootloader please make sure all interrupts have been disabled.
Did you configure your MQX application to have its vector table in RAM?
Most of the MQX applications are setup to have vector table in ROM (aka Flash).
The #define gets added to the user_config.h to change default settings:
#define MQX_ROM_VECTORS | 0 | //DES 0=RAM, 1=ROM vectors (default in small_ram_config.h) |
I'm assuming you updated your linker script for the MQX application to live in upper flash.
Freescale Application Notes to help out:
AN4379
AN4368
Also search this community with keyword "bootloader".
Regards,
David
Update...
See code snippit below. I can see the discrete value change when MCF_GPIO_CLRTC = ~MCF_GPIO_PORTTC_PORTTC3; //=============== is before the _time_delay(10000). Place it after and I see no change.
Again this only occurs when I download the binary with the bootloader. Whenever I load it with the debugger, it works fine.
void Main_task( uint_32 initial_data)
{
_task_id temp_task_id
hw_init();
_lwtimer_create_periodic_queue( &timer_ten_millisecond_queue, TIMER_TEN_MILLISECOND_PERIOD_CNT, 0 );
_time_delay(10);
led_driver.initialize();
temp_task_id = _task_create( 0, LED_THREAD_ID, 0 );
_time_delay( 10000 );
MCF_GPIO_CLRTC = ~MCF_GPIO_PORTTC_PORTTC3; //===============
while(1)
{
_time_delay(5000);
mqx_exit(0);
}