Forum Rule: Always post complete source code & details to reproduce any issue!
Results 1 to 2 of 2

Thread: MAVLINK Library crashing Teensy 3.1 [Error 43]

  1. #1
    Junior Member
    Join Date
    May 2014

    MAVLINK Library crashing Teensy 3.1 [Error 43]

    I've read about the Error 43 and had it before (flashed hex compiled for UNO).
    I can always get it working by flashing the blink.ino.

    Now i want to implement the MAVLINK telemtry protocol.
    For the most basic usage you need to send a "heartbeat", with just a little bit of code:

    #include <mavlink.h>
    int system_type = MAV_FIXED_WING;
    int autopilot_type = MAV_AUTOPILOT_GENERIC;
    mavlink_message_t msg;
    uint8_t buf[MAVLINK_MAX_PACKET_LEN];
    void setup(){
      Serial.println("Serial online");
      pinMode(13, OUTPUT);
      Serial.println("Mavlink online");
    void loop(){
    	digitalWrite(13, HIGH);
    	digitalWrite(13, LOW);
    void heartbeat(){
    	mavlink_msg_heartbeat_pack(100, 200, &msg, system_type, autopilot_type);
    	uint16_t len = mavlink_msg_to_send_buffer(buf, &msg);
    	Serial1.write(buf, len);
    I pretty much follow the tutorial
    with as header files.

    I suspect that in the library some unsupported functions are used. But what could that be and how can i find it?

    I got it working with the official c_library for Mavlink:
    The definitions and include functions are a bit different but should work.
    Last edited by Flydroid; 05-03-2015 at 12:41 AM.

  2. #2
    Junior Member
    Join Date
    Mar 2015
    US, Midwest
    Also had this problem. Traced it down to the existence of the "bittest.c" file in the library directory. When the mavlink library gets included in the Teensy sketch, the bittest.c file also gets compiled and included. The bittest.c file has a "main()" function in it and I think that's what messes up the Teensy. I removed the bittest.c file from the library directory and now things appear to be compiling and working properly. At least the Teensy isn't hanging or locking up and screwing up the USB interface as soon as the sketch is downloaded.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts