This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

MACROS TOO NESTED

I'm not very familiar with keil and normally never include c files, i add them to a project.

But new to keil i added only my main.c to the project and included every *.c file in main.c.

While testing my code i found it too nasty so i added the c files to the project and removed the includes from main.c.

But after doing this i got a "MACROS TOO NESTED" error message like in this thread: http://www.keil.com/forum/docs/thread15729.asp.

Removing the c files from the project and reincluding them in main.c solved the problem. My code is running fine this way without a change.

Any idea why this happens? Am I doing something wrong when adding c files to the project?

  • It's quite impossible to offer any meaningful assistance based on the information you gave --- because there is effectively none at all.

    The #include *.c issue almsot certainly has nothing to do with the actual problem. It's a classic red herring.

    You should boil down the problem to the smallest example case you can find, and if the cause isn't brutally self-evident by then, post that reduced example here.

  • "new to keil i added only my main.c to the project and included every *.c file in main.c"

    Whatever made you think that would be a good idea??!

  • If it doesn-t have anything to do with including *.c files why does the code work if i include the *.c files in main.c and does not if added to the project?

    I think my question was clear, why this happens is everything i like to know.

  • because it was the fastest - and only - way to get keil compiling my code.

    i know many developer enviroments for many different platforms/cpus and i choosed keil after evaluating multiple enviroments.

    i had no problem with keil and do not have it right now, but this one happened the second time.

    my code is running by the way... i just would like to know why it did because it happened the second time.