diff --git a/devel/msp430-debug-stack/Makefile b/devel/msp430-debug-stack/Makefile index 51c02b9dd83d..77b05bcbcc86 100644 --- a/devel/msp430-debug-stack/Makefile +++ b/devel/msp430-debug-stack/Makefile @@ -1,57 +1,55 @@ PORTNAME= msp430-debug-stack PORTVERSION= 3.15.1.1 -PORTREVISION= 10 +PORTREVISION= 11 CATEGORIES= devel MASTER_SITES= https://dr-download.ti.com/software-development/driver-or-library/MD-4vnqcP1Wk4/${PORTVERSION}/ \ LOCAL/lev:doc1 \ LOCAL/lev:doc2 DISTFILES= MSPDebugStack_OS_Package_${PORTVERSION:S/./_/g}.zip \ slau320aj.pdf:doc1 \ slau656d.pdf:doc2 EXTRACT_ONLY= MSPDebugStack_OS_Package_${PORTVERSION:S/./_/g}.zip MAINTAINER= lev@FreeBSD.org COMMENT= TI MSP430 debugging interface library WWW= http://www.ti.com/tool/mspds LICENSE= BSD3CLAUSE -BROKEN= fails to build with Boost>=1.87 - LIB_DEPENDS= libboost_filesystem.so:devel/boost-libs \ libhidapi.so:comms/hidapi USES= compiler:c++11-lib dos2unix gmake zip:infozip USE_LDCONFIG= yes DOS2UNIX_REGEX= .*/Makefile|.*\.(cpp|h) MAKE_ARGS= BOOST_DIR=${LOCALBASE} \ HIDAPI_DIR=${LOCALBASE} MAKE_JOBS_UNSAFE= yes NO_WRKSUBDIR= yes SUB_FILES= pkg-message REINPLACE_ARGS= -i "" OPTIONS_DEFINE= DOCS 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}/slau320aj.pdf ${STAGEDIR}${DOCSDIR}/ ${INSTALL_DATA} ${DISTDIR}/${DIST_SUBDIR}/slau656d.pdf ${STAGEDIR}${DOCSDIR}/ ${MKDIR} ${STAGEDIR}${PREFIX}/etc/devd ${INSTALL_DATA} ${FILESDIR}/mspfet.conf ${STAGEDIR}${PREFIX}/etc/devd .include diff --git a/devel/msp430-debug-stack/files/patch-DLL430__v3_src_TI_DLL430_UsbCdcIoChannel.cpp b/devel/msp430-debug-stack/files/patch-DLL430__v3_src_TI_DLL430_UsbCdcIoChannel.cpp index e65c70898d70..3bb02c53d7a1 100644 --- a/devel/msp430-debug-stack/files/patch-DLL430__v3_src_TI_DLL430_UsbCdcIoChannel.cpp +++ b/devel/msp430-debug-stack/files/patch-DLL430__v3_src_TI_DLL430_UsbCdcIoChannel.cpp @@ -1,33 +1,86 @@ ---- DLL430_v3/src/TI/DLL430/UsbCdcIoChannel.cpp.orig 2020-02-14 09:38:32 UTC +--- DLL430_v3/src/TI/DLL430/UsbCdcIoChannel.cpp.orig 2025-02-14 17:38:09 UTC +++ DLL430_v3/src/TI/DLL430/UsbCdcIoChannel.cpp +@@ -42,7 +42,7 @@ + + #include + #include +-#include ++#include + + #if defined(_WIN32) || defined(_WIN64) + +@@ -181,7 +181,7 @@ void UsbCdcIoChannel::createCdcPortList(const uint16_t + + for (;;) + { +- io_service_t device = IOIteratorNext(iterator); ++ io_context_t device = IOIteratorNext(iterator); + if (device == 0) + { + if (!IOIteratorIsValid(iterator)) @@ -310,6 +310,22 @@ void UsbCdcIoChannel::createCdcPortList(const uint16_t } #else stringstream cdcIdStream; + +#ifdef __FreeBSD__ + + path p( "/dev" ); + if( exists(p) && is_directory(p) ) { + + cdcIdStream << hex << setfill('0') << "mspfet" << setw(4) << productId; + + const directory_iterator end; + for( directory_iterator it(p); it != end; ++it ) { + + string dir = it->path().string(); + if( dir.find( cdcIdStream.str() ) != string::npos ) { + { + +#else cdcIdStream << hex << setfill('0') << "usb:v" << setw(4) << vendorId << "p" << setw(4) << productId; path p("/sys/class/tty/"); @@ -331,6 +347,7 @@ void UsbCdcIoChannel::createCdcPortList(const uint16_t ifNumStream >> interfaceNumber; if (modalias.find(cdcIdStream.str()) == 0 && interfaceNumber == 0) { +#endif const string filename = it->path().filename().string(); const string portPath = string("/dev/") + filename; +@@ -376,7 +393,7 @@ bool UsbCdcIoChannel::openPort() + + bool UsbCdcIoChannel::openPort() + { +- ioService = new boost::asio::io_service; ++ ioService = new boost::asio::io_context; + port = new boost::asio::serial_port(*ioService); + timer = new boost::asio::deadline_timer(*ioService); + +@@ -542,7 +559,7 @@ size_t UsbCdcIoChannel::read(HalResponse& resp) + + boost::system::error_code ec; + +- while (ioService->run_one(ec)) ++ while (ioService->run_one()) + { + if (readEvent) + { +@@ -577,13 +594,13 @@ size_t UsbCdcIoChannel::read(HalResponse& resp) + + if (ioService->stopped()) + { +- ioService->reset(); ++ ioService->restart(); + } + } + + //Let cancelled tasks finish +- ioService->run(ec); +- ioService->reset(); ++ ioService->run(); ++ ioService->restart(); + + + if (actSize == expSize) diff --git a/devel/msp430-debug-stack/files/patch-DLL430__v3_src_TI_DLL430_UsbCdcIoChannel.h b/devel/msp430-debug-stack/files/patch-DLL430__v3_src_TI_DLL430_UsbCdcIoChannel.h new file mode 100644 index 000000000000..7d5a7f5dfe50 --- /dev/null +++ b/devel/msp430-debug-stack/files/patch-DLL430__v3_src_TI_DLL430_UsbCdcIoChannel.h @@ -0,0 +1,20 @@ +--- DLL430_v3/src/TI/DLL430/UsbCdcIoChannel.h.orig 2025-04-02 18:10:46 UTC ++++ DLL430_v3/src/TI/DLL430/UsbCdcIoChannel.h +@@ -45,7 +45,7 @@ + + #include + #include +-#include ++#include + + namespace TI + { +@@ -74,7 +74,7 @@ namespace TI + + private: + std::vector inputBuffer; +- boost::asio::io_service* ioService; ++ boost::asio::io_context* ioService; + boost::asio::serial_port* port; + boost::asio::deadline_timer* timer; + ComState comState; diff --git a/devel/msp430-debug-stack/files/patch-ThirdParty_BSL430__DLL_BSL430__DLL_Physical__Interfaces_MSPBSL__PhysicalInterfaceSerialUART.cpp b/devel/msp430-debug-stack/files/patch-ThirdParty_BSL430__DLL_BSL430__DLL_Physical__Interfaces_MSPBSL__PhysicalInterfaceSerialUART.cpp new file mode 100644 index 000000000000..8e2381a91f25 --- /dev/null +++ b/devel/msp430-debug-stack/files/patch-ThirdParty_BSL430__DLL_BSL430__DLL_Physical__Interfaces_MSPBSL__PhysicalInterfaceSerialUART.cpp @@ -0,0 +1,11 @@ +--- ThirdParty/BSL430_DLL/BSL430_DLL/Physical_Interfaces/MSPBSL_PhysicalInterfaceSerialUART.cpp.orig 2025-04-02 18:13:20 UTC ++++ ThirdParty/BSL430_DLL/BSL430_DLL/Physical_Interfaces/MSPBSL_PhysicalInterfaceSerialUART.cpp +@@ -129,7 +129,7 @@ MSPBSL_PhysicalInterfaceSerialUART::MSPBSL_PhysicalInt + + + //TODO: Catch exception forunknown ports +- io_service io; ++ io_context io; + port = new serial_port( io, PORT ); + port->set_option( serial_port_base::character_size( 8 ) ); + port->set_option( serial_port_base::flow_control( serial_port_base::flow_control::none ) ); diff --git a/devel/msp430-debug-stack/files/patch-ThirdParty_BSL430__DLL_BSL430__DLL_Physical__Interfaces_MSPBSL__PhysicalInterfaceSerialUART.h b/devel/msp430-debug-stack/files/patch-ThirdParty_BSL430__DLL_BSL430__DLL_Physical__Interfaces_MSPBSL__PhysicalInterfaceSerialUART.h new file mode 100644 index 000000000000..898f1e9cf840 --- /dev/null +++ b/devel/msp430-debug-stack/files/patch-ThirdParty_BSL430__DLL_BSL430__DLL_Physical__Interfaces_MSPBSL__PhysicalInterfaceSerialUART.h @@ -0,0 +1,10 @@ +--- ThirdParty/BSL430_DLL/BSL430_DLL/Physical_Interfaces/MSPBSL_PhysicalInterfaceSerialUART.h.orig 2025-04-02 18:10:22 UTC ++++ ThirdParty/BSL430_DLL/BSL430_DLL/Physical_Interfaces/MSPBSL_PhysicalInterfaceSerialUART.h +@@ -72,6 +72,6 @@ class MSPBSL_PhysicalInterfaceSerialUART : public MSPB + virtual std::string getErrorInformation( uint16_t err ); + + private: +- boost::asio::io_service io; ++ boost::asio::io_context io; + boost::asio::serial_port* port; + };