Adam Lins

CodeWarrior 2.7 linker trouble with WRITEx command

Discussion created by Adam Lins on Jan 23, 2011
Latest reply on Jan 25, 2011 by CrasyCat

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.)