I am building my project using opta lites.
I am testing the multicore functionality, as I will drive the ethernet/Modbus from CM7 and input/outputs from CM4 using RPC between them.
To start building tests, I've written the following simple test code:
Core M7 boots the coprocessor, prints two lines on the serial when running the setup() and blinks led D0.
Core M4 just turns on Leds D2 and D3.
After programming both cores, Serial.println() is never seen in the serial console. LED_D0 is blinking, Leds D2-D3 are turned on. but the serial print is never written.
Any idea on what's missing here?
#ifdef CORE_CM4
void setup() {
// put your setup code here, to run once:
pinMode(LED_D2, OUTPUT);
pinMode(LED_D3, OUTPUT);
}
void loop() {
// put your main code here, to run repeatedly:
digitalWrite(LED_D2, HIGH);
digitalWrite(LED_D3, HIGH);
}
#else
void setup() {
// put your setup code here, to run once:
Serial.begin(9600);
Serial.println(" Main core booted. Booting Secondary core...");
bootM4();
Serial.println("Secondary core booted.");
}
void loop() {
// put your main code here, to run repeatedly:
}
#endif