Hi again, Attached is the code that I'm using if anyone would like to try to replicate my issue. The test_msg_py.py file contains the custom python block code for a simple message sink. The test_msg_impl.cc, test_msg_impl.h, and test_msg.h files contain the custom C++ code for a message sink. The test.py file contains a simple flowgraph that connects a message strobe to my custom message sink blocks. When I run test.py with either of the blocks on my desktop, it works correctly. However, when I run test.py after cross compiling on the E310, it works correctly with the test_msg_py block and produces the following error with the test_msg block: Could not find port: in in: system Bus error
Thanks, Jessica From: Discuss-gnuradio [mailto:discuss-gnuradio-bounces+jessica.iwamoto=aero....@gnu.org] On Behalf Of Jessica Iwamoto Sent: Wednesday, May 10, 2017 9:53 AM To: discuss-gnuradio@gnu.org Subject: [Discuss-gnuradio] Custom C++ blocks on E310 Hi all, I have built custom C++ blocks that work on my PC, but don't work when cross compiled for the E310. Specifically, I am trying to build a custom C++ block with a message port and cross compile it for the E310. I am using version 3.7.12 of GNU radio and the latest version of the SDK/toolchain for the E310. I have built a simple message sink block with just a message input port and put it in a flowgraph with a message strobe. My code runs correctly on my PC but when I run it on the E310, I get the error: Could not find port: msg in: system Bus error I am able to create custom python blocks with message ports and run them on the E310 and my PC with no issues. Additionally, I am unable to create custom C++ blocks with normal input and output streams on the E310 (the program seg faults when I try to connect the custom block to another block), but they run correctly on my PC. Any suggestions on what could be causing this? Thanks, Jessica
#ifndef INCLUDED_CUSTOMMOD_TEST_MSG_H #define INCLUDED_CUSTOMMOD_TEST_MSG_H #include <custommod/api.h> #include <gnuradio/block.h> namespace gr { namespace custommod { /*! * \brief <+description of block+> * \ingroup custommod * */ class CUSTOMMOD_API test_msg : virtual public gr::block { public: typedef boost::shared_ptr<test_msg> sptr; /*! * \brief Return a shared_ptr to a new instance of custommod::test_msg. * * To avoid accidental use of raw pointers, custommod::test_msg's * constructor is in a private implementation * class. custommod::test_msg::make is the public interface for * creating new instances. */ static sptr make(); }; } // namespace custommod } // namespace gr #endif /* INCLUDED_CUSTOMMOD_TEST_MSG_H */
#ifndef INCLUDED_CUSTOMMOD_TEST_MSG_IMPL_H #define INCLUDED_CUSTOMMOD_TEST_MSG_IMPL_H #include <pmt/pmt.h> #include <custommod/test_msg.h> namespace gr { namespace custommod { class test_msg_impl : public test_msg { private: // Nothing to declare in this block. public: test_msg_impl(); ~test_msg_impl(); void msg_handler_method(pmt::pmt_t msg); }; } // namespace custommod } // namespace gr #endif /* INCLUDED_CUSTOMMOD_TEST_MSG_IMPL_H */
test.py
Description: test.py
test_msg_impl.cc
Description: test_msg_impl.cc
test_msg_py.py
Description: test_msg_py.py
_______________________________________________ Discuss-gnuradio mailing list Discuss-gnuradio@gnu.org https://lists.gnu.org/mailman/listinfo/discuss-gnuradio