group::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

defineBOOTLOADER_VERSION


defineBOOTLOADER_IOC_IDENT_CHAR


defineBOOTLOADER_HARDWARE_ID_OFFSET

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


defineBOOTLOADER_API_ADDR


defineBOOTLOADER_WRITEPAGESIZE


defineI_BOOTLOADER_ERASE

This request sets the functionality of the specified pin.


defineI_BOOTLOADER_GETINFO

This request loads the bootloader attributes.

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

defineI_BOOTLOADER_ATTR


defineI_BOOTLOADER_GETATTR_LEGACY


defineI_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);

defineI_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);

defineI_BOOTLOADER_TOTAL



date: “2019-06-27” layout: post title: struct::bootloader_info_t katex: true

categories: struct

This structure contains the attributes for the bootloader.

Methods

Details

public u32version


public u32serialno


public u32startaddr


public u32hardware_id



date: “2019-06-27” layout: post title: struct::bootloader_attr_legacy_t katex: true

categories: struct

Methods

Details

public uint32_tversion


public uint32_tserialno


public uint32_tstartaddr



date: “2019-06-27” layout: post title: struct::bootloader_writepage_t katex: true

categories: struct

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

Methods

Details

public u32addr


public u32nbyte


public u8buf


X

Thanks for Coming!

Subscribe to news and updates