Dear all,my footprint of 51 on my project board is PLCC44,so the ICE can't be used(footprint is DIP40).I have to connect the 51's serial port to PC and dump everthing I need to it.So the program of debug version are full of "printf" statements which are unnecessary on release version.Thus,Can we write a "TRACE" macro to resolve it?MFC implement it for us while Keil C don't.
That error C214 you got almost certainly has nothing to do with the TRACE macro as such, but with the argument list you passed it. #defining DEBUG or RELEASE is supposed to be done by the project / makefile, so you can decide at compile time, outside the code, which modules to compile with the debug printouts active. Seriously, though: if you need to look into Microsoft SDKs to rip off a HIBYTE() macro instead of rolling your own, that's a strong sign you're in well over your head already. You'll have to brush up your knowledge of the C programming language considerably before you go on working on embedded software, I think.
What's wrong with my arg list?