CodeWarrior 2.7 linker trouble with WRITEx command

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

CodeWarrior 2.7 linker trouble with WRITEx command

652件の閲覧回数
mr_adam_lins
Contributor I

Hi all, 

 

According to the linker manual, the commands WRITEx(expression) emit a byte, half-word, or word at the current location. There are a few examples of usage available, which led me to think that this should work to emit the byte 0x34 at the first byte of memory in myMemoryBlock:

 

   .mySection : {      WRITEB(0x34);   } > myMemoryBlock

However, this kind of syntax always results in the linker complaining about a missing identifier. Has anyone used the WRITEx commands in CodeWarrior 2.7?

 

(I'm also puzzled why LONG(), SHORT(), and BYTE() are apparently supported, but not documented.)

 

Thanks,

-Adam

ラベル(1)
タグ(1)
0 件の賞賛
1 返信

271件の閲覧回数
CrasyCat
Specialist III

Hello

 

I checked with engineering.

In fact PA linker doesn’t support  WRITEB, WRITEH or WRITEW command. You need to use respectively BYTE, SHORT and LONG instead.

 

A documentation change request has been submitted to get the reference manual fixed.

 

Syntax of BYTE command looks as follows:

 

      .example_data_section :      {       __startxxx = .;              BYTE(0x48); /*  'H'  */       BYTE(0x69); /*  'i'  */       BYTE(0x21);  /*  '!'  */      } 

 

 CrasyCat

0 件の賞賛