[Solved] Rosbot 2.0 : hConfig error and microcontroller can't be flashed

4. From your description it seems to be the software problem with CORE2 board, but we’ll need to confirm that it’s not some hardware malfunction instead. It looks like the RDP level somehow switched from 0 to 1 and CORE2 flash content is blocked from reading and modification. We will use stm32loader tool to unlock the rdp and flash some test firmware to check if board is fine. In your home folder run:

$ cd ~/ && git clone https://github.com/byq77/stm32loader.git
$ cd ~/stm32loader && sudo python setup.py install --record files.txt

First we will unlock the readout and the write protection for all sectors. It will also trigger mass erase of flash memory including the bootloader, but don’t worry, you can flash it latter. Run:

Asus Tinker board:

$ sudo stm32loader -c tinker -u -W

Upboard:

$ sudo stm32loader -c upboard -u -W

Wait until script finishes with messages “read unprotect done” and “write unprotect done”. It might take 20-30s.

5. To test if board is fine we’ll upload a test firmware. The firmware.bin file should be here, just copy it to your ROSbot and run:

Asus Tinker board:

$ sudo stm32loader -c tinker -e -w -v firmware.bin

Upboard:

$ sudo stm32loader -c upboard -e -w -v firmware.bin

You should see the progress bar. Wait until uploading and verification processes finish successfully. The L1, L2 and L3 leds should blink now.

If everything goes well, your CORE2 is resurrected!

6. Now you can flash the bootloader accordingly to the procedure described here or use stm32loader to do it like described below.

Copy HEX file to your SBC and run:

$arm-none-eabi-objcopy -I ihex -O binary bootloader_1_0_0_core2.hex bootloader_1_0_0_core2.bin

Asus Tinker board:

$ sudo stm32loader -c tinker -e -w -v bootloader_1_0_0_core2.bin

Upboard:

$ sudo stm32loader -c upboard -e -w -v bootloader_1_0_0_core2.bin

7. Enable husarnet-configurator and reboot the machine.

$ sudo systemctl enable husarnet-configurator
$ sudo reboot

Now you should be able to connect your ROSbot to the Cloud.

Edit: I updated this fix to accommodate the ROSbot 2.0 Pro case.