bootloader for imX RT1060

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

bootloader for imX RT1060

916 次查看
fmabrouk
Contributor III

Hi,

I need to create a bootloader that will be saved on QSPI flash with two other applications: application1, and application2. I want the bootloader to select which application needs to run after a reset based on a GPIO input selection ( if GPIO is low run application 1 otherwise run application2).

can you guys refer me to some documention or source code to use as a starting point?

Thank you all!

0 项奖励
4 回复数

911 次查看
fmabrouk
Contributor III

Is there any GUI that can be used to generate a bootloader bit file?

0 项奖励

892 次查看
mjbcswitzerland
Specialist V

Hi

The uTasker i.MX RT loader includes all methods that you need, including utilities for generating and combining applications and loading them to QSPI flash (in field or OTA).

The following code controls starting the loaders/application:

 

    if (*BOOT_MAIL_BOX == RESET_TO_APPLICATION) {                        // if the serial loader or application have commanded the application to be started
        start_application(iMX_APPLICATION_LOCATION + iMX_FILE_OBJECT_SIZE); // jump to the application
        // If this call returns it means that there is no application in place
        //
    }
    if (*BOOT_MAIL_BOX != RESET_TO_FALLBACK_LOADER) {                    // as long as the serial loader or application have not commanded the fall-back loader to be started
        start_application(iMX_SERIAL_LOADER_LOCATION + iMX_FILE_OBJECT_SIZE); // jump to the serial loader
        // If this call returns it means that there is no serial loader in place se we fallback to the fall-back loader
        //
    }
    start_application(iMX_FALLBACK_LOADER_LOCATION);                     // jump to the fall-back loader - this is expected to always be loaded together with the bare-minimum loader and will never return
    FOREVER_LOOP() {                                                     // if this were to return it would mean that the fallback serial loader is either missing or corrupt so we wait here for someone to debug the cause
        fnRetriggerWatchdog();                                           // don't allow the watchdog to fire - a debugger can connect to verify that we are here - this will normally never happen since the boot loader is combined and loaded with the fall-back serial loader
        #if defined _WINDOWS
        break;
        #endif
    }

 

 

showing that it manages a serial loader, a fall-back serial loader (for updating the serial loader) and an application.

Multiple applications an be controlled by adding these (either commanded via the boot mailbox or controlled by inputs). Eg.

 

    if (*BOOT_MAIL_BOX == RESET_TO_APPLICATION) {                        // if the serial loader or application have commanded the application to be started
        if (GPIO_IS_HIGH()) {
            start_application(iMX_APPLICATION_LOCATION + iMX_FILE_OBJECT_SIZE); // jump to the application
        }
        else {
            start_application(iMX_APPLICATION_LOCATION_2 + iMX_FILE_OBJECT_SIZE); // jump to the application
        }
        // If this call returns it means that there is no application in place
        //
    }

 

 

where iMX_APPLICATION_LOCATION_2 is the address in the QSPi flash of the alternative application.

The application itself can be run in place (XiP), use On-the-Fly decryption in place, run in internal RAM or SRAM, which is automatically detected and managed by the loader.
See https://www.utasker.com/iMX/developers.html

Regards

Mark
[uTasker project developer for Kinetis and i.MX RT]
Contact me by personal message or on the uTasker web site to discuss professional training, solutions to problems or rapid product development requirements

For professionals searching for faster, problem-free Kinetis and i.MX RT 10xx developments the uTasker project holds the key: https://www.utasker.com/iMX/RT1060.html

0 项奖励

856 次查看
fmabrouk
Contributor III

Hi Mark!

Thank you for your reply. Can you give me the link to the source code of this utasker bootloader?

Regards

0 项奖励

854 次查看
mjbcswitzerland
Specialist V

Hi

The application form can be found here:
https://www.utasker.com/Licensing/License.html

Regards

Mark

0 项奖励