.hex file alignment

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

.hex file alignment

跳至解决方案
1,685 次查看
randylee
Contributor V

So on a K22, the FLASH system wants to write 8 bytes on 8 byte alignment.

 

KDS isn't doing alignment like that on the back end of the .hex file.  I've got one that goes:

 

:10AA2800000000000000000000000000000000001E

:10AA3800000000000000000000000000000000000E

:10AA480000000000000000000000000000000000FE

:10AA580000000000000000000000000000000000EE

:10AA680000000000000000000000000000000000DE

:10AA780000000000000000000000000000000000CE

:10AA8800880603000000FF1F00040000880A030076

:10AA98000000002000A000000000000000000000EE

:04AAA80000000000AA

:040000031000D7D141

:00000001FF

 

 

So from this the last address is AAA8 + 4 bytes which isn't mod 8  I see things in the .ld file that are alignment oriented but that file is created by PE so I'm not too hip on editing it.  What I need is fill too which I don't know how to force done.

 

How do I get the environment to force that to 8 byte align/fill? 

标签 (1)
0 项奖励
回复
1 解答
1,517 次查看
BlackNight
NXP Employee
NXP Employee

If you disable linker file generation (as outlined in that blog article), it disables linker file generation only. Everything else remains as before.

I'm using this in a few of my projects where I need some very specific stuff in the linker file.

在原帖中查看解决方案

0 项奖励
回复
4 回复数
1,517 次查看
BlackNight
NXP Employee
NXP Employee

You can disable re-generation of the linker file in PE, see Disable my Code Generation | MCU on Eclipse

0 项奖励
回复
1,517 次查看
randylee
Contributor V

well, I could tweak the linker file without it being regenerated but then I'd loose the ability to automatically add (or subtract) anything form the project too.  It's rather a little like editing your binary.... doable, but not great practice.

I don't suppose there's a better solution to this...

0 项奖励
回复
1,518 次查看
BlackNight
NXP Employee
NXP Employee

If you disable linker file generation (as outlined in that blog article), it disables linker file generation only. Everything else remains as before.

I'm using this in a few of my projects where I need some very specific stuff in the linker file.

0 项奖励
回复
1,517 次查看
randylee
Contributor V

OK, I'll buy that and see where I get long term with it.  Looking at my diffs over time, this file hasn't changed (aside from the build number) since it was first laid down so I'll believe that.

KDS, BTW as a little different options and layout than CW does in this regard.  Looks like it works in mostly the same way tho.

0 项奖励
回复