.hex file alignment

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 
2,675件の閲覧回数
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 解決策
2,507件の閲覧回数
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 返答(返信)
2,507件の閲覧回数
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 件の賞賛
返信
2,507件の閲覧回数
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 件の賞賛
返信
2,508件の閲覧回数
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 件の賞賛
返信
2,507件の閲覧回数
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 件の賞賛
返信