工具/软件:
您好:
我已成功连接到 MQTT 服务器 mqtt_client_Example(不带 TLS 和 simplelink_cc32xx_SDK_6_10_00_05) 和 mqtt_client_over_tls_1_3 示例(使用必要的 TLS 证书和 simplelink_cc32xx_SDK_7_10_00_13) 。
但问题是、我可以使用 SDK6 示例来制作 OTA、映像大小约为 200KB、但我不会执行任何 OTA、因为 TLS 映像大小为 517KB(实际上是 522KB、我禁用了 wifi Direct 功能)。
.cmd 文件:
#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:
* developer.arm.com/.../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
查看 CCS 上的“Memory Allocation“窗口时、可以看到.text .mbedtls 主要在闪存上消耗。
TLS 连接成功、但没有空间用于 OTA。
如何减小代码大小? 我可以禁用一些 mbedtls 功能吗?
此致、
Onur