Skip to content

Commit a4661b1

Browse files
committed
lwip pbuf, map file, and hex creation when OTA is disabled
1 parent 6da66b7 commit a4661b1

File tree

13 files changed

+56
-15
lines changed

13 files changed

+56
-15
lines changed

examples/all-clusters-app/cc13x4_26x4/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ Ninja to build the executable.
109109
to the GN call.
110110
111111
```
112-
gn gen out/debug --args="ti_sysconfig_root=\"$HOME/ti/sysconfig_1.18.1\" target_defines=[\"CC13X4_26X4_ATTESTATION_CREDENTIALS=1\"]"
112+
gn gen out/debug --args="ti_sysconfig_root=\"$HOME/ti/sysconfig_1.18.1\" target_defines=[\"CC13X4_26X4_ATTESTATION_CREDENTIALS=1\"] chip_generate_link_map_file=true"
113113
```
114114
115115
## Programming

examples/all-clusters-app/cc13x4_26x4/main/AppTask.cpp

+8-2
Original file line numberDiff line numberDiff line change
@@ -76,8 +76,10 @@ AppTask AppTask::sAppTask;
7676

7777
constexpr EndpointId kNetworkCommissioningEndpointSecondary = 0xFFFE;
7878

79+
#if CHIP_DEVICE_CONFIG_ENABLE_OTA_REQUESTOR
7980
void StartTimer(uint32_t aTimeoutMs);
8081
void CancelTimer(void);
82+
#endif
8183

8284
uint8_t sTestEventTriggerEnableKey[TestEventTriggerDelegate::kEnableKeyLength] = { 0x00, 0x11, 0x22, 0x33, 0x44, 0x55, 0x66, 0x77,
8385
0x88, 0x99, 0xaa, 0xbb, 0xcc, 0xdd, 0xee, 0xff };
@@ -100,9 +102,9 @@ void InitializeOTARequestor(void)
100102
sDownloader.SetImageProcessorDelegate(&sImageProcessor);
101103
sRequestorUser.Init(&sRequestorCore, &sImageProcessor);
102104
}
103-
#endif
104105

105106
TimerHandle_t sOTAInitTimer = 0;
107+
#endif
106108

107109
// The OTA Init Timer is only started upon the first Thread State Change
108110
// detected if the device is already on a Thread Network, or during the AppTask
@@ -176,10 +178,12 @@ void DeviceEventCallback(const ChipDeviceEvent * event, intptr_t arg)
176178
#endif
177179
}
178180

181+
#if CHIP_DEVICE_CONFIG_ENABLE_OTA_REQUESTOR
179182
void OTAInitTimerEventHandler(TimerHandle_t xTimer)
180183
{
181184
InitializeOTARequestor();
182185
}
186+
#endif
183187

184188
int AppTask::StartAppTask()
185189
{
@@ -224,13 +228,14 @@ int AppTask::Init()
224228
;
225229
}
226230

231+
#if CHIP_DEVICE_CONFIG_ENABLE_OTA_REQUESTOR
227232
// Create FreeRTOS sw timer for OTA timer.
228233
sOTAInitTimer = xTimerCreate("OTAInitTmr", // Just a text name, not used by the RTOS kernel
229234
OTAREQUESTOR_INIT_TIMER_DELAY_MS, // timer period (mS)
230235
false, // no timer reload (==one-shot)
231236
(void *) this, // init timer id = light obj context
232237
OTAInitTimerEventHandler // timer callback handler
233-
);
238+
);
234239

