K20FX512 LCF Alignment issue

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

K20FX512 LCF Alignment issue

1,808 Views
davidschroeder
Contributor II

I have an application for the K20FX512 Kinetis processor that runs fine when debugging, however when I try to "Flash File To Target" via a J-Link jtag (KwikStik) I receive errors such as the following:

Downloading 0x00000049 bytes to be programmed at 0x00030034  

Executing program ....  

Error:  Program failed.   Flash driver reports the following error(s):  Chip reported error during program. Please check that the sector you are programming is erased.

Error: Program failed. Flash driver reports the following error(s):  Chip reported error during program. Please check that the sec tor you are programming is erased

In looking into this I realized that it always fails on an address that is 4 byte aligned, but not 8 byte aligned. As the flash in K20FX requires 8 byte alignment I modified the PE generated lcf file to require 8 byte alignment. This resolves the issue.

My question is, is this the correct solution, or is there a setting in the hardware connection configuration I should be changing? If this is the correct solution, is there a way to prevent PE from overwriting the modified LCF?

Thanks,

   ~Dave

3 Replies

1,447 Views
Monica
Senior Contributor III

Hello David,

How is the project going? Any news? Please keep us posted, we'd like to know :smileywink:

Best,

Monica.

0 Kudos

1,447 Views
davidschroeder
Contributor II

I've been working on other projects and am just getting back to this one. Like I said in the original post, it works if I change the alignment to 8 bytes. I've attached the pe file.

Thanks,

     ~Dave

1,447 Views
vfilip
NXP Employee
NXP Employee

Hello,

you can disable generation of linker file on Build options tab in CPU component. Details attached. Regarding to the issue - could you please post here ProcessorExpert.pe file from your project in order to reproduce it on our side?

Best regards

Vojtech Filip

Processor Expert Support Team

0 Kudos