Read bootloader version from the application

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Read bootloader version from the application

1,566 Views
chriskeeser
Contributor III

I would like to know how to read the version of the bootloader from the bootloaded application.  Is there a location in flash that I can refer to from the loaded app to read the bootloader version?

 

For a bit of context, we are looking to add test commands into our main firmware application to read out the bootloader version loaded into the device without actually starting the bootloader.  Is this possible?

 

The project is using kboot v1.3.0 and SDK v 1.1 on a K22F512xxx12 device.

 

Thanks for any help!

Labels (1)
0 Kudos
3 Replies

906 Views
kerryzhou
NXP TechSupport
NXP TechSupport

Hi Chris Keeser,

   I don't know where you get the kboot1.3.0, as I know, we just have kboot1.2.0 and kboot2.0.

  K22Fx512xxx12 chip don't have the ROM bootloader, so it uses the flash bootloader.

  Normally, customer can read the bootloader version with blhost get-property command:

pastedImage_1.png

but if you want to read the bootloader version in the app directly, you can define the kboot version in the specific flash address.

you can find the version in the target_config

pastedImage_2.png

If you want to read the bootloader reversion, please define the _target_version_constants in the specific flash address, then you can read that flash address to get the reversion directly in your app code.

Wish it helps you!


Have a great day,
Kerry

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos

906 Views
chriskeeser
Contributor III

Thank you for the reply!

I inherited the bootloader from a team member who is no longer with the company, and they had modified the version to 1.3.0.  I realized a few days ago that this version doesn't match any official version.  It appears to be based on v1.1.0 of the bootloader.

I had hoped that the version would be present in a fixed flash location by default since I am trying to minimize the modifications to the bootloader to make it easy to upgrade in the future.  Thanks for the advice.

I don't know if the KBoot team watches this forum, but that might be a good feature to add (version information in fixed location) so that future projects can take advantage of reading the bootloader version from the app without modifying the project.

0 Kudos

906 Views
kerryzhou
NXP TechSupport
NXP TechSupport

Hi Chris Keeser,

   Thank you for your advice, I will transfer your suggestion to our KBOOT team.

   But, to the flash bootloader, customer really can define the version bytes in the fixed flash address by themselves.

   Normally, official code is just give an example, in the practical usage, customer can modify it by themselves.

Wish it helps.


Have a great day,
Kerry

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos