Modify start address in MQX project with Keil uVision4

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Modify start address in MQX project with Keil uVision4

1,478 Views
waynelai
Contributor I

The bootloader is programmed from 0x0~0x9FFF.

Application is programmed begin from 0xA000.

After bootloader programming the application, it will jump to 0xA000.

So, we need to modify the MQX application project to begin from 0xA000.


We've modify below settings.

#define BSP_INTERNAL_FLASH_BASE 0x0000A000

#define __VECTOR_TABLE_ROM_START 0x0000A000

#define MQX_ROM_VECTORS 0

We also modify the .scf file with below value, original is 0x00000000.

#define INTFLASH_BASE_ADDR0x0000A000


The map file seems ok, but can not execute the application correctly.

.vectors_rom                        0x0000a000   Section1024  vectors.o(.vectors_rom)
__tagsym$$used                      0x0000a000   Number    0  vectors.o(.vectors_rom)
.cfmconfig                          0x0000a400   Section  16  vectors.o(.cfmconfig)
__tagsym$$used                      0x0000a400   Number    0  vectors.o(.cfmconfig)
!!!main                             0x0000a410   Section   8  __main.o(!!!main)
!!!scatter                          0x0000a418   Section  52  __scatter.o(!!!scatter)
!!dczerorl2                         0x0000a44c   Section  90  __dczerorl2.o(!!dczerorl2)
!!handler_copy                      0x0000a4a8   Section  26  __scatter_copy.o(!!handler_copy)
!!handler_zi                        0x0000a4c4   Section  28  __scatter_zi.o(!!handler_zi)
. text                              0x0000a4e0   Section  76  boot.o(. text)


Did we miss some configuration so it can not be executed correctly ?

Please advise, thanks.

Tags (2)
0 Kudos
Reply
2 Replies

1,067 Views
danielchen
NXP TechSupport
NXP TechSupport

Hi

I think you need to change the following,  INTFLASH_BASE_ADDR,  _VECTOR_TABLE_ROM_START, and mark //init_hardware->_bsp_initialize_hardware->_bsp_watchdog_disable()

There is an application note AN2295 for that.

0 Kudos
Reply

1,067 Views
waynelai
Contributor I

thanks for the reply.

Currently it seems ok now.

We have another issue.

We add a library which is compiled also using Keil uVision4.

It seems that in the application, when called the function in the library,

it can not be executed correctly,

any idea ?

Thanks.

0 Kudos
Reply