-
I have a deployment (built for RPi running Ubuntu server, and my own Linux computer) ready that utilizes a UART-connected GPS module (NEO M9N, over USB). I have gotten F' to successfully "open" the serial address where the GPS is located, but when I try to run "startReadThread" on the corresponding I am running my binary like so: # example for my Linux --> similar for RPi deployment
sudo build-artifacts/Linux/GpsTestDeployment/bin/GpsTestDeployment -a 127.0.0.1 -p 50000 I have used multiple debugging tools (i.e., gdb) to read the coredump generated, but it just gives me a massive runaround. I have commented out all of my implementations in my Component folder (that handles the GPS), so I am 99% certain that the issue is with "startReadThread". I have also independently ensured my GPS module is working properly. How can I go about solving this issue? Some code snippets are below: deployment > Top > Toplogy.cpp void configureTopology() {
...
bool uart_success = GpsTestDeployment::serialDriver.open("/dev/ttyACM0",
Drv::LinuxUartDriver::BAUD_9600,
Drv::LinuxUartDriver::NO_FLOW,
Drv::LinuxUartDriver::PARITY_NONE,
true);
if(uart_success){
// I do reach here successfully
logger.log("[INFO] UART opened successfully\n");
GpsTestDeployment::serialDriver.startReadThread(); // where the error happens
} else {
logger.log("[ERROR] UART failed to open\n");
}
... deployment > instances.fpp ...
instance gpsModule: Components.GpsModule base id 0x4B00 \
queue size Default.QUEUE_SIZE \
stack size Default.STACK_SIZE \
priority 30
instance serialDriver: Drv.LinuxUartDriver base id 0x6D00 deployment > topology.fpp ...
instance serialDriver
instance gpsModule
...
connections UART {
# gpsModule.UartBuffers -> serialDriver.$recv
serialDriver.$recv -> gpsModule.UartRead
} Components > GpsModule > GpsModule.cpp ...
void GpsModule ::
UartRead_handler(
const NATIVE_INT_TYPE portNum,
Fw::Buffer &recvBuffer,
const Drv::RecvStatus &recvStatus)
{
// char uMsg[recvBuffer.getSize() + 1];
// char *bPtr = reinterpret_cast<char *>(recvBuffer.getData());
// for (NATIVE_UINT_TYPE byte = 0; byte < recvBuffer.getSize(); byte++)
// {
// uMsg[byte] = isalpha(bPtr[byte]) ? bPtr[byte] : '*';
// }
// uMsg[sizeof(uMsg) - 1] = 0;
// this->m_uartReadBytes += recvBuffer.getSize();
// recvBuffer.setSize(40);
// this->UartBuffers_out(0, recvBuffer);
// this->tlmWrite_UartRecvBytes(this->m_uartReadBytes);
}
... |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 20 replies
-
I realize the core dump might also be useful (from valgrind) Exiting with abort signal and core dump file.
==2694==
==2694== Process terminating with default action of signal 6 (SIGABRT)
==2694== at 0x48797D8: raise (raise.c:51)
==2694== by 0x43B88F: Svc::FatalHandlerComponentImpl::FatalReceive_handler(int, unsigned int) (in /home/fprime-node1/GpsTestDeployment/aarch64-linux/GpsTestDeployment/bin/GpsTestDeployment)
==2694== by 0x43BC47: Svc::FatalHandlerComponentBase::FatalReceive_handlerBase(int, unsigned int) (in /home/fprime-node1/GpsTestDeployment/aarch64-linux/GpsTestDeployment/bin/GpsTestDeployment)
==2694== by 0x43BBDB: Svc::FatalHandlerComponentBase::m_p_FatalReceive_in(Fw::PassiveComponentBase*, int, unsigned int) (in /home/fprime-node1/GpsTestDeployment/aarch64-linux/GpsTestDeployment/bin/GpsTestDeployment)
==2694== by 0x43BDEB: Svc::InputFatalEventPort::invoke(unsigned int) (in /home/fprime-node1/GpsTestDeployment/aarch64-linux/GpsTestDeployment/bin/GpsTestDeployment)
==2694== by 0x43BFFB: Svc::OutputFatalEventPort::invoke(unsigned int) (in /home/fprime-node1/GpsTestDeployment/aarch64-linux/GpsTestDeployment/bin/GpsTestDeployment)
==2694== by 0x417147: Svc::ActiveLoggerComponentBase::FatalAnnounce_out(int, unsigned int) (in /home/fprime-node1/GpsTestDeployment/aarch64-linux/GpsTestDeployment/bin/GpsTestDeployment)
==2694== by 0x4143C3: Svc::ActiveLoggerImpl::LogRecv_handler(int, unsigned int, Fw::Time&, Fw::LogSeverity const&, Fw::LogBuffer&) (in /home/fprime-node1/GpsTestDeployment/aarch64-linux/GpsTestDeployment/bin/GpsTestDeployment)
==2694== by 0x418D6F: Svc::ActiveLoggerComponentBase::LogRecv_handlerBase(int, unsigned int, Fw::Time&, Fw::LogSeverity const&, Fw::LogBuffer&) (in /home/fprime-node1/GpsTestDeployment/aarch64-linux/GpsTestDeployment/bin/GpsTestDeployment)
==2694== by 0x418C97: Svc::ActiveLoggerComponentBase::m_p_LogRecv_in(Fw::PassiveComponentBase*, int, unsigned int, Fw::Time&, Fw::LogSeverity const&, Fw::LogBuffer&) (in /home/fprime-node1/GpsTestDeployment/aarch64-linux/GpsTestDeployment/bin/GpsTestDeployment)
==2694== by 0x46F923: Fw::InputLogPort::invoke(unsigned int, Fw::Time&, Fw::LogSeverity const&, Fw::LogBuffer&) (in /home/fprime-node1/GpsTestDeployment/aarch64-linux/GpsTestDeployment/bin/GpsTestDeployment)
==2694== by 0x46FC4F: Fw::OutputLogPort::invoke(unsigned int, Fw::Time&, Fw::LogSeverity const&, Fw::LogBuffer&) (in /home/fprime-node1/GpsTestDeployment/aarch64-linux/GpsTestDeployment/bin/GpsTestDeployment)
==2694==
==2694== HEAP SUMMARY:
==2694== in use at exit: 138,370 bytes in 138 blocks
==2694== total heap usage: 148 allocs, 10 frees, 218,082 bytes allocated
==2694==
==2694== LEAK SUMMARY:
==2694== definitely lost: 0 bytes in 0 blocks
==2694== indirectly lost: 0 bytes in 0 blocks
==2694== possibly lost: 4,320 bytes in 15 blocks
==2694== still reachable: 134,050 bytes in 123 blocks
==2694== suppressed: 0 bytes in 0 blocks
==2694== Rerun with --leak-check=full to see details of leaked memory
==2694==
==2694== For lists of detected and suppressed errors, rerun with: -s
==2694== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 0 from 0) |
Beta Was this translation helpful? Give feedback.
-
Hi! I ran into the same issue. So there's no need to call And what should be the
Which seems to be linked to the id ? Thank you for the clarifications above! |
Beta Was this translation helpful? Give feedback.
Apologies, I miss-read it. The Linux driver needs to be hooked up to a memory provider. Thus the
allocate
port should be hooked-up to a buffer manager or static memory instance. Otherwise it cannot get memory it needs to read the port.