235240
if (sOTAInitTimer == NULL)
236241
{
@@ -240,6 +245,7 @@ int AppTask::Init()
240245
{
241246
PLAT_LOG("sOTAInitTimer timer created successfully ");
242247
}
248+
#endif
243249

244250
ret = ThreadStackMgr().InitThreadStack();
245251
if (ret != CHIP_NO_ERROR)

examples/lighting-app/cc13x4_26x4/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ Ninja to build the executable.
108108
to the GN call.
109109
110110
```
111-
gn gen out/debug --args="ti_sysconfig_root=\"$HOME/ti/sysconfig_1.18.1\" target_defines=[\"CC13X4_26X4_ATTESTATION_CREDENTIALS=1\"]"
111+
gn gen out/debug --args="ti_sysconfig_root=\"$HOME/ti/sysconfig_1.18.1\" target_defines=[\"CC13X4_26X4_ATTESTATION_CREDENTIALS=1\"] chip_generate_link_map_file=true"
112112
```
113113
114114
## Programming

examples/lighting-app/cc13x4_26x4/src/AppTask.cpp

+8-2
Original file line numberDiff line numberDiff line change
@@ -126,9 +126,9 @@ void InitializeOTARequestor(void)
126126
sDownloader.SetImageProcessorDelegate(&sImageProcessor);
127127
sRequestorUser.Init(&sRequestorCore, &sImageProcessor);
128128
}
129-
#endif
130129

131130
TimerHandle_t sOTAInitTimer = 0;
131+
#endif
132132

133133
// The OTA Init Timer is only started upon the first Thread State Change
134134
// detected if the device is already on a Thread Network, or during the AppTask
@@ -215,10 +215,12 @@ void DeviceEventCallback(const ChipDeviceEvent * event, intptr_t arg)
215215
}
216216
}
217217

218+
#if CHIP_DEVICE_CONFIG_ENABLE_OTA_REQUESTOR
218219
void OTAInitTimerEventHandler(TimerHandle_t xTimer)
219220
{
220221
InitializeOTARequestor();
221222
}
223+
#endif
222224

223225
int AppTask::Init()
224226
{
@@ -239,13 +241,14 @@ int AppTask::Init()
239241
;
240242
}
241243

244+
#if CHIP_DEVICE_CONFIG_ENABLE_OTA_REQUESTOR
242245
// Create FreeRTOS sw timer for OTA timer.
243246
sOTAInitTimer = xTimerCreate("OTAInitTmr", // Just a text name, not used by the RTOS kernel
244247
OTAREQUESTOR_INIT_TIMER_DELAY_MS, // timer period (mS)
245248
false, // no timer reload (==one-shot)
246249
(void *) this, // init timer id = light obj context
247250
OTAInitTimerEventHandler // timer callback handler
248-
);
251+
);
249252

250253
if (sOTAInitTimer == NULL)
251254
{
@@ -255,6 +258,7 @@ int AppTask::Init()
255258
{
256259
PLAT_LOG("sOTAInitTimer timer created successfully ");
257260
}
261+
#endif
258262

259263
ret = ThreadStackMgr().InitThreadStack();
260264
if (ret != CHIP_NO_ERROR)
@@ -371,6 +375,7 @@ void AppTask::AppTaskMain(void * pvParameter)
371375
}
372376
}
373377

378+
#if CHIP_DEVICE_CONFIG_ENABLE_OTA_REQUESTOR
374379
void StartTimer(uint32_t aTimeoutMs)
375380
{
376381
PLAT_LOG("Start OTA Init Timer")
@@ -396,6 +401,7 @@ void CancelTimer(void)
396401
PLAT_LOG("sOTAInitTimer stop() failed");
397402
}
398403
}
404+
#endif
399405

400406
void AppTask::ActionInitiated(LightingManager::Action_t aAction, int32_t aActor)
401407
{

examples/lock-app/cc13x4_26x4/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ Ninja to build the executable.
109109
to the GN call.
110110
111111
```
112-
gn gen out/debug --args="ti_sysconfig_root=\"$HOME/ti/sysconfig_1.18.1\" target_defines=[\"CC13X4_26X4_ATTESTATION_CREDENTIALS=1\"]"
112+
gn gen out/debug --args="ti_sysconfig_root=\"$HOME/ti/sysconfig_1.18.1\" target_defines=[\"CC13X4_26X4_ATTESTATION_CREDENTIALS=1\"] chip_generate_link_map_file=true"
113113
```
114114
115115
## Programming

examples/lock-app/cc13x4_26x4/src/AppTask.cpp

+11-2
Original file line numberDiff line numberDiff line change
@@ -94,8 +94,10 @@ void uiLocked(void);
9494
void uiUnlocking(void);
9595
void uiUnlocked(void);
9696

97+
#if CHIP_DEVICE_CONFIG_ENABLE_OTA_REQUESTOR
9798
void StartTimer(uint32_t aTimeoutMs);
9899
void CancelTimer(void);
100+
#endif
99101

100102
uint8_t sTestEventTriggerEnableKey[TestEventTriggerDelegate::kEnableKeyLength] = { 0x00, 0x11, 0x22, 0x33, 0x44, 0x55, 0x66, 0x77,
101103
0x88, 0x99, 0xaa, 0xbb, 0xcc, 0xdd, 0xee, 0xff };
@@ -118,10 +120,11 @@ void InitializeOTARequestor(void)
118120
sDownloader.SetImageProcessorDelegate(&sImageProcessor);
119121
sRequestorUser.Init(&sRequestorCore, &sImageProcessor);
120122
}
121-
#endif
122123

