1 2 Previous Next 19 Replies Latest reply on Jun 24, 2015 5:59 PM by bdawood

    WICED Firmware Version

    feng@ibiquity.com

      Hi,

       

      We need the WICED Firmware version info so that the user can make the decision if he/she needs to upgrade the firmware. Where or how can I get or put the WICED Firmware version info? Is there version info in the firmware.elf?

       

       

      Thanks

        • 1. Re: WICED Firmware Version
          jayi

          Hi Feng,

           

          The WLAN firmware version is printed out on the terminal on reset. Future SDKs will have the latest firmware included.

           

          Thanks,

          Jaeyoung

           

          firmware_version.PNG

          • 2. Re: WICED Firmware Version
            feng@ibiquity.com

            Hi,

             

            I am talking about the WICED firmware (like  snip_scan-ISM43362_M3G_L44.stripped.elf) version info  after make target  "snip.scan-BCM943362WCD4 download run"? Where or how can I get or put the  Firmware version info? Is there version info in the firmware.elf?

             

            Thanks

            • 3. Re: WICED Firmware Version
              jayi

              Hi Tiger,

               

              We have two firmware, a WLAN firmware and also a BLE firmware for the combo chips. Our example apps like snip are not tagged individual versions but follow the WICED SDK (3.1.2). I hope this answers your question.

               

              Thanks,
              Jaeyoung

              • 4. Re: WICED Firmware Version
                feng@ibiquity.com

                Hi,

                 

                We are using SDK 3.1.2 and  want to put the version info to our Wiced application like the example apps so that we can read the version info from APP0 in the multiapp file system in external flash for the purpose of the OTA upgrade. How can we implement this?

                 

                Thanks

                • 5. Re: WICED Firmware Version
                  sam.lin

                  It's WICED_VERSION.

                  e.g. printf("%s", WICED_VERSION);

                  • 6. Re: WICED Firmware Version
                    bdawood

                    Hi,

                    I guess this is already answered, but just to clear up, there are two components:

                    - The WICED SDK version: this is usually obtained from constant WICED_VERSION as already mentioned above. Its printed as the first line in our console output

                     

                    - The WLAN firmware version: this is embedded inside the firmware and is obtained from the WLAN chip itself once the firmware is downloaded in to it, have a look at:

                    WICED/wwd/internal/wwd_wifi.c @ function wwd_wifi_get_wifi_version

                     

                    Hope this answers the question,

                     

                    Regards,

                    Bassem

                    • 7. Re: WICED Firmware Version
                      feng@ibiquity.com

                      Hi Bassem,

                       

                      Thanks for your info.

                       

                      But I am not talking about both WICED SDK version and The WLAN firmware version.


                      We want to put the application version info to our application.elf after make target. So we can read the version info from APP0 in the multiapp file system in external flash to make a decision if needing to upgrade this application. Is there any version info in application.elf? What is the format of application.elf? How can we implement this?

                       

                      Tiger

                      • 8. Re: WICED Firmware Version
                        bdawood

                        Hi,

                        The usual way to implement this is to put it as part of the DCT rather than inside the application.

                         

                        Another way to do this, would be to append a binary blob to your elf file (at the end) with any binary data you want. Hence the boot loader can still read the elf file and  load it to internal flash, and you can still write your stuff add the end. The question would be how would you know where the elf ends and your binary blob starts, I guess you can start from the end of the file, i.e. read the file size, then read the last 4 bytes in the file , those can be the offset of where your data are.

                         

                        A 3rd solution would be to have a simple elf file reader that can read symbol locations and extract them, store the version as string and read it from your elf file.

                         

                        I'd still prefer the first solution as its cleaner and easier.

                         

                        Regards,

                        Bassem

                        • 9. Re: WICED Firmware Version
                          feng@ibiquity.com

                          Hi Bassem,

                           

                          The first solution(put it as part of the DCT) has an issue. If we download a new app0, we have also to upgrade the version info in the DCT in internal flash.  So we prefer  the second solution(append a binary blob to app0 elf file). How can we use the WICED build system to do this?

                           

                          Thanks

                          • 10. Re: WICED Firmware Version
                            bdawood

                            Of fcousre WICED doesn't support this out of the box (as this is more a system specific problem), your starting point would be in tools/makefiles/wiced_elf.mk this is where the binary application is produced. for example

                            $(LINK_OUTPUT_FILE) target produces the main elf file and $(STRIPPED_LINK_OUTPUT_FILE) is producing the stripped elf file, within this target target do an append, something like $(QUIET) $(ECHO) WICED_VERSION_$(VERSION) >> $@

                            • 11. Re: WICED Firmware Version
                              feng@ibiquity.com

                              Hi Bassem,

                               

                              Wiced build uses the GNU make? If not, any document for creating Wiced makefile?

                               

                              Following your email above, there is STRIPPED_LINK_OUTPUT_FILE below  in tools/makefiles/wiced_elf.mk

                              If I want to append WICED_VERSION_$(VERSION) to STRIPPED_LINK_OUTPUT_FILE, can you show me how to modify this makefile rule/dependency and do this?

                               

                              VERSION ?= 1.1.1


                              # Stripped elf file target - Strips the full elf file and outputs to a new .stripped.elf file

                              $(STRIPPED_LINK_OUTPUT_FILE): $(LINK_OUTPUT_FILE)

                                $(QUIET)$(STRIP) -o  $@  $(STRIPFLAGS)  $<

                               

                               

                              In addition, is there a elf file viewer and editor I can use to append the version info to the app stripped elf file?

                               

                              Thanks

                              • 12. Re: WICED Firmware Version
                                feng@ibiquity.com

                                Hi Bassem,

                                 

                                I add "$(QUIET)$(ECHO) Version_1.1.1>> $@" to following line in tools/makefiles/wiced_elf.mk

                                 

                                #  Stripped elf file target - Strips the full elf file and outputs to a new .stripped.elf file

                                $(STRIPPED_LINK_OUTPUT_FILE): $(LINK_OUTPUT_FILE)

                                  $(QUIET)$(STRIP) -o $@ $(STRIPFLAGS) $<

                                  $(QUIET)$(ECHO) Version_1.1.1>> $@

                                 

                                I can make a new build and generate a stripped.elf file.  From my windows 7  I am looking at the properties for the stripped.elf file and  I get two attributes below, "Size" and "Size on disk", and "Size on disk" is always larger.

                                 

                                Size:                  514 KB (527,199 bytes)

                                Size on disk:      516 KB (528,384 bytes)

                                 

                                wiced_framework_app_get_size() function can get the  "Size on disk" above, not the "Size" above we need to find the version info. I have already read the correct version info from the offset near the end of "Size:                  514 KB (527,199 bytes)". Can you look into the issue?

                                 

                                In addition, is there a elf file viewer and editor which can be used to append the version info to the app stripped elf file? In this way, no need to change the wiced_elf.mk.


                                Thanks

                                • 13. Re: WICED Firmware Version
                                  bdawood

                                  Try xvi32 http://www.chmaas.handshake.de/delphi/freeware/xvi32/xvi32.htm

                                  its a hex editor (with ASCI), you should see your string (and hex) at the end of the file.

                                  • 14. Re: WICED Firmware Version
                                    feng@ibiquity.com

                                    Hi Bassem,

                                     

                                    Thanks for your info. I can use xvi32 to view and edit the app stripped elf file.

                                     

                                    But there is still a issue. wiced_framework_app_get_size() function can only get the  "Size on disk(528,384 bytes) " of the app elf file above, not the "Size(527,199 bytes)"  of the elf file  we really need this Size(527,199 bytes) to locate the version info.

                                     

                                    Regards,

                                    1 2 Previous Next