AnsweredAssumed Answered

Ethernet Bootloader on IAR6.1 + MQX3.7

Question asked by corrado carini on Feb 24, 2012
Latest reply on May 31, 2013 by Nikhil Sarnaik

I'm trying to use Ethernet Bootloader on K60N512 with MQX3.7 RTOS and IAR6.1. Unfortunately AN4367 document provides support for IAR bareboard application, CW bareboard application and CW MQX app but nothing about IAR+MQX.

I have recompiled MQX with  #define MQX_ROM_VECTORS 0  in small_ram_config.h

Then I tryed to modify intflash.icf linker file by myself and after linking I get these .map informations:



"A1": place at 0x0000c000 { ro section .intvec };
"P1": place in [from 0x0000c410 to 0x0007f7fe] { ro, last block FLASHX_POOL };
"A2": place at 0x1fff0000 { rw section .vectors_ram };
"P2": place in [from 0x1fff0410 to 0x2000fff0] { rw, last block KERNEL_DATA };

Section Kind Address Size Object
------- ---- ------- ---- ------
"A1": 0x410
.intvec const 0x0000c000 0x410 vectors.o [3]
- 0x0000c410 0x410

"P1": 0x2e3f4
.text ro code 0x0000c410 0x1e cortex_boot.o [6]
.text ro code 0x0000c42e 0xc cstartup_M.o [7]
.text ro code 0x0000c43a 0x46 macnet_rejoin.o [3]
.text ro code 0x0000c480 0x16 cmain.o [7]
ICODE ro code 0x0000c496 0xa vectors.o [3]
.text ro code 0x0000c4a0 0x2c data_init3.o [7]
.text ro code 0x0000c4cc 0x10 mqx_main.o [3]




.text ro code 0x0003a32c 0x274 macnet_send.o [3]
.text ro code 0x0003a5a0 0xa8 packbits_init3.o [7]
Initializer bytes ro data 0x0003a648 0x77 <for P2 mid-1>
Initializer bytes ro data 0x0003a6bf 0x2 <for KERNEL_DATA-1>
Initializer bytes ro data 0x0003a6c1 0x3d <for A2-1>
FLASHX_POOL 0x0003a800 0x1 <Block>
.flashx const 0x0003a800 0x1 vectors.o [3]
.flashx const 0x0003a801 0x0 vectors.o [3]
- 0x0003a801 0x2e3f1

"A2": 0x400
A2-1 0x1fff0000 0x400 <Init block>
.vectors_ram inited 0x1fff0000 0x400 vectors.o [3]
- 0x1fff0400 0x400

"P2": 0x4554
P2 mid-1 0x1fff0410 0xf4 <Init block>
.data inited 0x1fff0410 0x1 main.o [1]
.data inited 0x1fff0414 0x8 main.o [1]
.data inited 0x1fff041c 0x40 tsi.o [1]
.data inited 0x1fff045c 0x8 ipcfg.o [8]
.data inited 0x1fff0464 0x4 rtcsglob.o [8]



- My application runs ok after programming (with both bootloader and nothing in 0-0xbfff area)

- Even if I disconnect Jlink, after reset all goes ok

- If I switch off and then on board (power on reset) nothing runs (I suppose because of ram clearing)

- If I program bootloader in 0x0000-0xbfff region everything is ok

- If I erase all and then flash my application with .srec file by bootloader everything is ok

- Then if I connect jlink on my app in "debug without downloading" mode with micro flashed by boot all runs

- If I leave bootloader to execute "go" command (addr 0xc42f) nothing runs both with jlink and boot programming of my app



- Setting MQX_ROM_VECTORS to 0 in enough to get copy of vectors in ram or needed else in source app code?

- Where can I find a intflash.icf example for my needs?

- Some other ideas?


Many thanks