Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Debug dbgprintf logs location #1019

Closed
cystbear opened this issue Aug 11, 2022 · 3 comments
Closed

Debug dbgprintf logs location #1019

cystbear opened this issue Aug 11, 2022 · 3 comments

Comments

@cystbear
Copy link

cystbear commented Aug 11, 2022

According numerous issues related to Hori gamepad e.g. #923
I decided build Nintendont with debug true.

In file kernel/HID.c there is dbgprintf declaration

@carnage702 could you please hint where such logs (dbgprints) goes?, like:

dbgprintf("HIDOpen()\r\n");
dbgprintf("HID:DeviceID:%u\r\n", DeviceID );
dbgprintf("HID:VID:%04X PID:%04X\r\n", DeviceVID, DevicePID );

etc.
Cause there is not any such entries at ndebug.log

Thanks in advance.

@cystbear cystbear changed the title Debug HID Debug dbgprintf logs location Aug 11, 2022
@carnage702
Copy link
Collaborator

i never used the debug only fix94 used it im guessing he readed them on his usb gecko or something so no idea.

@NightEule5
Copy link

Yep, it prints to ndebug.log when the SD card is initialized, to a USB Gecko if not. From vsprintf.c:

int dbgprintf( const char *fmt, ...)
{
    ...	
    if( SDisInit )
    {
        if(file_opened != FR_OK)	//if log not open yet
        {
            file_opened = f_open_char(&dbgfile, "/ndebug.log", FA_OPEN_ALWAYS|FA_WRITE);

            ...
        }
    }

    if( !IsWiiU() ) // usbgecko?
        svc_write(buffer);

    ...
}

HID is initialized before the SD card (done when a game is selected in the loader), so messages from there won't show up in the log file. I had been wondering the same

@cystbear
Copy link
Author

Closing as far it is not actual anymore

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants