// os_delay_us(50*1000); // delay 50ms before init uart
#ifdef DEVELOP_VERSION
uart_init(BIT_RATE_74880,BIT_RATE_74880);
#else
uart_init(BIT_RATE_9600,BIT_RATE_9600);
#endif
// uart_init(BIT_RATE_115200, BIT_RATE_115200);
#ifndef NODE_DEBUG
system_set_os_print(0);
#endif
NODE_ERR("\n");
// Initialize platform first for lua modules.
if(platform_init()!=PLATFORM_OK)
{
// This should never happen
NODE_DBG("Can not init platform for modules.\n");
return;
}
#if defined( BUILD_WOFS )
romfs_init();
// if( !wofs_format() )
// {
// NODE_ERR( "\ni*** ERROR ***: unable to erase the flash. WOFS might be compromised.\n" );
// NODE_ERR( "It is advised to re-flash the NodeWifi image.\n" );
// }
// else
// NODE_ERR( "format done.\n" );
// test_romfs();
#elif defined ( BUILD_SPIFFS )
spiffs_mount();
// test_spiffs();
#endif
// endpoint_setup();
// char* lua_argv[] = { (char *)"lua", (char *)"-e", (char *)"print(collectgarbage'count');ttt={};for i=1,100 do table.insert(ttt,i*2 -1);print(i);end for k, v in pairs(ttt) do print('<'..k..' '..v..'>') end print(collectgarbage'count');", NULL };