Hi, what I want to have is better debugging when things go wrong.
And for this, I want assert() that prints out on console (if present) and also default trap handler printing out salient system state (we can also make this output part of corefile and/or system log). Also I want the system to have 2 different types of assert() calls. One that is only checked when doing debug builds, and another one which is always checked. I was thinking ASSERT_DEBUG() and ASSERT(), respectively. What I’m wondering is where to put header files like this? hw/hal egg is present always, but I’m not sure that is the right spot to place this in. What do you guys think about sys/include? And 2nd (related) topic: At the moment there is libs/console/full and libs/console/stub. What kind of mechanism should we have for picking between these two implementation? What I’d need is a way for a builder of project to pick between these, and all eggs in the project to have include the header file for the right implementation. But I also want to be able to specify within egg definition that the egg will make calls to console_printf(). Egg itself does not care which one of the implementations gets used. Is there a way to do this kind of thing yet? — M
