Thanks for the firmware! I was able to decrypt it using DD2.0 and upload it to a BNO055 on my own board using openOCD. Instructions for anyone who is interested: 1. Create a .NET 4.0 Windows Forms app in Visual Studio 2019, and add BNO055.dll (and its dependencies) from your DD2.0 installation to the project. Create a dummy BNO055.FirmwareUpdate object, and feed in the firmware file. Something along the lines of using System;
using System.Collections.Generic;
using System.Linq;
using System.Windows.Forms;
using System.Reflection;
using System.IO;
namespace BNO055
{
static class Program
{
[STAThread]
static void Main()
{
BSTSensors.CSAMN166 thing = new BSTSensors.CSAMN166();
BNO055 bno = new BNO055();
FirmwareUpgrade fu = new FirmwareUpgrade(thing, bno);
fu.UpdateFirmware(@"BNO_Firmware_0.3.2.0.hex");
var field = fu.GetType().GetField("_hexData", BindingFlags.NonPublic | BindingFlags.GetField | BindingFlags.Instance);
byte[] hexdata = (byte[])field.GetValue(fu);
File.WriteAllBytes(@"BNO_Firmware_0.3.2.0.hex.decrypted", hexdata);
}
}
} 2. Patch this file by replacing the 0x00 padding at the end with 0xFF bytes, and moving the 0xAA55AA55 checksum to the end of the file. 3. Connect an SWD debugger (e.g. Atmel ICE) to the target BNO055's SWDIO and SWCLK pins. 4. Connect with openOCD and upload the new firmware to base address 0x4000. source [find interface/cmsis-dap.cfg]
source [find target/at91samdXX.cfg]
program BNO_Firmware_0.3.2.0.hex.decrypted.patched verify reset exit 0x4000 Registers 5 and 4 should now read 0x03 and 0x20, respectively, for version 3.20.
... View more