Does AN3275SW downloads the program via RAM?

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

Does AN3275SW downloads the program via RAM?

14,828 Views
roxy2131
Contributor II

Hi. I am looking in the AN3275SW bootloader.

Does this bootloader download the program directly to the flash without passing the RAM or it download the program via RAM?

Also in vfnFlashProgramCmd function in main.c file, There is a comment:

vfnCopyFunctionToRAM.PNG

If I track this function up, I see no implementation.

What is the intention of this function? and where is the implementation?

Labels (1)
0 Kudos
3 Replies

603 Views
danielmartynek
NXP TechSupport
NXP TechSupport

Hi,

The Bootloader is using the the vfnFlash_Cmd() function to program the flash in main.

pastedImage_1.png

The implementation of the function is in S12Flash.c file.

As you can see, the function is in RAM:

pastedImage_2.png

Regards,

Daniel

603 Views
roxy2131
Contributor II

Then do you know where is this function's implementation?

//vfnCopyFunctionToRAM((void (*near)(void))&vfnFlash_Burst);

Is there a bootloader that programs the flash via RAM?

0 Kudos

603 Views
danielmartynek
NXP TechSupport
NXP TechSupport

Hi,

The Bootloader programs the FLASH from RAM.

As you can see above, the function is placed in ROUTINESINRAM section.

Please see the linker file (.prm) for more datails about the section.

There are additional functions in RamExec.h / RamExec.c that can be used to copy and run any funtion in RAM.

I'm not the owner of the bootloader, but as far as I can see, this is only an example how to use the RamExec functions.

Regards,

Daniel

0 Kudos