M4 IDE compile difference rc1 and just release RC2

Discussion in 'UDOO NEO' started by Mikeee, Apr 7, 2016.

  1. Mikeee

    Mikeee Member

    Joined:
    Nov 1, 2013
    Messages:
    55
    Likes Received:
    17
    The following code compiles, loads and runs ok on version rc1 but not on the new RC2 version. It is a modified MultiSerial example from the IDE. I'm using the M4 to provide access to an external port for the A9. A python script sends data through the M4 to a device connected to the external serial port on pins 0 and 1. The external device doesn't send any data until the python script sends data to it. I'm aware of the lockup issue due to buffer over-run but the code ran flawlessly previously and still does when compiled with the rc1 IDE.

    What is seen at the external device port is garbled data and then UdooNeo lock up. In order to get it functional I copied the m4last.fw file from a SD that was compiled on the rc1 IDE and replace the m4last.fw at /var/opt/m4 on the SD card that has the RC2 IDE compiled version. Reboot and run without lockup.

    void setup() {
    // initialize both serial ports
    // Serial0 is M4 ext pin 0 and 1
    // Serial is /dev/ttyMCC A9 to M4 core
    Serial.begin(115200);
    delay(100);
    Serial0.begin(9600);
    delay(100);
    }
    void loop() {
    // read from port 0, send to port A9 Serial:
    if (Serial0.available()) {
    int inByte = Serial0.read();
    Serial.write(inByte);
    }
    // read from port A9 Serial, send to port 0:
    if (Serial.available()) {
    int inByte = Serial.read();
    Serial0.write(inByte);
    }
    }
     
    delba likes this.

Share This Page