please help
Please make the title of the thread more descriptive!
The 'C' programming language requires that identifiers must be defined (or, at least, declared) before they can be used.
So, if the compiler tells you that something is un-deinfed, the solution is to define it.
Have you omitted to include a required header file?
Have you omitted to make required settings in the sdk_config.h file?
Please provide your main.c file, and sdk_config.h file. This way it is much easier to help you figure out what the problem is. Please also compare your code (run a diff on the main.c files) to the original example that you started out with. Maybe you have modified something you did not mean to modify.