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

Work on UNDONE FIXME #621

Merged
merged 1 commit into from
Feb 16, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 0 additions & 4 deletions src/CLR/Core/CLR_RT_HeapBlock_Timer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -217,10 +217,6 @@ HRESULT CLR_RT_HeapBlock_Timer::ConfigureObject( CLR_RT_StackFrame& stack, CLR_U
const CLR_INT64 maxTime = (CLR_INT64)0x7FFFFFFF * (CLR_INT64)TIME_CONVERSION__TO_MILLISECONDS;
const CLR_INT64 minTime = 0;

// UNDONE: FIXME: _ASSERTE(Library_corlib_native_System_Threading_Timer::FIELD___timer == Library_spot_native_Microsoft_SPOT_ExtendedTimer::FIELD___timer );
// UNDONE: FIXME: _ASSERTE(Library_corlib_native_System_Threading_Timer::FIELD___state == Library_spot_native_Microsoft_SPOT_ExtendedTimer::FIELD___state );
// UNDONE: FIXME: _ASSERTE(Library_corlib_native_System_Threading_Timer::FIELD___callback == Library_spot_native_Microsoft_SPOT_ExtendedTimer::FIELD___callback);

if(flags & CLR_RT_HeapBlock_Timer::c_ACTION_Create)
{
FAULT_ON_NULL(args[ 0 ].DereferenceDelegate());
Expand Down
1 change: 0 additions & 1 deletion src/CLR/Core/Execution.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2976,7 +2976,6 @@ void CLR_RT_ExecutionEngine::StopOnBreakpoint( CLR_DBG_Commands::Debugging_Execu
bp = def;

CLR_EE_DBG_SET(Stopped);
// UNDONE: FIXME: CLR_RT_EmulatorHooks::Notify_ExecutionStateChanged();

if(th)
{
Expand Down
3 changes: 1 addition & 2 deletions src/CLR/Core/TypeSystem.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3103,8 +3103,7 @@ HRESULT CLR_RT_Assembly::Resolve_ComputeHashes()

const char* fieldName = inst.m_assm->GetString( fd->name );

// UNDONE: FIXME
// hash = SUPPORT_ComputeCRC( fieldName, (CLR_UINT32)hal_strlen_s(fieldName), hash );
hash = SUPPORT_ComputeCRC( fieldName, (CLR_UINT32)hal_strlen_s(fieldName), hash );
}
}

Expand Down
60 changes: 3 additions & 57 deletions src/CLR/Debugger/Debugger.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -48,58 +48,6 @@ void CLR_DBG_Debugger::Debugger_WaitForCommands()
}
}

void CLR_DBG_Debugger::Debugger_Discovery()
{
NATIVE_PROFILE_CLR_DEBUGGER();

CLR_INT32 wait_sec = 5;

CLR_INT64 expire = HAL_Time_CurrentTime() + (wait_sec * TIME_CONVERSION__TO_SECONDS);

//
// Send "presence" ping.
//
Monitor_Ping_Reply cmd;

cmd.m_source = Monitor_Ping_c_Ping_Source_NanoCLR;

while(true)
{
CLR_EE_DBG_EVENT_BROADCAST(CLR_DBG_Commands::c_Monitor_Ping, sizeof(cmd), &cmd, WP_Flags_c_NoCaching | WP_Flags_c_NonCritical);

// if we support soft reboot and the debugger is not stopped then we don't need to connect the debugger
if(!CLR_EE_DBG_IS(Stopped) && ::CPU_IsSoftRebootSupported())
{
break;
}

g_CLR_RT_ExecutionEngine.DebuggerLoop();

if(CLR_EE_DBG_IS(Enabled))
{
//
// Debugger on the other side, let's exit the discovery loop.
//
CLR_Debug::Printf( "Found debugger!\r\n" );
break;
}

CLR_INT64 now = HAL_Time_CurrentTime();

if(expire < now)
{
//
// No response in time...
//
CLR_Debug::Printf( "No debugger!\r\n" );
break;
}
}

g_CLR_RT_ExecutionEngine.WaitForDebugger();
}


