Skip to content

Commit

Permalink
Add support for target reporting if it has nanoBooter (#785)
Browse files Browse the repository at this point in the history
  • Loading branch information
josesimoes authored Jul 16, 2018
1 parent 254ea36 commit 00fb357
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/CLR/Debugger/Debugger.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1041,6 +1041,11 @@ bool CLR_DBG_Debugger::Debugging_Execution_QueryCLRCapabilities( WP_Message* msg
reply.u_capsFlags |= CLR_DBG_Commands::Debugging_Execution_QueryCLRCapabilities::c_CapabilityFlags_ConfigBlockRequiresErase;
}

if (::Target_HasNanoBooter())
{
reply.u_capsFlags |= CLR_DBG_Commands::Debugging_Execution_QueryCLRCapabilities::c_CapabilityFlags_HasNanoBooter;
}

data = (CLR_UINT8*)&reply.u_capsFlags;
size = sizeof(reply.u_capsFlags);
break;
Expand Down
1 change: 1 addition & 0 deletions src/CLR/Include/nanoCLR_Debugging.h
Original file line number Diff line number Diff line change
Expand Up @@ -282,6 +282,7 @@ struct CLR_DBG_Commands
static const CLR_UINT32 c_CapabilityFlags_Profiling_Calls = 0x00000100;
static const CLR_UINT32 c_CapabilityFlags_ThreadCreateEx = 0x00000400;
static const CLR_UINT32 c_CapabilityFlags_ConfigBlockRequiresErase = 0x00000800;
static const CLR_UINT32 c_CapabilityFlags_HasNanoBooter = 0x00001000;

CLR_UINT32 m_cmd;

Expand Down
2 changes: 2 additions & 0 deletions targets/CMSIS-OS/ChibiOS/Include/targetHAL.h
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,8 @@ inline void HARD_Breakpoint() { };

#endif // !defined(BUILD_RTM)

inline bool Target_HasNanoBooter() { return true; };

#define NANOCLR_STOP() CPU_Reset();

inline void HAL_AssertEx()
Expand Down
2 changes: 2 additions & 0 deletions targets/FreeRTOS/ESP32_DevKitC/Include/targetHAL.h
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,8 @@ inline void HARD_Breakpoint() { };

#endif // !defined(BUILD_RTM)

inline bool Target_HasNanoBooter() { return false; };

#define NANOCLR_STOP() HARD_BREAKPOINT()

inline void HAL_AssertEx()
Expand Down
2 changes: 2 additions & 0 deletions targets/os/win32/Include/targetHAL.h
Original file line number Diff line number Diff line change
Expand Up @@ -44,4 +44,6 @@ inline bool Target_ConfigUpdateRequiresErase()

#endif // !defined(BUILD_RTM)

inline bool Target_HasNanoBooter() { return false; };

#endif //_TARGET_HAL_H_

0 comments on commit 00fb357

Please sign in to comment.