Skip to content
Sebastian edited this page Jun 13, 2019 · 3 revisions

Introduction

This page will explain how to add a new microcontroller to the bootloader

Client

The following additions must be made on the client side

JSON

All json files which contain infromation about a microcontroller must be saved under "config/Devices". The name of the json file will be the identifier for the newly added mcu. It should be unique across all microcontrollers. You can use subfolders to organize your json files, but these will be ignored for identification of a microcontroller.

Structure

The following table will use a hierarchy format to identify json values. The following example will explain the structure:

{
  "device": {
    "general": {
      "id":   "atmega328p",
      "vendor": "Microchip",
      "arch": "AVR",
      "subarch": "ATMega",
      "name": "Atmega328p"
    }
  }
}

The arch value will be identified by the string "/device/general/arch"

Value Description Example Value
/device/general/id A unique identifier for the microcontroller. It is recommended to use the same value as the filename atmega328p
/device/general/vendor Device Vendor of the Microcontroller Microchip
/device/general/arch The Architecture of the Microcontroller AVR
/device/general/subarch The Sub Category of the Microcontroller, can be empty if non-existent ATmega
/device/general/name The full Name of the microcontroller in "human readable form" Atmega328p
/device/flash/total Total flash space of the device 1KB
/device/flash/available Available flash of the device. This value must be the flash size which the bootloader can access and write to. 2GB
/device/eeprom/total Total EEPROM size of the Microcontroller (can be 0 if there is none) 0B
/device/eeprom/available Available EEPROM size of the Microcontroller (can be 0 if there is none) 42KB
/serial/general/mode Serial mode. (see Serial conventional notation ) 8N1
/serial/general/bytesPerBurst Bytes sent within one burst of data. This value must also be configured on the microcontroller bootloader. Setting this value too low will cause slow transfers and can cause (implementation dependent) a smaller addressable flash size. Setting this value too high will cause wasted flash space. 2
/serial/general/minBaudrate Minimum allowed baud rate for communication. If the implementation doesn't need this set to 0 9600
/serial/maxBaudrate Maximum allowed baud rate for communication 115200
/serial/write/eepromBurstDelay Delay between every EEPROM send burst (can be 0 if there is no eeprom) 100ms
/serial/write/flashBurstDelay Delay between every Flash send burst 10ms
serial/sync/syncByteAmount Number of sync bytes sent to have a high likelihood of a stable connection 3
/serial/sync/syncByte Byte value used for synchronization 0xCC
/serial/sync/preamble Preamble used to signalize the start of user data (will be sent directly after the synchronisation is finished) 0x55
/serial/sync/resyncAfterBurst Is a resync needed after one burst of data? true
/binary/format Format of the binary file Intel Hex
/binary/unusedFlashByte/ Byte used to signalize that the following flash data is unused (Microcontroller dependent) 0xFF

Clone this wiki locally