This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Pass Strings for debug Command

Howdee

I'm trying to create a UART Debug Function in which i can pass it some parameters 1 of them a string or array of data I've tried then following but none of them work

FUNC void UARTinput(unsigned char CMD, unsigned char DATA[]) {
...
}

FUNC void UARTinput(unsigned char CMD, unsigned char DATA[255]) {
...
}

The idea is to run the Debug Function as follows:
UARTinput( 0x34, 'HELLO WORLD')

Parents
  • The second point is a mistake which i know i should have placed the Double quotes for a string... sorry about that.

    The problem is the variable "DATA"

    FUNC void UARTinput(unsigned char CMD, unsigned char DATA[]) {
    ...
    }
    
    FUNC void UARTinput(unsigned char CMD, unsigned char DATA[255]) {
    ...
    }
    

    When I compile using the Function Editor (in Debug Mode) it gives me an Error "Syntax error" which is not accepting the variable

    unsigned char DATA[]
    

    OR

    unsigned char DATA[255]
    

    is there another moethod of declaring a string for the Debugger scripting language.

Reply
  • The second point is a mistake which i know i should have placed the Double quotes for a string... sorry about that.

    The problem is the variable "DATA"

    FUNC void UARTinput(unsigned char CMD, unsigned char DATA[]) {
    ...
    }
    
    FUNC void UARTinput(unsigned char CMD, unsigned char DATA[255]) {
    ...
    }
    

    When I compile using the Function Editor (in Debug Mode) it gives me an Error "Syntax error" which is not accepting the variable

    unsigned char DATA[]
    

    OR

    unsigned char DATA[255]
    

    is there another moethod of declaring a string for the Debugger scripting language.

Children