11 Replies Latest reply on Nov 27, 2019 6:07 PM by HiIg_4537276

    OTA_APP

    HiIg_4537276

      Hi

       

      Get "OTA_APP" of external Flash by the instruction from "Bootloader"
      I want to write to the RAM in the CPU. Is this possible?

      If possible, please tell us how to implement it.

      The implementation environment is as follows.
      ・ Chip model: CYW43438
      ・ SDK: WICED-Studio-6.4

       

      Thanks!

        • 1. Re: OTA_APP
          ZhengbaoZ_96

          hello:

           

          The OTA app will be loaded into RAM to running during the next boot ,  Would you please share the steps you desire so we can evaluate?

          • 2. Re: OTA_APP
            HiIg_4537276

            Hello

             

            First, "OTA_APP" is stored in the external Flash.
            "Bootloader" controls the main unit and I want to load "OTA_APP" in external Flash into RAM
            I would like you to be able to tell me how to do that if possible.

             

            Thank you

            • 3. Re: OTA_APP
              HiIg_4537276

              Hello

               

              I want to share a step but I can't explain it well.

              First, please tell me in which file in the sample code OTA_APP is deployed and used.

               

              Thank you

              • 4. Re: OTA_APP
                ZhengbaoZ_96

                hello:

                 

                   I am still a little confused ,  I think you should already run our OTA sample code successfully ,

                now you want to change bootloader into RAM ?   maybe you can tell me which step you want change by comparing to our normal OTA steps, thanks.

                • 5. Re: OTA_APP
                  HiIg_4537276

                  Hello

                   

                  I'm sorry if you don't know the procedure.
                  ------------------------
                  ① When starting, there is “OTA_APP” in the external Flash.

                  ② Next, load “OTA_APP” into the RAM of the board.

                  ③ The boot loader performs the control so far.

                  ④ I want to jump control to OTA_APP acquired in ②.
                  ------------------------

                  The whole procedure is as above.
                  First of all, I want a hint for executing ②.

                   

                  Thank you

                  • 6. Re: OTA_APP
                    ZhengbaoZ_96

                    ok,  your meaning is you want to know where we control the RAM load from reading them from external flash or internal rom in the code , right ?

                    • 7. Re: OTA_APP
                      HiIg_4537276

                      Thank you for your quick reply.

                       

                      I think that understanding is correct.

                      Please let me know because it will be a hint.

                       

                      Thank you.

                      • 8. Re: OTA_APP
                        ZhengbaoZ_96

                        Hello:

                        I just have a check about the bootloader define in stm43f2xx.mk

                         

                        I think you need to have a start from apps/waf/bootloader/  and WAF/waf_platform.c

                        to know where to load the image we wanted.

                         

                        ifeq ($(APP),bootloader)

                        ####################################################################################

                        # Building bootloader

                        ####################################################################################

                         

                        DEFAULT_LINK_SCRIPT += $(TOOLCHAIN_NAME)/bootloader$(LINK_SCRIPT_SUFFIX)

                        #$(NAME)_SOURCES += WAF/waf_platform.c

                        #$(NAME)_LINK_FILES  += WAF/waf_platform.o

                         

                        else

                        ifneq ($(filter sflash_write, $(APP)),)

                        ####################################################################################

                        # Building sflash_write

                        ####################################################################################

                         

                        PRE_APP_BUILDS += bootloader

                        DEFAULT_LINK_SCRIPT := $(TOOLCHAIN_NAME)/app_ram$(LINK_SCRIPT_SUFFIX)

                        GLOBAL_INCLUDES += WAF ../../../../../apps/waf/bootloader/

                        GLOBAL_DEFINES += __JTAG_FLASH_WRITER_DATA_BUFFER_SIZE__=16384

                        ifeq ($(TOOLCHAIN_NAME),IAR)

                        GLOBAL_LDFLAGS += --config_def __JTAG_FLASH_WRITER_DATA_BUFFER_SIZE__=16384

                        endif

                         

                        else

                        ifeq ($(USES_BOOTLOADER_OTA),1)

                        ####################################################################################

                        # Building standard application to run with bootloader

                        ####################################################################################

                         

                        PRE_APP_BUILDS += bootloader

                        DEFAULT_LINK_SCRIPT := $(TOOLCHAIN_NAME)/app_with_bootloader$(LINK_SCRIPT_SUFFIX)

                        GLOBAL_INCLUDES += WAF ../../../../../apps/waf/bootloader/

                        1 of 1 people found this helpful
                        • 9. Re: OTA_APP
                          HiIg_4537276

                          Hello:

                           

                          thank you for the advice.
                          "WAF / waf_platform.c" exists in multiple folders and there is a difference in each one.
                          Please tell me which folder should be referenced.

                           

                          Thank you

                          • 10. Re: OTA_APP
                            ZhengbaoZ_96

                            hello:

                             

                            I think you already find the correct waf_platform.c .

                            • 11. Re: OTA_APP
                              HiIg_4537276

                              Thank you.

                              The question has been resolved.