////////////////////////////////////////////////////////////////////////////////////////////////////

HRESULT CLR_DBG_Debugger::CreateInstance()
Expand Down Expand Up @@ -851,9 +799,9 @@ bool CLR_DBG_Debugger::Monitor_Reboot( WP_Message* msg)
{
WP_ReplyToCommand(msg, true, false, NULL, 0);

// UNDONE: FIXME Events_WaitForEvents( 0, 100 ); // give message a little time to be flushed
Events_WaitForEvents( 0, 100 ); // give message a little time to be flushed

// UNDONE: FIXME HAL_EnterBooterMode();
HAL_EnterBooterMode();
}

g_CLR_RT_ExecutionEngine.m_iReboot_Options = cmd->m_flags;
Expand Down Expand Up @@ -927,8 +875,6 @@ bool CLR_DBG_Debugger::Debugging_Execution_ChangeConditions( WP_Message* msg)
WP_ReplyToCommand( msg, true, false, &cmdReply, sizeof(cmdReply) );
}

// UNDONE: FIXME: CLR_RT_EmulatorHooks::Notify_ExecutionStateChanged();

return true;
}

Expand Down Expand Up @@ -1126,7 +1072,7 @@ bool CLR_DBG_Debugger::Debugging_UpgradeToSsl(WP_Message* msg)

WP_ReplyToCommand( msg, true, true, &reply, sizeof(reply) );

// UNDONE: FIXME Events_WaitForEvents(0, 300);
Events_WaitForEvents(0, 300);

return true == DebuggerPort_UpgradeToSsl(HalSystemConfig.DebuggerPort, cmd->m_flags);
}
Expand Down
5 changes: 0 additions & 5 deletions src/CLR/Debugger/Debugger_stub.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,6 @@ __nfweak void CLR_DBG_Debugger::Debugger_WaitForCommands()
NATIVE_PROFILE_CLR_DEBUGGER();
}

__nfweak void CLR_DBG_Debugger::Debugger_Discovery()
{
NATIVE_PROFILE_CLR_DEBUGGER();
}

__nfweak void CLR_DBG_Debugger::PurgeCache()
{
NATIVE_PROFILE_CLR_DEBUGGER();
Expand Down
1 change: 0 additions & 1 deletion src/CLR/Include/nanoCLR_Debugging.h
Original file line number Diff line number Diff line change
Expand Up @@ -1000,7 +1000,6 @@ struct CLR_DBG_Debugger

//--//

static void Debugger_Discovery();
static void Debugger_WaitForCommands();

static HRESULT CreateInstance();
Expand Down
2 changes: 0 additions & 2 deletions src/CLR/Include/nanoCLR_Hardware.h
Original file line number Diff line number Diff line change
Expand Up @@ -120,8 +120,6 @@ struct CLR_HW_Hardware
HRESULT ProcessInterrupts();
HRESULT SpawnDispatcher();
HRESULT TransferAllInterruptsToApplicationQueue();

// UNDONE: FIXME: void Screen_Flush( CLR_GFX_Bitmap& bitmap, CLR_UINT16 x, CLR_UINT16 y, CLR_UINT16 width, CLR_UINT16 height );
};

extern CLR_HW_Hardware g_CLR_HW_Hardware;
Expand Down
2 changes: 1 addition & 1 deletion src/HAL/Include/nanoHAL.h
Original file line number Diff line number Diff line change
Expand Up @@ -1838,7 +1838,7 @@ bool Watchdog_GetSetEnabled ( bool enabled, bool fSet );

#if defined(_WIN32)

#define GLOBAL_LOCK(x) // UNDONE: FIXME: SmartPtr_IRQ x
#define GLOBAL_LOCK(x)
//#define DISABLE_INTERRUPTS() SmartPtr_IRQ::ForceDisabled()
//#define ENABLE_INTERRUPTS() SmartPtr_IRQ::ForceEnabled()
//#define INTERRUPTS_ENABLED_STATE() SmartPtr_IRQ::GetState()
Expand Down
3 changes: 1 addition & 2 deletions targets/CMSIS-OS/ChibiOS/Include/targetHAL.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,7 @@