123124
TimerHandle_t sOTAInitTimer = 0;
124125

126+
#endif
127+
125128
// The OTA Init Timer is only started upon the first Thread State Change
126129
// detected if the device is already on a Thread Network, or during the AppTask
127130
// Init sequence if the device is not yet on a Thread Network. Once the timer
@@ -207,10 +210,12 @@ void DeviceEventCallback(const ChipDeviceEvent * event, intptr_t arg)
207210
}
208211
}
209212

213+
#if CHIP_DEVICE_CONFIG_ENABLE_OTA_REQUESTOR
210214
void OTAInitTimerEventHandler(TimerHandle_t xTimer)
211215
{
212216
InitializeOTARequestor();
213217
}
218+
#endif
214219

215220
int AppTask::Init()
216221
{
@@ -230,13 +235,14 @@ int AppTask::Init()
230235
;
231236
}
232237

238+
#if CHIP_DEVICE_CONFIG_ENABLE_OTA_REQUESTOR
233239
// Create FreeRTOS sw timer for OTA timer.
234240
sOTAInitTimer = xTimerCreate("OTAInitTmr", // Just a text name, not used by the RTOS kernel
235241
OTAREQUESTOR_INIT_TIMER_DELAY_MS, // timer period (mS)
236242
false, // no timer reload (==one-shot)
237243
(void *) this, // init timer id = light obj context
238244
OTAInitTimerEventHandler // timer callback handler
239-
);
245+
);
240246

241247
if (sOTAInitTimer == NULL)
242248
{
@@ -246,6 +252,7 @@ int AppTask::Init()
246252
{
247253
PLAT_LOG("sOTAInitTimer timer created successfully ");
248254
}
255+
#endif
249256

250257
ret = ThreadStackMgr().InitThreadStack();
251258
if (ret != CHIP_NO_ERROR)
@@ -418,6 +425,7 @@ void AppTask::AppTaskMain(void * pvParameter)
418425
}
419426
}
420427

428+
#if CHIP_DEVICE_CONFIG_ENABLE_OTA_REQUESTOR
421429
void StartTimer(uint32_t aTimeoutMs)
422430
{
423431
PLAT_LOG("Start OTA Init Timer")
@@ -443,6 +451,7 @@ void CancelTimer(void)
443451
PLAT_LOG("sOTAInitTimer stop() failed");
444452
}
445453
}
454+
#endif
446455

447456
void AppTask::ActionInitiated(LockManager::Action_t aAction)
448457
{

examples/pump-app/cc13x4_26x4/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ Ninja to build the executable.
108108
to the GN call.
109109
110110
```
111-
gn gen out/debug --args="ti_sysconfig_root=\"$HOME/ti/sysconfig_1.18.1\" target_defines=[\"CC13X4_26X4_ATTESTATION_CREDENTIALS=1\"]"
111+
gn gen out/debug --args="ti_sysconfig_root=\"$HOME/ti/sysconfig_1.18.1\" target_defines=[\"CC13X4_26X4_ATTESTATION_CREDENTIALS=1\"] chip_generate_link_map_file=true"
112112
```
113113
114114
## Programming

examples/pump-app/cc13x4_26x4/main/AppTask.cpp

+9-1
Original file line numberDiff line numberDiff line change
@@ -96,8 +96,10 @@ AppTask AppTask::sAppTask;
9696

9797
static DeviceCallbacks sDeviceCallbacks;
9898

99+
#if CHIP_DEVICE_CONFIG_ENABLE_OTA_REQUESTOR
99100
void StartTimer(uint32_t aTimeoutMs);
100101
void CancelTimer(void);
102+
#endif
101103

102104
uint8_t sTestEventTriggerEnableKey[TestEventTriggerDelegate::kEnableKeyLength] = { 0x00, 0x11, 0x22, 0x33, 0x44, 0x55, 0x66, 0x77,
103105
0x88, 0x99, 0xaa, 0xbb, 0xcc, 0xdd, 0xee, 0xff };
@@ -120,9 +122,9 @@ void InitializeOTARequestor(void)
120122
sDownloader.SetImageProcessorDelegate(&sImageProcessor);
121123
sRequestorUser.Init(&sRequestorCore, &sImageProcessor);
122124
}
123-
#endif
124125

