Problem with building firmware on VSCode

The Husarion team no longer supports hFramework but our firmware is written with this framework and we don’t have any plans to port it to Mbed for now, as it works for us.

I just tested building it on Linux and on Windows and didn’t have any problems.
Please try to follow these steps again:

  1. Make sure you have the Husarion extension and C/C++ extension enabled on your VSCode. Disable any other extensions that might be in conflict.
  2. Make the clean clone of the leo_firmware repository:
    git clone https://github.com/LeoRover/leo_firmware.git
    
  3. Click on File -> Open Folder and select the newly clone firmware code.

After this, you should see new files being created, in particular the .vscode directory with build tasks definition. Let me know if something actually happens.

Can I also ask why do you want to build the firmware manually? You can flash the newest binary by typing on the rover:

rosrun leo_fw update

Uploading: Screenshot from 2021-06-14 05-39-34.png…Uploading: Screenshot from 2021-06-14 05-34-58.png…
Uploading: Screenshot from 2021-06-14 05-24-56.png…

Hi, Mr. Blazej Sowa,
Please take a look my procedure as above screenshot.
The reason why I build the firmware manually because I faced many problem in the past .
At this moment , I get trouble only with Husarion Core -2 board. All another troubles resolved .I jsut want to see motor run ,it’s successful.
Thank you
Best regards

Do you have the CORE2 board connected to Raspberry Pi via GPIO pins and powered on? Do you see any LEDs lit on the board?

Yes, CORE 2 Board still connect to Raspberry PI 4 via GPIO pins as normal .
We see LED lit on board . We have experience on it because this is Husarion second Board.First Board have problem and replaced new one.
Husarion still help us resolve this problem. It seems problem from hardware .
They said that they will find simple way for helping us.
Thank you

2 posts were split to a new topic: ROS communication with computer


We replaced new microSD card and re-install all of your instruction in Leo but still trouble as attached screenshot. . Do you think Husarion Core2 have problem ?
Could we replace another board ? For example : Roboteq motor controller mode SBL-2360T or Pixhawk 4, because they prepare software ready to plug-play .
Thank you

Could you share some photos of your RPi <-> Core2 connection?


IMG_2128
We attached 02 photos of connection RPI and Core 2 .
First photo is LED in Core 2 ( at top) lit ( only yellow).
Second photo is LED in RPI (at bottom) ( Red and Green lit)


And this is my LeoRover robot finished but not running in long time ago until now.
Are you sure it is operate well after fix some mistake ? All parts are new , especially Hokuyo Lidar sensor .I hope you will support to me this robot.
Thank you for your team .

What Raspberry Pi model do you have? Please disconnect all motors from the board and try to flash it again.

I still used Raspberry Pi 4 from LeoRover supply (Mr.Szymon given) and I did not use any motors in this case because LeoRover was not running . It 's not from hardware but software .In previous time,I thought same you ,therfore I bought new raspberry Pi 3 for replacing and remake SD microcard boot with your newest LeoOS-0.2.2-2021-06-22-full.img, re-install again to Rover , repeat many times the procedure of LeoRover from 5-10 times but unfortunately , not succcesful .
Would you like instruct by remote through TEAM VIEWER online to our Rover ? I think by that way, you can understand what we did when see some files and find solution .
Thank you .

This looks more and more like a faulty core2 board, but I want you to try this before drawing any conclusions:

  1. Disconnect the motor cables from the board - just to make sure there isn’t any short circuit caused by faulty connection.
  2. Use a USB-microUSB cable to connect RPi to hSerial (microUSB) port on the core2 board - this might be hard to fit inside the box so you may eventually need to move the hardware outside the box.
  3. Access the rover’s terminal via SSH or remote desktop and do this:
    1. Download the firmware hex:
      wget https://github.com/LeoRover/leo_firmware/releases/download/v1.2.0/leo_firmware.hex
      
      You will need to have RPi connected to the Internet. Alternatively you can download it to your computer and upload to the rover.
    2. Try to use core2-flasher utility to flash it:
      core2-flasher leo_firmware.hex
      

Preferably use Raspberry Pi 4 from our supply.

I already tested this way but not successful. Core 2 Board no action ,only LED yellow lit .
The under message from HUSARION , he instruct to me another way for testing this board .
He said that if 03 LED’s on board lit means that Core 2 board running, unfortunately, same above case;

Hope it will work and will be a good

starting point for you for future developement.

GitHub - byq77/core2-pio-template: PlatformIO template for CORE2 board

It was tested in our office without SBC, but will work with one
connected as well. You have all steps needed to build and flash it in
readme.

Best regards,
Krzysztof Wojciechowski
Husarion sp. z o.o.

The final solution is that we have to buy new Husarion Core 2 Board from you with SD card pre-installed , ready to run and installed to our existing Leo Rover.
Thank you.

I would still appreciate it if you could follow these steps and show me what output do you get when running the core2-flasher script.

Ok, I will try with my best effort .
I don’t think Core 2 board problem because it’s new one. Please kindly wait me in few days.
Your help is highly appreciate .
Thank you .



Please have look screenshot .Step 1 : succesful . File leo_firmware.hex downloaded and placed in Rover

But step 2 failed . Display running continously without stop.

Have a strange question here. In one of the photos showing the electronics box, why the Core2-ROS board is rotated so much? I mean, if should fit straight and almost touch the rear wall of the box.
Can you check if the bottom connector of Core2-ROS i properly connected to RaspberryPi GPIOs?

. Please have a look to picture.It’s not correct because I take out Core 2 to electronic box and fixed firmly in flat surface , as Mr.Blazej Sowa required disconnect all motors cables ,take out box due to hard to fit inside
Please remember you already reminded me in the first time when I assemblied LeoRover and I follow exactly .
If Core2 ROS board rotated so much , it was not power from GPIO of Raspberry and LED not lit .
This box design need to improve again. So please don’t mention about mechanical parts.
What we need at this moment is Leo software for Core 2 . Let 's Mr. Blazej Sowa continue to instruct for us. Thank you.

Sorry for the late reply again, just got back from vacation.

It seems that the flashing scripts can’t even properly communicate with the bootloader on the STM32 chip. I won’t be able to properly diagnose the problem without having the board in my hands, but the things that come to my mind the most are: a hardware issue with the STM32 chip on the CORE2 board or some broken connections between the STM chip and RPi.

I think the easiest way to resolve it would be to send you another CORE2 board, preflashed with the newest firmware and checked by us. @Szymon what do you think?