Arduino Giga R1 Interesting Software Problem

I am trying to use RPC and program the M4 core and talk to the M7 core. That worked fine the first time but I made some software changes in the M4 core and after downloading the new software the serial output remained the same. To experiment I tried downloading the WiFi example into the M7 core and it worked fine. Next I loaded the RPC example into the M7 and M4 cores and when I did a reset the same output from the WiFi came back on the serial output. Yes, I did carefully select under tools the flash split and selected the proper core for the sketch. Several days ago I loaded the RPC example into my new Giga R1 and it came back with 'Hello World' just as expected. Now whenever I change the text in the R4 sketch to something like 'Hello from the R4 core' it still comes back with Hello World. I had another Giga R1 that did it as well so I'm not sure if it's a IDE 2.2.1 problem (which I'm using) or something else. Maybe the Flash memory isn't changing. So far everything works fine except for my RPC experiments.

Hi @sparkyron48. I used this set of simple sketches to try to reproduce the problem you reported on my own GIGA R1 WiFi board:

// Upload this sketch to the M4 core.
#include <RPC.h>

void setup() {
  RPC.begin();
}

void loop() {
  RPC.println("Hello World");
  delay(1000);
}
// Upload this sketch to the M7 core.

#include <RPC.h>

void setup() {
  Serial.begin(9600);
  RPC.begin();
}

void loop() {
  while (RPC.available()) {
    Serial.write(RPC.read());
  }
}

I get the expected result of the board printing "Hello World" to Serial Monitor at 0.5 Hz.

I then changed this line in the M4 core sketch:

  RPC.println("Hello World");

to this:

  RPC.println("Hello from the R4 core");

and I then see the expected result of the board printing "Hello from the R4 core" to Serial Monitor at 0.5 Hz. So everything is working as expected for me.


If you try the same thing I describe above, do you get the expected results?


While I was doing this, I discovered a bug in Arduino IDE 2.x that can cause the sketch to be uploaded to a different core than the one you selected from the IDE's Tools > Target core menu:

This is most likely to happen when you have two different sketches open in separate Arduino IDE windows and are alternately uploading one to the M7 core and the other to the M4 core on the board.

Uploading to a different core than intended can cause unexpected results, but it won't produce the results you described using the sketches I shared above so I'm not sure whether that bug is the cause of the results you described. But I suppose that with a different sketch it could cause those results.

Thank you for the reply.

I did some experiments this morning and had some expected results and some unexpected ones. When I was doing the programming, I did have two separate sketches open in two separate windows and was making changes and uploading them multiple times. The sketches were called _M4 and _M7 so I didn’t get too confused, and I made sure that each program went to the proper core. Mostly all went well until I made a change to the _M4 core and the Giga R1 crashed with the blinking red LED. Usually everything on this Giga was using port 10 but after the crash it was trying to switch me to port 11. I double tapped the reset button and got the flashing green LED and was able to reupload a sketch while everything was saying port 11 but after a successful upload the system switched back to port 10. I’ve had this happen before. At the moment all is working fine. I have to admit that while I was having the port problem I cheated and switched over to Visual Studio Code and that liked port 10 but I couldn’t upload anything. While using VSC I haven’t had any problems reprogramming so I believe that the Giga R1 is OK, and all my difficulties are with the Arduino IDE. I’ll try some programming with only one sketch open in the IDE and all other programs closed and see how that works. Now I want to see if I can use the M4 core to remote call a routine in the M7 core and I might have some need for that functionality. I’ve tried that previously without success. I do like the Arduino IDE the best and if I continue to have strange issues, I’ll try uninstalling the app and then do a reinstall and see if that changes anything.

Hello!
I can also confirm this problem, this error. Unfortunately, this error only occurs sporadically, completely random and illogical, incomprehensible. I think it's the GiGa board (firmware), because this board doesn't always do exactly what it's supposed to do in other areas!!!!!
I'm waiting for firmware updates in the future!
Greetings from Uli