CORE2 with RPI connected

Dear Husarion community,

For some time I have been using CORE2 board with two programming options:

  1. Cloud connection via ESP32
  2. Direct usb connection with the VS Code editor

Now I am thinking about the third possible way - CORE2 and RPI connection.

I would like to ask you about the potential benefits of such solution?
What kind of programming tools can I use?
Can I use the RPI board for programming CORE2? If yes, in which environment? Is it installed on image proposed in Downloads | Husarion ?

Thanks for your time
Tom

Hello Tom,

Using CORE2 with RPi allows you to directly program CORE2, there is no need for cloud connection or additional USB cable.
For the software tool, there were some changes introduced, main difference is that we are using now MBED for programming CORE2 instead of hFramework. Although hFramework is still supported, we are recommending MBED for new projects.
In the case you want to still use hFramework, RPi allows to use both cloud connection and USB programming, in the same way as you did until now. The RPi image for using with hFramework is available here.
In the case you want to switch to MBED, you can develop firmware with VSC using this tutorial.
You can flash firmware to CORE2 board with use of stm32loader directly from RPi board.
Firmware based on MBED used in ROSbots is on repository
The RPi image available in Downloads section already contains new firmware and stm32loader tool.
The MBED version is NOT compatible with cloud, you can use it only in offline mode.

Regards,
Łukasz

Hallo Łukasz,
Thanks very much for detailed explanation.

I have used the RPi image (rpi-2019-06-10.img.xz) and found the light Ubuntu version there. I understand that it is in some way configured to work with the CORE2 board using hRPI interface. In this configuration, RPi takes the function of ESP32 (in other solution) enabling the WiFi connection to the cloud. For programming purposes I should use the cloud interface?
But what about the offline tools like VS Code for instance? In the RPi image I did not find any software for C/C++ programming like VS Code for instance. Is it a good practice to use the VS Code installed in RPi or is there any light version of it for RPi? And another question: using VS Code, should I additionally (RPi and CORE2 are already connected through hRPI) connect the USB cable from RPi to CORE2 for bin/hex download?
For now I am not using the MBED solution so my questions refer to hFramework only.
Tom

Hello Tom,

The RPi image does not come with installed VSCode but you can install it, there are no restrictions on it.
As far as I concern, there is no light version of VSCode for RPi.
The same goes for stm32loader, which is not preinstalled but can be used on RPi. Furthermore, it takes as inpyt data only binary file, so it is able to flash firmware built with any other tool.
The drawback is that it is not integrated with VSCode extension, it is available only in the command line.
If you want to keep using VSCode’s function Ctrl+Shift+P and “flash core2" , then USB cable is required.

Regards,
Łukasz

Dear Łukasz,
Thanks very much for the answer.

In the meantime, browsing through this forum, I have found a link to
one of the tutorials that explains elements from my topic:

Unfortunately, the tutorial cannot be reached from Tutorials (how to start section) on the main husarion.com page. Was the “how to start section” modified or maybe I can get it from somewhere else?
The reason I ask is that maybe you have created some other tutorials to the other templates in the cloud environment.
This could be very helpful for me to analyze the template concepts this way.

Thanks in advance.
Tom