Forums

Solution to flash bootloader on request

Started by bicha 6 months ago1 replylatest reply 6 months ago46 views

Hello all,

I work in a society that develops an autonomous robot, the robot architecture is composed mainly by:

 - 3 Arduino board.

 - 1 embedded PC, which communicates with arduino boards using serial communication.

The PC contains three debian packages, program1.deb, program2.deb, program3.deb, each debian package contains the necessary files to flash each arduino board: .hex , .sig files.. etc.

When robot is started, the PC flashes the three arduino boards with different program, depends in which port the arduino is connected, clear?

The problem is, the serial communication between arduinos and the PC is corrupted, we should flash again the bootloader of the the concerned arduino, to then be able to flash correctly the arduino card.

Now, I am looking for a solution for the PC that it can flash the bootloader too.

Any idea(s)?

[ - ]
Reply by BVRameshFebruary 5, 2019

You should have a common boot loader for all 3 Aurduino boards.

The boot loader should be such that it should initialize all the peripherals and wait for flash down-load from serial port. The boot loader should report any peripheral not responding to the initialization.

Then PC should start flashing the code, and boot loader should download the code and flash. Use a proper checksum for each record transfer, and if possible use known download format, like intel hex, which can be seen as a dump in a serial monitor.

The boot loader should report any checksum error in record transfer and should do a possible retry transfer. The boot loader should also report any flashing errors, like erase error, write error, verify error.

When the flash download is complete the boot loader should check for integrity of downloaded flash and should jump to the start address of downloaded flash for successful download, otherwise it should report an error to the serial port and halt.

Once the above mentioned boot loader is done check for its performance for all possible failure modes.

Then it is ready to get different program from different ports.


Best Regards,

BV Ramesh.