This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

AWR1642: question about boot loader

Part Number: AWR1642

hi

i wanna Implement the online upgrade by can! but i got little bit problem. the structure i wanna used is the users_loader + Client_app.

the sequence of boot_loader as below :

1、after system reset , pc will jump into the reset vector and will execute the boot_loader.

2、the boot_loader will judge the boot mode(flash mode),after that ,  the boot loader will copy my users_loader's code from flash into the internal ram.

3、boot loader jump into the c_int00 function(it just a jump Instructions),and c_int00 will jump into the users_loader's main function.then all the users_loader will be execute.

4、users_loader will monitor the external signal whether or not need to be upgrade online.if need , users_loader will capture the code data and store in the flash. if not ,(assume my client_app already in the flash) 

      users_loader will copy the client_app from the flash to internal ram.

5、then the users_loader jump into client_app main function.then all of my client_app will be execute.

but i got some puzzle as below:

1) in the step 3.  c_int00 will jump to the main function, is the boot loader will get the mian function address automatic?if not , how thec_int00 get the main function's start address?

   i'm check  the file boot.c as below:

   retVal = _args_main();

   xdc_runtime_System_exit(retVal);

  but i didn't follow that!

2)in the step4 , if i need upgrade the code. after i capture the code to ram , then i need jump to c_int00 or i just need jump to the Client_app's main function(the Client_app's main address is different with users_loader's main fucntion)?

 if jump to the c_int00 , how the c_int00 knows to jump into the users_loader's main function or  Client_app's main function.or there have some other ways?

br 

havi

  • Hi Havi,

    Your structure for the online upgrade over CAN seems to be fine!

    Responding to your questions above:

    1. After the bootloading of the application (users_loader in your case) the ROM is eclipsed and the execution would start from address 0 of the RAM (reset vector of the application).

    2. There are 2 possibilities here:

    a) The Client_app is an extension to the users_loader application (this means the vector table is shared between the applications). In this case, you may jump to a predefined entry function in Client_app.

    b) The Client_app is independent application. In this case, the start address in the linker cmd file (of Client_app) has to be offset by an amount greater than the size of the users_loader. Then after Client_app is laoded, the vector table (of Client_app) may be copied to address 0 (overwriting users_loader) and then cause a R4 reset. This will cause the execution to start from the reset vector and control would then jump to Client_app.

    Best regards,

    Naveen