>>From: disruptivesolution...@gmail.com <disruptivesolution...@gmail.com>

>1) If I enable Debug Assertions the build will not run at all as it halts very 
>very
>early on. Debugger suggests the system is in up_idle().

>> Mostly this is caused by a "fault" somewhere down the line.
>> Does it "print" ABCDE?

Nope, nothing. It simply appears to do nothing. Any messages are not 
"escaping". 

>>Did you enable "debug" in make menuconfig?

As in "Enable Debug Feature"? Yes. If there's something else I missed I can't 
find it!

>2) Any (valid and enabled) call for a debug info/warn/error message produces
>no actual message on the console. Not just in the CAN example but others
>too. Console (and nsh) working fine. For example, the PWM example works
>just fine. If I enable debug messages for this it doesn't crash, still works as
>expected, but no debug message text. FYI I added this to the example to
>prove the point:
>
>  #if defined CONFIG_DEBUG_PWM_INFO
>  printf("PWM_WARN_PRINTF_DEBUG\n");
>  pwmerr("PWMINFO: starting pwm example PWM\n");
>  #else
>    printf("JUST A PWM WARN PRINTF\n");
>  #endif
>
>I get the "PWM_WARN_PRINTF_DEBUG" text on the console, but not the
>"PWMINFO:starting pwm example PWM" text. 

>> pwmerr is only when the "error" on PWM occurs. Did you try _info? Or 
>> caninfo? 

Pwmerr will be called as per coding. I called it in the case of no error and it 
should work. But even pwminfo and pwmwarn (or caninfo or canwarn) do not 
produce text EVER. Nor do any other debug calls in any other place. Ever.

>But I am trying to continue to basically prove my board is actually OK from a 
>hardware point of view. 

>> Why should it not be? Does nsh work and USART? (basic functionality?). And 
>> SPI?

Because it's a new board and a new port, and the first time NuttX has been run 
on it. Nsh works, USART works, SPI - not tested yet. I can run built-in apps 
from the nsh console...and it is running the CAN example this way that I see 
the crash; and running the PWM example this way that I see no debug messages.

These things all work with my bare metal code derived from the Atmel "softpack" 
except CAN because I think the softpack CAN code is buggy so I am not 100% sure 
the CAN hardware works right yet. I would rather spend my time getting it 
working under NuttX than bare metal as the bare metal route is not being 
pursued now.

>

>Can anyone offer any insight into why Assert and debug info/warn/error
>messages are "misbehaving" like this? --> I tried to give you some heads up.

>>https://nuttx.apache.org/docs/latest/quickstart/debugging.html

Yes, I have followed that. I have read everything I can find, Googled for 
hours, and no luck yet :(

I should have my full Linux dev environment up and running by Monday and I hope 
I can then debug it properly. But in the mean time I still hope to get basic 
assert and debug messages working!

Reply via email to