125126
TimerHandle_t sOTAInitTimer = 0;
127+
#endif
126128

127129
// The OTA Init Timer is only started upon the first Thread State Change
128130
// detected if the device is already on a Thread Network, or during the AppTask
@@ -171,10 +173,12 @@ void DeviceEventCallback(const ChipDeviceEvent * event, intptr_t arg)
171173
}
172174
}
173175

176+
#if CHIP_DEVICE_CONFIG_ENABLE_OTA_REQUESTOR
174177
void OTAInitTimerEventHandler(TimerHandle_t xTimer)
175178
{
176179
InitializeOTARequestor();
177180
}
181+
#endif
178182

179183
int AppTask::StartAppTask()
180184
{
@@ -217,6 +221,7 @@ int AppTask::Init()
217221
;
218222
}
219223

224+
#if CHIP_DEVICE_CONFIG_ENABLE_OTA_REQUESTOR
220225
// Create FreeRTOS sw timer for OTA timer.
221226
sOTAInitTimer = xTimerCreate("OTAInitTmr", // Just a text name, not used by the RTOS kernel
222227
OTAREQUESTOR_INIT_TIMER_DELAY_MS, // timer period (mS)
@@ -233,6 +238,7 @@ int AppTask::Init()
233238
{
234239
PLAT_LOG("sOTAInitTimer timer created successfully ");
235240
}
241+
#endif
236242

237243
ret = ThreadStackMgr().InitThreadStack();
238244
if (ret != CHIP_NO_ERROR)
@@ -353,6 +359,7 @@ void AppTask::PostEvent(const AppEvent * aEvent)
353359
}
354360
}
355361

362+
#if CHIP_DEVICE_CONFIG_ENABLE_OTA_REQUESTOR
356363
void StartTimer(uint32_t aTimeoutMs)
357364
{
358365
PLAT_LOG("Start OTA Init Timer")
@@ -378,6 +385,7 @@ void CancelTimer(void)
378385
PLAT_LOG("sOTAInitTimer stop() failed");
379386
}
380387
}
388+
#endif
381389

382390
void AppTask::ActionInitiated(PumpManager::Action_t aAction, int32_t aActor)
383391
{

examples/pump-controller-app/cc13x4_26x4/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ Ninja to build the executable.
110110
to the GN call.
111111
112112
```
113-
gn gen out/debug --args="ti_sysconfig_root=\"$HOME/ti/sysconfig_1.18.1\" target_defines=[\"CC13X4_26X4_ATTESTATION_CREDENTIALS=1\"]"
113+
gn gen out/debug --args="ti_sysconfig_root=\"$HOME/ti/sysconfig_1.18.1\" target_defines=[\"CC13X4_26X4_ATTESTATION_CREDENTIALS=1\"] chip_generate_link_map_file=true"
114114
```
115115
116116
## Programming

examples/pump-controller-app/cc13x4_26x4/main/AppTask.cpp

+10-1
Original file line numberDiff line numberDiff line change
@@ -83,8 +83,10 @@ static Button_Handle sAppRightHandle;
8383

8484
AppTask AppTask::sAppTask;
8585

86+
#if CHIP_DEVICE_CONFIG_ENABLE_OTA_REQUESTOR
8687
void StartTimer(uint32_t aTimeoutMs);
8788
void CancelTimer(void);
89+
#endif
8890

8991
uint8_t sTestEventTriggerEnableKey[TestEventTriggerDelegate::kEnableKeyLength] = { 0x00, 0x11, 0x22, 0x33, 0x44, 0x55, 0x66, 0x77,
9092
0x88, 0x99, 0xaa, 0xbb, 0xcc, 0xdd, 0xee, 0xff };
@@ -107,10 +109,11 @@ void InitializeOTARequestor(void)
107109
sDownloader.SetImageProcessorDelegate(&sImageProcessor);
108110
sRequestorUser.Init(&sRequestorCore, &sImageProcessor);
109111
}
110-
#endif
111112

