MQX project does not initialize after being loaded by bootloader

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

MQX project does not initialize after being loaded by bootloader

ソリューションへジャンプ
976件の閲覧回数
VinceTF
Contributor III

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

ラベル(1)
タグ(2)
0 件の賞賛
返信
1 解決策
574件の閲覧回数
DavidS
NXP Employee
NXP Employee

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

元の投稿で解決策を見る

0 件の賞賛
返信
2 返答(返信)
575件の閲覧回数
DavidS
NXP Employee
NXP Employee

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

0 件の賞賛
返信
574件の閲覧回数
VinceTF
Contributor III

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

      }

0 件の賞賛
返信