Changing address of application code

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

Changing address of application code

2,726 Views
fasihahmed
Contributor IV

I want to remove my bootloader so I can only upload the firmware using JTAG.

This means that when I power up, it should driectly run the application code.

How can I move up the application code to address 0000? Is there something I need to change in IDE settings or in build files?

folder where I get the bin file to upload on target

pastedImage_1.png

my systemconfig folder

pastedImage_2.png

ZhangJenniexiangjun.rong

Labels (1)
6 Replies

2,607 Views
fasihahmed
Contributor IV

can you explain the difference in flash speed between these two DSCs?

will the MC56F83763 provide better performance compared to MC56f82748 if we run the code in FLASH? I ask this because there is difference in both the DSC's internal clock frequency? 50Mhz vs 100Mhz

And will running MC56F83763 code in FLASH v/s RAM provide any speed difference? I know it helps for MC56f82748.  But not sure about the new MC56F83763

 

 

fasihahmed_9-1603919542675.png

fasihahmed_0-1603920433323.png

 

 

 

 

@xiangjun_rong 

0 Kudos
Reply

2,653 Views
xiangjun_rong
NXP TechSupport
NXP TechSupport

Hi, Fasih,

Regarding your question, even if you have bootloader code in flash, after you download your application code to flash, and the Reset vector points to your application code, after Reset, only your application code is executed.

If you do want to remove your bootloader code, you can execute mass erase, which erase all flash.

BTW, can you tell us the part number?

BR

XiangJun Rong

2,653 Views
fasihahmed
Contributor IV

it is MC56F82748.

Can you tell me how to find and change the reset vector pointing to application code from code warrior or from linker/builder files?

I am new to this part of embedded :smileyhappy: 

xiangjun.rong

0 Kudos
Reply

2,653 Views
xiangjun_rong
NXP TechSupport
NXP TechSupport

Hi, Fasih,

Pls refer to the following Figure, you can write the INTC_VBA to relocate the vector table.

BR

XiangJun Rong

pastedImage_1.png

0 Kudos
Reply

2,621 Views
fasihahmed
Contributor IV

how do I use to change my vector table, do you have an example code?

 

@xiangjun_rong 

0 Kudos
Reply

2,615 Views
xiangjun_rong
NXP TechSupport
NXP TechSupport

Hi, Fasih,

I have checked the code of the example generated by the CW tools.

In the main.c

adding the code:

INTC->VBA = (uint16_t)(&vba_vector_addr);

In the ***_Vectors.c

adding the lines.

volatile asm void _vect(void);
#pragma define_section interrupt_vectors "interrupt_vectors.text" RX
#pragma section interrupt_vectors begin
volatile asm void _vect(void) {
JMP >_EntryPoint /* Interrupt no. 0 (Used)*/
JMP >_EntryPoint /* Interrupt no. 1 (Used)*/
JSR >ivINT_ILLEGAL_OP /* Interrupt no. 2*/
JSR >ivINT_SWI3 /* Interrupt no. 3*/
JSR >ivINT_OVERFLOW /* Interrupt no. 4*/
JSR >ivINT_MISALIGNED /* Interrupt no. 5*/
JSR >ivINT_STPCNT /* Interrupt no. 6*/
JSR >ivINT_BKPT /* Interrupt no. 7*/
JSR >ivINT_TRBUF /* Interrupt no. 8*/
JSR >ivINT_TX_REG /* Interrupt no. 9*/
JSR >ivINT_RX_REG /* Interrupt no. 10*/
JSR >ivINT_BUS_ERR /* Interrupt no. 11*/
JSR >ivINT_PLAT_3 /* Interrupt no. 12*/
..............
}

#pragma section interrupt_vectors end

 

In the linker command file

adding

MEMORY {

.....................

.p_Interrupts (RWX): ORIGIN = 0x0000xxxx, LENGTH = 0x000000E0

.............

}

.interrupt_vectors :
{
F_vector_addr = .;
# interrupt vectors
* (interrupt_vectors.text)
Fvba_vector_addr = (F_vector_addr >>8);
} > .p_Interrupts

Hope it can help you

BR

XiangJun Rong

 

0 Kudos
Reply