112113
TimerHandle_t sOTAInitTimer = 0;
113114

115+
#endif
116+
114117
// The OTA Init Timer is only started upon the first Thread State Change
115118
// detected if the device is already on a Thread Network, or during the AppTask
116119
// Init sequence if the device is not yet on a Thread Network. Once the timer
@@ -199,10 +202,12 @@ void DeviceEventCallback(const ChipDeviceEvent * event, intptr_t arg)
199202
}
200203
}
201204

205+
#if CHIP_DEVICE_CONFIG_ENABLE_OTA_REQUESTOR
202206
void OTAInitTimerEventHandler(TimerHandle_t xTimer)
203207
{
204208
InitializeOTARequestor();
205209
}
210+
#endif
206211

207212
int AppTask::Init()
208213
{
@@ -222,6 +227,7 @@ int AppTask::Init()
222227
;
223228
}
224229

230+
#if CHIP_DEVICE_CONFIG_ENABLE_OTA_REQUESTOR
225231
// Create FreeRTOS sw timer for OTA timer.
226232
sOTAInitTimer = xTimerCreate("OTAInitTmr", // Just a text name, not used by the RTOS kernel
227233
OTAREQUESTOR_INIT_TIMER_DELAY_MS, // timer period (mS)
@@ -238,6 +244,7 @@ int AppTask::Init()
238244
{
239245
PLAT_LOG("sOTAInitTimer timer created successfully ");
240246
}
247+
#endif
241248

242249
ret = ThreadStackMgr().InitThreadStack();
243250
if (ret != CHIP_NO_ERROR)
@@ -352,6 +359,7 @@ void AppTask::PostEvent(const AppEvent * aEvent)
352359
}
353360
}
354361

362+
#if CHIP_DEVICE_CONFIG_ENABLE_OTA_REQUESTOR
355363
void StartTimer(uint32_t aTimeoutMs)
356364
{
357365
PLAT_LOG("Start OTA Init Timer")
@@ -377,6 +385,7 @@ void CancelTimer(void)
377385
PLAT_LOG("sOTAInitTimer stop() failed");
378386
}
379387
}
388+
#endif
380389

381390
void AppTask::ActionInitiated(PumpManager::Action_t aAction, int32_t aActor)
382391
{

examples/shell/cc13x4_26x4/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ Ninja to build the executable.
6363
to the GN call.
6464
6565
```
66-
gn gen out/debug --args="ti_sysconfig_root=\"$HOME/ti/sysconfig_1.18.1\" target_defines=[\"CC13X4_26X4_ATTESTATION_CREDENTIALS=1\"]"
66+
gn gen out/debug --args="ti_sysconfig_root=\"$HOME/ti/sysconfig_1.18.1\" target_defines=[\"CC13X4_26X4_ATTESTATION_CREDENTIALS=1\"] chip_generate_link_map_file=true"
6767
```
6868
6969
## Programming

src/lwip/cc13xx_26xx/lwipopts.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@
8989
#define MEMP_SEPARATE_POOLS (1)
9090
#define LWIP_PBUF_FROM_CUSTOM_POOLS (0)
9191
#define MEMP_USE_CUSTOM_POOLS (0)
92-
#define PBUF_POOL_SIZE (12)
92+
#define PBUF_POOL_SIZE (18)
9393
#define PBUF_POOL_BUFSIZE (1280)
9494
#define PBUF_CUSTOM_POOL_IDX_START (MEMP_PBUF_POOL_SMALL)
9595
#define PBUF_CUSTOM_POOL_IDX_END (MEMP_PBUF_POOL_LARGE)

0 commit comments

Comments
 (0)