OTA2 not building with debug target

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

My ota2 project is not building when I add the debug option to the build config.

InVue.RTD-InVue_RTD-FreeRTOS-LwIP-debug ota2_manuf_download will not build but InVue.RTD-InVue_RTD-FreeRTOS-LwIP ota2_manuf_download will and InVue.RTD-InVue_RTD-FreeRTOS-LwIP-debug download will not build but InVue.RTD-InVue_RTD-FreeRTOS-LwIP downloadwill.

The error is related to the memory location defines in the OTA2_image_defines.mk.

Is this normal? How can I debug my project with the added OTA code?

Build Console

18:04:24 **** Build of configuration Default for project AWS_WIFI_RTD ****

"C:\\Firmware\\F1679_WIFI_RTD\\AWS_V2\\make.exe" -j8 InVue.RTD-InVue_RTD-FreeRTOS-LwIP-debug ota2_manuf_download

MAKEFILE MAKECMDGOALS=InVue.RTD-InVue_RTD-FreeRTOS-LwIP-debug ota2_manuf_download OTA2_SUPPORT is enabled

make.exe[1]: warning: -jN forced in submake: disabling jobserver mode.

Building Bootloader waf.ota2_bootloader-NoOS-NoNS-InVue_RTD-P103-SoC.43909

Building Serial Flash Loader App

Finished Building Serial Flash Loader App

prgm hdr cnt=3

total_size = 15756, entry_point = 0x688000

Loadsegment_offset = 0xA0 segment_size = 15520, segment_pad = 0

Loadsegment_offset = 0x3D40 segment_size = 32, segment_pad = 0

Loadsegment_offset = 0x3D60 segment_size = 204, segment_pad = 0

Finished Building Bootloader

apps/InVue/RTD/../../../libraries/filesystems/ota2/wiced_ota2_image.c: In function 'wiced_ota2_image_copy_uncompressed_component':

apps/InVue/RTD/../../../libraries/filesystems/ota2/wiced_ota2_image.c:577:19: error: 'OTA2_IMAGE_FLASH_BASE' undeclared (first use in this function); did you mean 'NORMAL_IMAGE_FLASH_BASE'?

     dst_offset = (OTA2_IMAGE_FLASH_BASE + component_header->destination);

                   ^~~~~~~~~~~~~~~~~~~~~

                   NORMAL_IMAGE_FLASH_BASE

apps/InVue/RTD/../../../libraries/filesystems/ota2/wiced_ota2_image.c:577:19: note: each undeclared identifier is reported only once for each function it appears in

apps/InVue/RTD/../../../libraries/filesystems/ota2/wiced_ota2_image.c: In function 'wiced_ota2_image_write_data':

apps/InVue/RTD/../../../libraries/filesystems/ota2/wiced_ota2_image.c:1290:28: error: 'OTA2_IMAGE_STAGING_AREA_SIZE' undeclared (first use in this function); did you mean 'NORMAL_IMAGE_APPS_AREA_BASE'?

     if ( (offset + size) > OTA2_IMAGE_STAGING_AREA_SIZE)

                            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~

                            NORMAL_IMAGE_APPS_AREA_BASE

apps/InVue/RTD/../../../libraries/filesystems/ota2/wiced_ota2_image.c: In function 'wiced_ota2_get_boot_type':

apps/InVue/RTD/../../../libraries/filesystems/ota2/wiced_ota2_image.c:1590:14: warning: implicit declaration of function 'wiced_dct_ota2_read_saved_copy'; did you mean 'wiced_dct_read_with_copy'? [-Wimplicit-function-declaration]

     result = wiced_dct_ota2_read_saved_copy( &ota2_header, DCT_OTA2_CONFIG_SECTION, 0, sizeof(platform_dct_ota2_config_t));

              ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

              wiced_dct_read_with_copy

apps/InVue/RTD/../../../libraries/filesystems/ota2/wiced_ota2_image.c: In function 'wiced_ota2_image_get_offset':

apps/InVue/RTD/../../../libraries/filesystems/ota2/wiced_ota2_image.c:1796:26: error: 'OTA2_IMAGE_FACTORY_RESET_AREA_BASE' undeclared (first use in this function); did you mean 'NORMAL_IMAGE_DCT_2_AREA_BASE'?

             ota_offset = OTA2_IMAGE_FACTORY_RESET_AREA_BASE;

                          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

                          NORMAL_IMAGE_DCT_2_AREA_BASE

apps/InVue/RTD/../../../libraries/filesystems/ota2/wiced_ota2_image.c:1799:26: error: 'OTA2_IMAGE_STAGING_AREA_BASE' undeclared (first use in this function); did you mean 'NORMAL_IMAGE_APPS_AREA_BASE'?

             ota_offset = OTA2_IMAGE_STAGING_AREA_BASE;

                          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~

                          NORMAL_IMAGE_APPS_AREA_BASE

tools/makefiles/wiced_elf.mk:232: recipe for target 'build/InVue.RTD-InVue_RTD-FreeRTOS-LwIP-debug/Modules/apps/InVue/RTD/../../../libraries/filesystems/ota2/wiced_ota2_image.o' failed

make.exe[1]: *** [build/InVue.RTD-InVue_RTD-FreeRTOS-LwIP-debug/Modules/apps/InVue/RTD/../../../libraries/filesystems/ota2/wiced_ota2_image.o] Error 1

make.exe[1]: *** Waiting for unfinished jobs....

Makefile:351: recipe for target 'main_app' failed

make: *** [main_app] Error 2

18:04:29 Build Finished (took 5s.190ms)

0 Likes
1 Solution

I think I found the problem last night after posting. I was able to get the errors to go away by including the filesystems/wicedfs component in my makefile because my application requires access to functions in wiced_ota2_image.c.

View solution in original post

2 Replies