Index: head/devel/msp430-debug-stack/Makefile =================================================================== --- head/devel/msp430-debug-stack/Makefile (revision 465597) +++ head/devel/msp430-debug-stack/Makefile (revision 465598) @@ -1,55 +1,55 @@ # $FreeBSD$ PORTNAME= msp430-debug-stack PORTVERSION= 3.12.000.004 -PORTREVISION= 2 +PORTREVISION= 3 CATEGORIES= devel MASTER_SITES= http://www.ti.com/lit/sw/slac460x/ \ http://www.ti.com/lit/ug/slau320ac/:doc1 \ http://www.ti.com/lit/ug/slau656b/:doc2 DISTFILES= slac460x.zip \ slau320ac.pdf:doc1 \ slau656b.pdf:doc2 DIST_SUBDIR= ${PORTNAME}-${PORTVERSION} EXTRACT_ONLY= slac460x.zip MAINTAINER= lev@FreeBSD.org COMMENT= TI MSP430 debugging interface library LICENSE= BSD3CLAUSE LIB_DEPENDS= libboost_filesystem.so:devel/boost-libs \ libhidapi.so:comms/hidapi USES= compiler:c++11-lib dos2unix gmake zip:infozip USE_LDCONFIG= yes WRKSRC= ${WRKDIR} -DOS2UNIX_REGEX= .*\.(cpp|h) +DOS2UNIX_REGEX= .*/Makefile|.*\.(cpp|h) MAKE_ARGS+= BOOST_DIR=${LOCALBASE} \ HIDAPI_DIR=${LOCALBASE} MAKE_JOBS_UNSAFE= yes SUB_FILES+= pkg-message REINPLACE_ARGS= -i "" post-patch: @${FIND} ${WRKSRC}/DLL430_v3/src/TI/DLL430 \ \( -name '*.cpp' -o -name '*.h' \) -print0 | ${XARGS} -0 \ ${REINPLACE_CMD} -e 's|[io]fstream|std::&|; s|std::std::|std::|' do-install: ${INSTALL_LIB} ${WRKSRC}/libmsp430.so ${STAGEDIR}${PREFIX}/lib/libmsp430.so ${INSTALL_DATA} ${WRKSRC}/libmsp430.a ${STAGEDIR}${PREFIX}/lib/libmsp430.a ${MKDIR} ${STAGEDIR}${PREFIX}/include/libmsp430 ${INSTALL_DATA} ${WRKSRC}/DLL430_v3/include/* ${STAGEDIR}${PREFIX}/include/libmsp430/ ${MKDIR} ${STAGEDIR}${DOCSDIR} ${INSTALL_DATA} ${DISTDIR}/${DIST_SUBDIR}/slau320ac.pdf ${STAGEDIR}${DOCSDIR}/ ${INSTALL_DATA} ${DISTDIR}/${DIST_SUBDIR}/slau656b.pdf ${STAGEDIR}${DOCSDIR}/ ${MKDIR} ${STAGEDIR}${PREFIX}/etc/devd ${INSTALL_DATA} ${FILESDIR}/mspfet.conf ${STAGEDIR}${PREFIX}/etc/devd .include Index: head/devel/msp430-debug-stack/files/patch-DLL430_v3_src_DLL430_OldApiV3.cpp =================================================================== --- head/devel/msp430-debug-stack/files/patch-DLL430_v3_src_DLL430_OldApiV3.cpp (revision 465597) +++ head/devel/msp430-debug-stack/files/patch-DLL430_v3_src_DLL430_OldApiV3.cpp (revision 465598) @@ -1,56 +1,83 @@ ---- DLL430_v3/src/DLL430_OldApiV3.cpp.orig 2017-12-05 18:38:46.037302000 +0300 -+++ DLL430_v3/src/DLL430_OldApiV3.cpp 2017-12-05 18:40:21.357777000 +0300 -@@ -191,7 +191,7 @@ void DLL430_OldApiV3::event(DebugEventTa +--- DLL430_v3/src/DLL430_OldApiV3.cpp.orig 2018-03-26 17:21:18.500487000 +0300 ++++ DLL430_v3/src/DLL430_OldApiV3.cpp 2018-03-26 17:22:50.850255000 +0300 +@@ -191,7 +191,7 @@ //With trace/variable watch enabled, give storage events on same trigger time to be reported if (trace_storage.trControl == TR_ENABLE) { - this_thread::sleep_for(chrono::milliseconds(100)); + this_thread::sleep_for(std::chrono::milliseconds(100)); } db_man->pausePolling(); } -@@ -1524,7 +1524,7 @@ bool DLL430_OldApiV3::Erase(int32_t type +@@ -330,7 +330,7 @@ + catch (const std::runtime_error& e) + { + #ifndef NDEBUG +- ofstream("xml_error.log") << e.what() << endl; ++ std::ofstream("xml_error.log") << e.what() << endl; + #endif + log(LogTarget::ERR, DEVICE_DB_ERR, e.what()); + return false; +@@ -356,7 +356,7 @@ + catch (const std::runtime_error& e) + { + #ifndef NDEBUG +- ofstream("xml_error.log") << e.what() << endl; ++ std::ofstream("xml_error.log") << e.what() << endl; + #endif + log(LogTarget::ERR, DEVICE_DB_ERR, e.what()); + return false; +@@ -1569,7 +1569,7 @@ log(LogTarget::ERR, ERASE_ERR, ""); return false; } - this_thread::sleep_for(chrono::seconds(1)); + this_thread::sleep_for(std::chrono::seconds(1)); return true; } -@@ -1538,7 +1538,7 @@ bool DLL430_OldApiV3::Erase(int32_t type +@@ -1583,7 +1583,7 @@ } if (singleDevice) { - this_thread::sleep_for(chrono::seconds(1)); + this_thread::sleep_for(std::chrono::seconds(1)); return true; } } -@@ -1923,7 +1923,7 @@ bool DLL430_OldApiV3::Reset(int32_t meth +@@ -1987,7 +1987,7 @@ if (devArchitecture != MSP432_M4) { db_man->resumePolling(); - this_thread::sleep_for(chrono::milliseconds(500)); + this_thread::sleep_for(std::chrono::milliseconds(500)); db_man->pausePolling(); } if (!State(&state, true, &pCPUCycles)) -@@ -3781,7 +3781,7 @@ bool DLL430_OldApiV3::FET_FwUpdate( +@@ -3848,7 +3848,7 @@ + int timeout = 50; + while (timeout-- && !this->Initialize(&port[0], &version)) + { +- this_thread::sleep_for(chrono::seconds(1)); ++ this_thread::sleep_for(std::chrono::seconds(1)); + } + if (!handle) + { +@@ -3873,7 +3873,7 @@ + #endif + UpdateLog.append("\n---------------------Firmware upate end--------------------------\n"); - if (!handle) - { -- this_thread::sleep_for(chrono::seconds(3)); -+ this_thread::sleep_for(std::chrono::seconds(3)); - this->Initialize(&port[0], &version); +- ofstream(logfile.c_str(), ios::app | ios::out) << UpdateLog; ++ std::ofstream(logfile.c_str(), ios::app | ios::out) << UpdateLog; + } + } } - -@@ -4179,7 +4179,7 @@ bool DLL430_OldApiV3::writeToExternalMem +@@ -4272,7 +4272,7 @@ Run(FREE_RUN, true); // start execution of loader code - this_thread::sleep_for(chrono::seconds(15)); + this_thread::sleep_for(std::chrono::seconds(15)); int32_t state; int32_t pCPUCycles; Index: head/devel/msp430-debug-stack/files/patch-DLL430_v3_src_TI_DLL430_UpdateManagerFet.cpp =================================================================== --- head/devel/msp430-debug-stack/files/patch-DLL430_v3_src_TI_DLL430_UpdateManagerFet.cpp (revision 465597) +++ head/devel/msp430-debug-stack/files/patch-DLL430_v3_src_TI_DLL430_UpdateManagerFet.cpp (revision 465598) @@ -1,47 +1,64 @@ ---- DLL430_v3/src/TI/DLL430/UpdateManagerFet.cpp.orig 2017-12-05 18:47:14.471473000 +0300 -+++ DLL430_v3/src/TI/DLL430/UpdateManagerFet.cpp 2017-12-05 18:47:14.610002000 +0300 -@@ -128,7 +128,7 @@ bool UpdateManagerFet::updateCore(Memory - intCallback(BL_DATA_BLOCK_PROGRAMMED, (uint32_t)( 100-(requiredCoreUpdates)*requiredCoreUpdates), 0); +--- DLL430_v3/src/TI/DLL430/UpdateManagerFet.cpp.orig 2018-03-26 17:23:13.431436000 +0300 ++++ DLL430_v3/src/TI/DLL430/UpdateManagerFet.cpp 2018-03-26 17:25:33.815661000 +0300 +@@ -68,6 +68,7 @@ + + #include "../../../../Bios/include/MSP_FetDcdc.h" + #include "../../../../Bios/include/MSP_FetHal.h" ++#include "../../../../Bios/include/MSP_FetFpgaHal.h" + #include "../../../../Bios/include/MSP_FetHil.h" + #include "../../../../Bios/include/MSP_FetCore.h" + #include "../../../../Bios/include/MSP_FetComChannel.h" +@@ -131,7 +132,7 @@ + intCallback(BL_DATA_BLOCK_PROGRAMMED, (uint32_t)(100 - (requiredCoreUpdates)*percentCore), 0); } - this_thread::sleep_for(chrono::seconds(4)); + this_thread::sleep_for(std::chrono::seconds(4)); fetHandle->shutdown(); -@@ -141,7 +141,7 @@ bool UpdateManagerFet::updateCore(Memory +@@ -144,7 +145,7 @@ uint32_t countedHidDevices = 0, timeout = 50; do { - this_thread::sleep_for(chrono::seconds(1)); + this_thread::sleep_for(std::chrono::seconds(1)); countedHidDevices = HidUpdateManager::countHidDevices(currentPid); if (intCallback) -@@ -635,7 +635,7 @@ bool UpdateManagerFet::updateFpga() +@@ -648,7 +649,7 @@ // Start the FPGA update this->upInit(3); - this_thread::sleep_for(chrono::seconds(1)); + this_thread::sleep_for(std::chrono::seconds(1)); // Restore the normal HAL module if (returnValue && !updateHal()) -@@ -956,7 +956,7 @@ bool UpdateManagerFet::firmWareUpdate(co +@@ -839,7 +840,7 @@ + #endif + UpdateLog.append("\n---------------------Firmware upate end--------------------------\n"); +- ofstream(logfile.c_str(), ios::app | ios::out) << UpdateLog; ++ std::ofstream(logfile.c_str(), ios::app | ios::out) << UpdateLog; + } + + return retval; +@@ -1020,7 +1021,7 @@ + #endif UpdateLog.append("\n---------------------Firmware upate end--------------------------\n"); - ofstream(logfile.c_str(), ios::app | ios::out) << UpdateLog; + std::ofstream(logfile.c_str(), ios::app | ios::out) << UpdateLog; - #endif } return returnValue; -@@ -1063,7 +1063,7 @@ bool UpdateManagerFet::updateFirmware(co + } +@@ -1134,7 +1135,7 @@ this->upInit(0); // give the firmware time to execute initialisation - this_thread::sleep_for(chrono::seconds(1)); + this_thread::sleep_for(std::chrono::seconds(1)); return true; } Index: head/devel/msp430-debug-stack/files/patch-DLL430_v3_src_TI_DLL430_UpdateManagerMSP_FET430.cpp =================================================================== --- head/devel/msp430-debug-stack/files/patch-DLL430_v3_src_TI_DLL430_UpdateManagerMSP_FET430.cpp (revision 465597) +++ head/devel/msp430-debug-stack/files/patch-DLL430_v3_src_TI_DLL430_UpdateManagerMSP_FET430.cpp (revision 465598) @@ -1,29 +1,29 @@ ---- DLL430_v3/src/TI/DLL430/UpdateManagerMSP_FET430.cpp.orig 2017-12-05 18:38:46.041601000 +0300 -+++ DLL430_v3/src/TI/DLL430/UpdateManagerMSP_FET430.cpp 2017-12-05 18:41:45.548342000 +0300 -@@ -212,7 +212,7 @@ bool UpdateManagerMSP_FET430::firmWareUp - control->sendData(data_55); - control->clearResponse(); +--- DLL430_v3/src/TI/DLL430/UpdateManagerMSP_FET430.cpp.orig 2018-03-26 17:14:12.210044000 +0300 ++++ DLL430_v3/src/TI/DLL430/UpdateManagerMSP_FET430.cpp 2018-03-26 17:15:34.167641000 +0300 +@@ -226,7 +226,7 @@ -- this_thread::sleep_for(chrono::seconds(8)); -+ this_thread::sleep_for(std::chrono::seconds(8)); - } - - MemoryContent firmware; -@@ -282,7 +282,7 @@ bool UpdateManagerMSP_FET430::firmWareUp + for (int i = 0; i < 8; ++i) + { +- this_thread::sleep_for(chrono::seconds(1)); ++ this_thread::sleep_for(std::chrono::seconds(1)); + if (callback) + { + --requiredUpdates; +@@ -313,7 +313,7 @@ const bool initFailed = !this->fetHandle->send(initCmd); // give the firmware time to execute initialisation - this_thread::sleep_for(chrono::seconds(1)); + this_thread::sleep_for(std::chrono::seconds(1)); - - //Only an error if no user specified file is used (ie. init will fail for a downgrade) - if (initFailed && !fname) -@@ -300,7 +300,7 @@ bool UpdateManagerMSP_FET430::firmWareUp - cmd.elements.emplace_back(el); - + if (callback) + { + --requiredUpdates; +@@ -338,7 +338,7 @@ fetHandle->send(cmd); -- this_thread::sleep_for(chrono::seconds(2)); -+ this_thread::sleep_for(std::chrono::seconds(2)); - - if (callback) - callback(BL_UPDATE_DONE, 0, 0); + for (int i = 0; i < 2; ++i) + { +- this_thread::sleep_for(chrono::seconds(1)); ++ this_thread::sleep_for(std::chrono::seconds(1)); + if (callback) + { + --requiredUpdates;