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

Enable WireProtocol in nanoBooter #177

Merged
merged 1 commit into from
Mar 14, 2017
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
9 changes: 9 additions & 0 deletions CMake/Modules/FindNF_Debugger.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@

# set include directories for nanoFramework Debugger
list(APPEND NF_Debugger_INCLUDE_DIRS ${PROJECT_SOURCE_DIR}/src/CLR/Debugger)
list(APPEND NF_Debugger_INCLUDE_DIRS ${PROJECT_SOURCE_DIR}/src/CLR/Messaging)
list(APPEND NF_Debugger_INCLUDE_DIRS ${PROJECT_SOURCE_DIR}/src/CLR/WireProtocol)
list(APPEND NF_Debugger_INCLUDE_DIRS ${PROJECT_SOURCE_DIR}/src/CLR/Include)

# source files for nanoFramework Debugger
Expand All @@ -13,13 +15,20 @@ set(NF_Debugger_SRCS
Debugger.cpp
Debugger_full.cpp

Messaging.cpp
WireProtocol.cpp

nanoSupport_CRC32.c
)

foreach(SRC_FILE ${NF_Debugger_SRCS})
set(NF_Debugger_SRC_FILE SRC_FILE-NOTFOUND)
find_file(NF_Debugger_SRC_FILE ${SRC_FILE}
PATHS
${PROJECT_SOURCE_DIR}/src/CLR/Debugger
${PROJECT_SOURCE_DIR}/src/CLR/Messaging
${PROJECT_SOURCE_DIR}/src/CLR/WireProtocol
${PROJECT_SOURCE_DIR}/src/CLR/Core

CMAKE_FIND_ROOT_PATH_BOTH
)
Expand Down
2 changes: 2 additions & 0 deletions CMake/Modules/FindWireProtocol.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,15 @@ set(WireProtocol_SRCS
WireProtocol_HAL_Interface.c
WireProtocol_App_Interface.c

nanoSupport_CRC32.c
)

foreach(SRC_FILE ${WireProtocol_SRCS})
set(WireProtocol_SRC_FILE SRC_FILE-NOTFOUND)
find_file(WireProtocol_SRC_FILE ${SRC_FILE}
PATHS
${PROJECT_SOURCE_DIR}/src/CLR/WireProtocol
${PROJECT_SOURCE_DIR}/src/CLR/Core

CMAKE_FIND_ROOT_PATH_BOTH
)
Expand Down
2 changes: 1 addition & 1 deletion src/CLR/CorLib/CorLib_Native_System_TimeSpan.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ HRESULT Library_corlib_native_System_TimeSpan::ToString___STRING( CLR_RT_StackFr
size_t iBuffer = ARRAYSIZE(rgBuffer);
CLR_INT64* val = GetValuePtr( stack ); FAULT_ON_NULL(val);

HAL_Time_TimeSpanToStringEx( *val, szBuffer, iBuffer );
// FIXME UNDONE HAL_Time_TimeSpanToStringEx( *val, szBuffer, iBuffer );

NANOCLR_SET_AND_LEAVE(stack.SetResult_String( rgBuffer ));

Expand Down
2 changes: 2 additions & 0 deletions src/CLR/WireProtocol/WireProtocol_Message.c
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
// See LICENSE file in the project root for full license information.
//

#include <nanoHAL_Time.h>
#include <nanoSupport.h>
#include "WireProtocol_Message.h"

uint8_t receptionBuffer[2048];
Expand Down
3 changes: 0 additions & 3 deletions src/CLR/WireProtocol/WireProtocol_Message.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,4 @@ bool WP_Message_Process(WP_Message* message);
// helper functions
void ReplyToCommand(WP_Message* message, bool fSuccess, bool fCritical, void* ptr, int size);

//uint32_t SUPPORT_ComputeCRC(const void* rgBlock, int nLength, uint32_t crc);

#endif // _WIREPROTOCOL_MESSAGE_H_

2 changes: 1 addition & 1 deletion src/HAL/Include/nanoHAL_Time.h
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ HRESULT HAL_Time_AccDaysInMonth(INT32 year, INT32 month, INT32* days);
INT64 HAL_Time_FromSystemTime(const SYSTEMTIME* systemTime);

/// APIs to convert between types
BOOL HAL_Time_TimeSpanToStringEx( const INT64& ticks, LPSTR& buf, size_t& len );
// FIXME BOOL HAL_Time_TimeSpanToStringEx( const INT64& ticks, LPSTR& buf, size_t& len );
LPCSTR HAL_Time_CurrentDateTimeToString();

#endif //_NANOHAL_TIME_H_
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ void ReceiverThread(void const * argument)
// loop until thread receives a request to terminate
while (!chThdShouldTerminateX()) {

// WP_CheckAvailableIncomingData();
WP_CheckAvailableIncomingData();

osDelay(500);
}
Expand Down