I have boot_serial code sample customized to work as Ethernet boot loader. Customization is done by changing some constants in bl_config.h file. This file is attached to the post. It works with enet_lwip code sample.
When the board starts, boot loader successfully loads enet_lwip program from address 0x4000. I can make Ethernet update using eflash program.
Now I want to learn better, how boot loader works, when the board is powered up. I am trying to do this using UARTprintf. So, I added uartstdio.h and uartstdio.c files to boot_serial project, and made the following change in CheckForceUpdate function:
uint32_t
CheckForceUpdate(void)
{
#ifdef CHECK_CRC
uint32_t ui32Retcode;
#endif
#ifdef BL_CHECK_UPDATE_FN_HOOK
//
// If the update check function is hooked, call the application to determine
// how to proceed.
//
return(BL_CHECK_UPDATE_FN_HOOK());
#else
uint32_t *pui32App;
#ifdef ENABLE_UPDATE_CHECK
g_ui32Forced = 0;
#endif
// new lines:
UARTStdioConfig(0, 115200, 120000000); // 120000000 like in EnetReconfig(120000000) call
UARTprintf("CheckForceUpdate\n");
This function is called when board is powered up or reset. However, COM port monitor on the PC doesn't print "CheckForceUpdate" line. Probably, some other initialization is missing. How can I fix this and get UARTprintf tracing in the bootloader?