3 Replies Latest reply on Oct 10, 2013 6:24 AM by junichi.hiraoka

    Argument is passing incorrect address

    junichi.hiraoka
              Hello   
      To pass constant char address is bad.   
      It seems a random data or random address was passing through   
      On 8C21434, that have 512Byte SRAM (Large memory model)   
      Enable paging option and   
      Treat const as RAM option not for help   
      Do you think what is wrong?   
         
      ///////////////////////////////////////////////////////   
      static char buf[32];   
      void SubTest( const char* str )   
      {   
      //..cstrcpy( buf, "Test2" ); <--- this is good   
      ... cstrcpy( buf, str ); <--- this is BAD   
      ... UART_Send( buf ); <--- think like as LCD_PrString();   
      }   
      ///////////////////////////////////////////////////////   
      void main()   
      {   
      ... SubTest(" Test1 "); <--- call from here   
      }   
      ///////////////////////////////////////////////////////   
         
      This was not occur on another device, ever   
      C24223 (small memory model)