Fixed portability issue
This commit is contained in:
parent
b9c910b283
commit
336a9599e4
|
@ -102,7 +102,7 @@
|
||||||
<folderInfo id="cdt.managedbuild.config.gnu.exe.debug.119132886.1379881487." name="/" resourcePath="">
|
<folderInfo id="cdt.managedbuild.config.gnu.exe.debug.119132886.1379881487." name="/" resourcePath="">
|
||||||
<toolChain id="cdt.managedbuild.toolchain.gnu.base.204557880" name="Linux GCC" superClass="cdt.managedbuild.toolchain.gnu.base">
|
<toolChain id="cdt.managedbuild.toolchain.gnu.base.204557880" name="Linux GCC" superClass="cdt.managedbuild.toolchain.gnu.base">
|
||||||
<targetPlatform archList="all" binaryParser="org.eclipse.cdt.core.GNU_ELF" id="cdt.managedbuild.target.gnu.platform.base.1920367055" name="Debug Platform" osList="linux,hpux,aix,qnx" superClass="cdt.managedbuild.target.gnu.platform.base"/>
|
<targetPlatform archList="all" binaryParser="org.eclipse.cdt.core.GNU_ELF" id="cdt.managedbuild.target.gnu.platform.base.1920367055" name="Debug Platform" osList="linux,hpux,aix,qnx" superClass="cdt.managedbuild.target.gnu.platform.base"/>
|
||||||
<builder autoBuildTarget="riscv.sc" buildPath="${workspace_loc:/dbt-riscv}/build" enableAutoBuild="true" id="cdt.managedbuild.target.gnu.builder.base.847091814" incrementalBuildTarget="riscv.sc" keepEnvironmentInBuildfile="false" managedBuildOn="false" name="Gnu Make Builder" parallelBuildOn="false" superClass="cdt.managedbuild.target.gnu.builder.base"/>
|
<builder autoBuildTarget="riscv.sc" buildPath="${workspace_loc:/dbt-riscv}/build" enableAutoBuild="true" id="cdt.managedbuild.target.gnu.builder.base.847091814" incrementalBuildTarget="riscv.sc" keepEnvironmentInBuildfile="false" managedBuildOn="false" name="Gnu Make Builder" parallelBuildOn="true" parallelizationNumber="optimal" superClass="cdt.managedbuild.target.gnu.builder.base"/>
|
||||||
<tool id="cdt.managedbuild.tool.gnu.archiver.base.607972756" name="GCC Archiver" superClass="cdt.managedbuild.tool.gnu.archiver.base"/>
|
<tool id="cdt.managedbuild.tool.gnu.archiver.base.607972756" name="GCC Archiver" superClass="cdt.managedbuild.tool.gnu.archiver.base"/>
|
||||||
<tool id="cdt.managedbuild.tool.gnu.cpp.compiler.base.1040448746" name="GCC C++ Compiler" superClass="cdt.managedbuild.tool.gnu.cpp.compiler.base">
|
<tool id="cdt.managedbuild.tool.gnu.cpp.compiler.base.1040448746" name="GCC C++ Compiler" superClass="cdt.managedbuild.tool.gnu.cpp.compiler.base">
|
||||||
<option id="gnu.cpp.compiler.option.optimization.level.1204595436" name="Optimization Level" superClass="gnu.cpp.compiler.option.optimization.level" useByScannerDiscovery="false" value="gnu.cpp.compiler.optimization.level.none" valueType="enumerated"/>
|
<option id="gnu.cpp.compiler.option.optimization.level.1204595436" name="Optimization Level" superClass="gnu.cpp.compiler.option.optimization.level" useByScannerDiscovery="false" value="gnu.cpp.compiler.optimization.level.none" valueType="enumerated"/>
|
||||||
|
|
|
@ -7,12 +7,12 @@
|
||||||
if (USE_TCMALLOC)
|
if (USE_TCMALLOC)
|
||||||
set(Tcmalloc_NAMES tcmalloc)
|
set(Tcmalloc_NAMES tcmalloc)
|
||||||
else ()
|
else ()
|
||||||
set(Tcmalloc_NAMES tcmalloc_minimal tcmalloc)
|
set(Tcmalloc_NAMES tcmalloc_minimal tcmalloc tcmalloc_minimal4 libtcmalloc_minimal.so.4)
|
||||||
endif ()
|
endif ()
|
||||||
|
|
||||||
find_library(Tcmalloc_LIBRARY NO_DEFAULT_PATH
|
find_library(Tcmalloc_LIBRARY NO_DEFAULT_PATH
|
||||||
NAMES ${Tcmalloc_NAMES}
|
NAMES ${Tcmalloc_NAMES}
|
||||||
PATHS ${HT_DEPENDENCY_LIB_DIR} /lib /usr/lib /usr/local/lib /opt/local/lib
|
PATHS ${HT_DEPENDENCY_LIB_DIR} /lib /usr/lib /usr/lib/x86_64-linux-gnu /usr/local/lib /opt/local/lib
|
||||||
)
|
)
|
||||||
|
|
||||||
if (Tcmalloc_LIBRARY)
|
if (Tcmalloc_LIBRARY)
|
||||||
|
|
|
@ -55,11 +55,10 @@ void uart::reset_cb() {
|
||||||
}
|
}
|
||||||
|
|
||||||
void uart::transmit_data() {
|
void uart::transmit_data() {
|
||||||
|
if(regs->r_txdata.data != '\r') queue.push_back(regs->r_txdata.data);
|
||||||
if (queue.size() >> 0 && (regs->r_txdata.data == '\n' || regs->r_txdata.data == 0)) {
|
if (queue.size() >> 0 && (regs->r_txdata.data == '\n' || regs->r_txdata.data == 0)) {
|
||||||
LOG(INFO) << this->name() << " transmit: '" << std::string(queue.begin(), queue.end()) << "'";
|
LOG(INFO) << this->name() << " transmit: '" << std::string(queue.begin(), queue.end()) << "'";
|
||||||
queue.clear();
|
queue.clear();
|
||||||
} else {
|
|
||||||
queue.push_back(regs->r_txdata.data);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
Subproject commit db46dcd39581618564bd3e589c95c36c277679ed
|
Subproject commit 1f2e587562b1cd3742606115145700ac39ec4f9f
|
Loading…
Reference in New Issue