OTA_APP

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
HiIg_4537276
Level 3
Level 3
10 replies posted 5 replies posted 5 questions asked

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!

0 Likes
1 Solution

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/

View solution in original post

11 Replies
Zhengbao_Zhang
Moderator
Moderator
Moderator
250 sign-ins First comment on KBA 10 questions asked

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?

0 Likes

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

0 Likes
HiIg_4537276
Level 3
Level 3
10 replies posted 5 replies posted 5 questions asked

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

0 Likes

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.

0 Likes

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

0 Likes

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 ?

0 Likes

Thank you for your quick reply.

I think that understanding is correct.

Please let me know because it will be a hint.

Thank you.

0 Likes

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/

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

0 Likes

hello:

I think you already find the correct waf_platform.c .

0 Likes

Thank you.

The question has been resolved.

0 Likes