I remember earlier this year reading about the EOL for MBED and that Arduino was going to transition to Zeyphyr. I believe I read somewhere that Arduino was planning on having something like a beta by the end of the year? Don't remember if it was specific on which of the MBED based Arduino boards or all of them.
Is this still the plan?
I believe it was either somewhere in the thread:
Mbed end of life - Hardware - Arduino Forum Or some of the links from that thread.
I know that we are early, but it can be fun to try to contribute where appropriate. We have been involved with the early phases of other boards, such as different Teensy boards.
Background
A couple of us including @Merlin513 and myself started playing with running the GIGA on Zephyr. Some of the details are in the forum thread: I2C, Serial, SPI experiments with Zephyr on Giga - Hardware / GIGA R1 - Arduino Forum
We started off using the instructions in the Readme file for the github project:
arduino/ArduinoCore-zephyr: Arduino Core based on Zephyr+llext
We started, by using the board manager to install the zephyr board package. The URL mentioned in the above readme: https://downloads.arduino.cc/packages/package_zephyr_index.json
We quickly learned the last release 0.1.3 was over a year old, and very primitive with only a few IO pins defined and likewise for other objects like Uarts, SPI, I2C...
We decided to go to the next step and setup the environment, and install the current stuff from github plus zephyr plus... And with the help of @ptillisch was able to build the more current stuff for the GIGA
I have it building both on Ubuntu 24.04 as well as on Windows 11 using WSL with Ubuntu 24.04
Some of it is sort of fun! For example: it is great that the SerialX objects writes are buffered. Note I created a PR against this project that fixes or implemented some of the methods. Things like: availableForWrite, flush(), read() returns -1 when empty...
Over the last couple of days, we have been trying to get SPI to work. We have a few things working, but in most cases, the board ends up logically dead. That is the board no longer shows up in the IDE... And in some cases, for no real obvious reason. Double click boot still works.
We are currently trying to get SDFat to work. Currently trying SDFat-beta.
I have sketch simple_sd, which is up on my github project: KurtE/Arduino_GIGA-stuff: This is my GIGA test sketches and other like stuff for Arduino GIGA boards
Where I am trying to figure out why the board will not init:
// digitalWrite(DEBUG_PIN, HIGH); // make sure display does not interfere
if (!sd.cardBegin(SD_CONFIG)) {
// digitalWrite(DEBUG_PIN, LOW); // make sure display does not interfere
Serial.print("Card Begin failed Error: ");
Serial.println(sd.sdErrorCode());
while (1) {}
}
//digitalWrite(DEBUG_PIN, LOW); // make sure display does not interfere
In this section of code, I do receive the Card Begin Failed message.
However if I uncomment the line digitalWrite(DEBUG_PIN, HIGH);
The board will crash, and I receive no Serial output at all from the sketch...
Questions:
-
is there a better place/way to ask questions, and discuss issues. Options might include punt, here, github, email, or ???
-
Best set of sources to use now? Currently we are using the Arduino branch of the ArduinoCore-Zephyr project. The bootstrap shell, does a git clone of the zephyr github library from //github.com/facchinm/zephyr, using a detached head of minifest-rev
I have noticed that @facchinm has at least two newer branches. -
When do you have to flash the GIGA? (new bootloader). Once with support for Zephyr? Or every time the device tree changes? every time the overlay changes?
-
Making changes to the device tree. For example, usart2 was not defined. Should you always add the object to the dts file? (arduino_giga_r1_stm32747xx_m7.dts) or is ok and
sufficient to simply add it to the overlay. Like in arduino_giga_r1_m7.overlay adding it as
&usart2 {
status = "okay";
pinctrl-0 = <&usart2_tx_pd5 &usart2_rx_pd6>;
pinctrl-names = "default";
current-speed = <115200>;
};
Do I always need to run the build.sh on it if I change either of the two files.
-
Debugging: does it work with the IDE? Or is there a different one, I tried with a
cmis-DAP adapter, but it did not want to start up. -
What does mode: Standard/Debug work? If I set it to debug I see a few things, printed
but not sure if there is supposed to be a command input or ... -
M4?? - Probably something for later
-
Crashes - As I mentioned, we are getting a lot of board stops (assuming a crash). Suggested way to debug? Sometimes just referencing an object in the sketch will cause it to crash as sketch startup. Is there some default crash monitor or the like where you can maybe find out where the code was?
-
What version of compiler and c++? I believe GCC is 12.2.0, did not fined where the version of C++ defined? Guessing c++17?
There are probably a lot more questions we could ask, but hopefully a good enough start.
Thanks
Kurt
