5 Replies Latest reply on Mar 28, 2016 2:08 AM by JoMe_264151

    SCB_SpiUartPutArray parameter type

      Hi All,


      I have the following code:




      int main()


          int len = 6;
          uint16 tx_array [len];


          for (;;)
              tx_array [0] = 0xFFFF;
              tx_array [1] = 0x6C56;   
              tx_array [2] = 0x6461;  
              CyDelay (100);
              UART_SpiUartPutArray (tx_array, len);


      It works fine with Hyper Terminal, but IO have a warning of incompatible pointer type.


      "passing argument 1 of 'UART_SpiUartPutArray' from incompatible pointer type"


      According to the datasheet the function can take uint16 * or uint8 * as first parameter. What is more interesting GDB crashes when I want to look into the way UART transmits the data:


      "/home/build/work/GCC-4-9-build/src/gdb/gdb/utils.c:1056: internal-error: virtual memory exhausted: can't allocate 1049375820 bytes.\nA problem internal to GDB has been detected,\nfurther debugging may prove unreliable.\nCreate a core file of GDB? "


      The only thing on the TopDesign is the UART component (SCB type).


      Does anyone have any ideas about the warning and the crash?