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')
In what way, exactly, do they "not work"?
You have made two silly mistakes in your post:
1. You didn't follow the instructions on how to post source code;
2. The 'C' language does not use single quotes for strings
So the chances are high that the problem is due to a "silly mistake" somewhere in your code - but only you have the code, so only you can find it!
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"
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.
Arrays, structures and pointers are not allowed. This is stated in the documentation.
Drats thats dissapointing...
Thanx Jakob
No - it's just wrong!
Keil tools certainly do support pointers & arrays & structures!
What happens if you use a name other than DATA...?
And you're sure that applies to debugger functions too?
Ah - no.
I totally missed that!
>blush<
Yes that is one of the restrictions of uVision Debug Functions - see: http://www.keil.com/support/man/docs/uv4/uv4_df_diffbtwdbgandc.htm (5th bullet point).
My mistake.
View all questions in Keil forum