#if !defined(BUILD_RTM)

// FIXME IMPLEMENT
//inline void HARD_Breakpoint() { };
inline void HARD_Breakpoint() { };

#define HARD_BREAKPOINT() HardFault_Handler()

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -123,8 +123,6 @@ int Monitor_Reboot(WP_Message* message)
// only reset if we are not trying to get into the bootloader
if((cmd->m_flags & Monitor_Reboot_c_EnterBootloader) != Monitor_Reboot_c_EnterBootloader)
{
// UNDONE: FIXME: Events_WaitForEvents( 0, 100 );

// RESET CPU
// because ChibiOS relies on CMSIS it's recommended to make use of the CMSIS API
NVIC_SystemReset();
Expand Down
7 changes: 0 additions & 7 deletions targets/CMSIS-OS/ChibiOS/nanoCLR/CLRStartup.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,6 @@ struct Settings
CLR_Debug::Printf( "Started Hardware.\r\n" );
#endif

// UNDONE: FIXME: CLR_DBG_Debugger::Debugger_Discovery();

m_fInitialized = true;


Expand Down Expand Up @@ -336,13 +334,8 @@ void ClrStartup(CLR_SETTINGS params)

nanoHAL_Uninitialize();

// UNDONE: FIXME: SmartPtr_IRQ::ForceDisabled();

//re-init the hal for the reboot (initially it is called in bootentry)
nanoHAL_Initialize();

// make sure interrupts are back on
// UNDONE: FIXME: SmartPtr_IRQ::ForceEnabled();
}
else
{
Expand Down
1 change: 0 additions & 1 deletion targets/FreeRTOS/ESP32_DevKitC/Include/targetHAL.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@

#if !defined(BUILD_RTM)

// FIXME IMPLEMENT
inline void HARD_Breakpoint() { };

#define HARD_BREAKPOINT() HARD_Breakpoint()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -123,8 +123,6 @@ int Monitor_Reboot(WP_Message* message)
// only reset if we are not trying to get into the bootloader
if((cmd->m_flags & Monitor_Reboot_c_EnterBootloader) != Monitor_Reboot_c_EnterBootloader)
{
// UNDONE: FIXME: Events_WaitForEvents( 0, 100 );

// RESET CPU
esp_restart();
}
Expand Down
8 changes: 0 additions & 8 deletions targets/FreeRTOS/ESP32_DevKitC/nanoCLR/CLRStartup.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -44,11 +44,8 @@ struct Settings
CLR_Debug::Printf( "Started Hardware.\r\n" );
#endif

// UNDONE: FIXME: CLR_DBG_Debugger::Debugger_Discovery();

m_fInitialized = true;


NANOCLR_NOCLEANUP();
}

Expand Down Expand Up @@ -337,13 +334,8 @@ void ClrStartup(CLR_SETTINGS params)

nanoHAL_Uninitialize();

// UNDONE: FIXME: SmartPtr_IRQ::ForceDisabled();

//re-init the hal for the reboot (initially it is called in bootentry)
nanoHAL_Initialize();

// make sure interrupts are back on
// UNDONE: FIXME: SmartPtr_IRQ::ForceEnabled();
}
else
{
Expand Down
8 changes: 0 additions & 8 deletions targets/os/win32/nanoCLR/CLRStartup.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,6 @@ struct Settings
CLR_Debug::Printf( "Started Hardware.\r\n" );
#endif

CLR_DBG_Debugger::Debugger_Discovery();

m_fInitialized = true;


Expand Down Expand Up @@ -715,13 +713,8 @@ void ClrStartup( CLR_SETTINGS params )

//nanoHAL_Uninitialize();

// UNDONE: FIXME: SmartPtr_IRQ::ForceDisabled();

//re-init the hal for the reboot (initially it is called in bootentry)
//nanoHAL_Initialize();

// make sure interrupts are back on
// UNDONE: FIXME: SmartPtr_IRQ::ForceEnabled();
}
else
{
Expand All @@ -730,4 +723,3 @@ void ClrStartup( CLR_SETTINGS params )
}
} while( softReboot );
}