Using: uVision 5 *** Using Compiler 'V5.06 update 6 (build 750)', folder: 'C:\Keil\uVision5\ARM\ARMCC\Bin'
I'm trying to make a variable equal to a binary number, something like:
unsigned char Number = 0b00001111;
The IDE doesn't show any issues on the screen, but the compiler comes back with this error:
..\ZCU\source\code\Debug_rW.c(67): error: #19: extra text after expected end of number
How do I get round this?
Secondly, I which to view that "Number" in a watch window as a binary number, is this possible? I can only see Hex and Decimal as an option.
Many thanks for any input.
Regards, R
C Does not typically provide a way to enter Binary representation of a number, but you could write a macro to do this:
http://www.keil.com/support/docs/1156.htm
Or use the octal notation trick
http://www.keil.com/forum/21497/how-to-input-a-binary-number/
If you are using ARM Compiler 6, you can use ARM Assembly to write a Binary Literal:
developer.arm.com/.../numeric-literals