LAUNCHCC3235MOD: MbedTLS consuming code size, no room for OTA

Part Number: LAUNCHCC3235MOD

Tool/software:

Hello,

I have successfully connected to an mqtt server the mqtt_client_example (without TLS and simplelink_cc32xx_sdk_6_10_00_05) and mqtt_client_over_tls_1_3 example (with using necessary TLS certificates and simplelink_cc32xx_sdk_7_10_00_13). 

But the problem is, i can make OTA using the SDK6 example with the image size about 200KB, but i won't do any OTA because SDK7 with TLS image size is 517KB (Actually it was 522KB and i disabled wifi direct feature).

.cmd file:

#define SRAM_BASE   0x20000000
#define FLASH_BASE  0x01000800

--stack_size=1024   /* C stack is also used for ISR stack */
--retain "*(.resetVecs)"

/* Set severity of diagnostics to Remark instead of Warning                  */
/* - 10068: Warning about no matching log_ptr* sections                      */
--diag_remark=10068

HEAPSIZE = 0x8000;  /* Size of heap buffer used by HeapMem */

MEMORY
{
    /* Bootloader uses FLASH_HDR during initialization */
    FLASH_HDR (RX)  : origin = 0x01000000, length = 0x7FF      /* 2 KB */
    FLASH     (RX)  : origin = 0x01000800, length = 0x0FF800   /* 1022KB */
    SRAM      (RWX) : origin = 0x20000000, length = 0x00040000 /* 256KB */
    /* Explicitly placed off target for the storage of logging data.
     * The data placed here is NOT loaded onto the target device.
     * This is part of 1 GB of external memory from 0x60000000 - 0x9FFFFFFF.
     * ARM memory map can be found here:
     * https://developer.arm.com/documentation/ddi0337/e/memory-map/about-the-memory-map
     */
    LOG_DATA (R) : origin = 0x90000000, length = 0x40000        /* 256 KB */
    LOG_PTR  (R) : origin = 0x94000008, length = 0x40000        /* 256 KB */
}

/* Section allocation in memory */
SECTIONS
{
    .dbghdr     : > FLASH_HDR
    .resetVecs  : > 0x01000800
    .text       : > FLASH
    .TI.ramfunc : {} load=FLASH, run=SRAM, table(BINIT)
    .const      : > FLASH
    .rodata     : > FLASH
    .cinit      : > FLASH
    .pinit      : > FLASH
    .init_array : > FLASH

    .ramVecs    : > SRAM, type = NOLOAD, ALIGN(1024)
    .data       : > SRAM
    .bss        : > SRAM
    .sysmem     : > SRAM

    /* Heap buffer used by HeapMem */
    .priheap   : {
        __primary_heap_start__ = .;
        . += HEAPSIZE;
        __primary_heap_end__ = .;
    } > SRAM align 8

    .stack      : > SRAM(HIGH)
    .log_data       :   > LOG_DATA, type = COPY
    .log_ptr        : { *(.log_ptr*) } > LOG_PTR align 4, type = COPY
}

--symbol_map __TI_STACK_SIZE=__STACK_SIZE
--symbol_map __TI_STACK_BASE=__stack

-u_c_int00

When I look at the Memory Allocation window on the CCS, I see that .text.mbedtls consuming mostly on the FLASH.

TLS connection is successful, but there is no room for OTA.

How can I reduce code size? Can I disable some mbedtls features?

Best regards,

Onur

  • Hi Onur,

    I will need to take a deeper dive into the TLS example to gather more information. Meanwhile, just to confirm, you're saying that the OTA update is over 500 KB and therefore the MQTT Client Over TLS program image itself is taking up too much space?

    Thanks,

    Brandon Liu