SDK 6.2 OTA2 image build error: Illegal division by zero at ./tools/text_to_c/sector_count.pl

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

cross mob
NiMc_1688136
Level 5
Level 5
10 sign-ins 50 questions asked 10 solutions authored

I am trying to build an OTA2 image with SDK/Studio 6.2 and it is failing. In 6.1, it works.

Error

Creating Filesystem BCM94390x_targets.mk ...

./tools/common/Win32/mk_wicedfs32 build/QuickProjects.OTA_Test-CYW943907AEVAL1F-FreeRTOS-LwIP/filesystem.bin build/QuickProjects.OTA_Test-CYW943907AEVAL1F-FreeRTOS-LwIP/resources/Staging/

Creating Filesystem Done

Illegal division by zero at ./tools/text_to_c/sector_count.pl line 49.

Building apps lookup table

tools/makefiles/wiced_apps.mk:454: *** OTA2 Factory Reset Image Info File Not built!.  Stop.

Makefile:351: recipe for target 'main_app' failed

make: *** [main_app] Error 2

Target

Quickprojects.OTA_Test-CYW943907AEVAL1F-FreeRTOS-LwIP ota2_image

I made sure the extraction mini app was build and I tried a clean and rebuild.

0 Likes
1 Solution

The problem was actually in my make file of the project in SDK 6.2, which was different from the example project in the 6.1 SDK.

I was attempting to build the project differently where I could use a OTA define from the system to exclude/include files based on it being a build for OTA or not.

This is obviously a bad decision because my makefile was skipping the OTA self extraction image which resulted in the error.

In my makefile, i used ifeq ($(APP_USED_OTA2),1), thinking that it would be set if I used a target that utilized the OTA option.

ifeq ($(APP_USED_OTA2),1)

#OTA extraction application - needs to be built into the application

OTA_APPLICATION := InVue.ota2_extraction_mini_app-$(PLATFORM)-FreeRTOS-LwIP

OTA_APP    := build/$(OTA_APPLICATION)/binary/$(OTA_APPLICATION).stripped.elf

endif

As for FreeRTOS not being supported, I made that modification early in SDK 6.1 and have ran into no issues.

View solution in original post

0 Likes
3 Replies
PriyaM_16
Moderator
Moderator
Moderator
250 replies posted 100 replies posted 50 replies posted

Hello,

Can you please share the OTA_test project which you are using?

The ota2_example provided in WICED is not supported with FreeRTOS-LwIP combination.

pastedImage_0.png

Also, I tried building the ota2_image in WICED 6.2 and the it build without any error. I have attached the console log here.

The problem was actually in my make file of the project in SDK 6.2, which was different from the example project in the 6.1 SDK.

I was attempting to build the project differently where I could use a OTA define from the system to exclude/include files based on it being a build for OTA or not.

This is obviously a bad decision because my makefile was skipping the OTA self extraction image which resulted in the error.

In my makefile, i used ifeq ($(APP_USED_OTA2),1), thinking that it would be set if I used a target that utilized the OTA option.

ifeq ($(APP_USED_OTA2),1)

#OTA extraction application - needs to be built into the application

OTA_APPLICATION := InVue.ota2_extraction_mini_app-$(PLATFORM)-FreeRTOS-LwIP

OTA_APP    := build/$(OTA_APPLICATION)/binary/$(OTA_APPLICATION).stripped.elf

endif

As for FreeRTOS not being supported, I made that modification early in SDK 6.1 and have ran into no issues.

0 Likes

riya wrote:

The ota2_example provided in WICED is not supported with FreeRTOS-LwIP combination.

Do you consider to make it work for FreeRTOS-LwIP combination officially?

As nickmckendree_1688136  mationed that it was working with small modification early in SDK 6.1.

0 Likes