BOOTLOADER_DEV

The Bootloader provides the IOCTL definitions for accessing the bootloader. This interface is not available on any device when Stratify OS is running. It is only available to the bootloader.

Details

define BOOTLOADER_VERSION

define BOOTLOADER_IOC_IDENT_CHAR

define BOOTLOADER_HARDWARE_ID_OFFSET

This specifies where in the image the hardware ID value resides.


define BOOTLOADER_API_ADDR

define BOOTLOADER_WRITEPAGESIZE

define I_BOOTLOADER_ERASE

This request sets the functionality of the specified pin.


define I_BOOTLOADER_GETINFO

This request loads the bootloader attributes.

bootloader_attr_t attr;
link_ioctl(LINK_BOOTLOADER_FILDES, I_BOOTLOADER_GETINFO, &info);

define I_BOOTLOADER_ATTR

define I_BOOTLOADER_GETATTR_LEGACY

define I_BOOTLOADER_RESET

This request invokes a reset. The third IOCTL argument is a boolean value saying whether or not to start the bootloader. If this value is false, the application is loaded.

bool invoke_bootloader = false;
link_ioctl(LINK_BOOTLOADER_FILDES, I_BOOTLOADER_RESET, NULL);

define I_BOOTLOADER_WRITEPAGE

This request writes a page to the flash memory.

bootloader_writepage_t attr;
attr.loc = 0x1000;
attr.nbyte = 1024;
memset(attr.buf, 0xFF, FLASH_MAX_WRITE_SIZE);
 //copy data in to attr.buf up to FLASH_MAX_WRITE_SIZE bytes
ioctl(fd, I_BOOTLOADER_WRITEPAGE, &attr);

define I_BOOTLOADER_TOTAL

typedef bootloader_info_t bootloader_attr_t

struct::bootloader_info_t

This structure contains the attributes for the bootloader.

u32 version

u32 serialno

u32 startaddr

u32 hardware_id

struct::bootloader_attr_legacy_t

uint32_t version

uint32_t serialno

uint32_t startaddr

struct::bootloader_writepage_t

This structure is used for writing data to the bootloader flash using I_BOOTLOADER_WRITEPAGE.

u32 addr

u32 nbyte

u8 buf

X

Thanks for Coming!

Subscribe to news and updates