i want to see output of Preprocessor calculating. Only with strings it works so:
#define XSTR(x) STR(x)
#define STR(x) #x
#define BEGIN "test"
#pragma message ".text= " XSTR(BEGIN)
when i set BEGIN to 32/2 the output is: #pragma message: .text= 32/2.
What can i make to solve this? I don´t won´t solutions like this to search in the .lss file:
uint16_t x = BEGIN;
PORTB = x>>8;
PORTA = x;
Thank you.
BEGINto32/2?#ifconditions. You won't get it to calculate and print something (let's ignore abominations like BOOST_PP). See also: stackoverflow.com/questions/1560357/…