@@ -56,12 +56,6 @@ extern "C" {
56
56
#elif CHIP_DEVICE_LAYER_TARGET_BL702L
57
57
#include < bl_flash.h>
58
58
#endif
59
-
60
- #if CHIP_DEVICE_LAYER_TARGET_BL702L
61
- #include < rom_freertos_ext.h>
62
- #include < rom_hal_ext.h>
63
- #include < rom_lmac154_ext.h>
64
- #endif
65
59
}
66
60
67
61
#include < uart.h>
@@ -85,7 +79,6 @@ extern "C" unsigned int sleep(unsigned int seconds)
85
79
return 0 ;
86
80
}
87
81
88
- #if !CHIP_DEVICE_LAYER_TARGET_BL702L
89
82
extern " C" void vApplicationStackOverflowHook (TaskHandle_t xTask, char * pcTaskName)
90
83
{
91
84
printf (" Stack Overflow checked. Stack name %s" , pcTaskName);
@@ -169,9 +162,7 @@ extern "C" void vAssertCalled(void)
169
162
{
170
163
void * ra = (void *) __builtin_return_address (0 );
171
164
172
- #if CONF_ENABLE_FRAME_PTR == 0
173
165
taskDISABLE_INTERRUPTS ();
174
- #endif
175
166
176
167
if (xPortIsInsideInterrupt ())
177
168
{
@@ -182,65 +173,13 @@ extern "C" void vAssertCalled(void)
182
173
printf (" vAssertCalled, ra = %p in task %s\r\n " , (void *) ra, pcTaskGetName (NULL ));
183
174
}
184
175
185
- #if CONF_ENABLE_FRAME_PTR
186
176
portABORT ();
187
- #endif
188
177
189
- while (true )
190
- ;
178
+ while (true ) ;
191
179
}
192
- #endif
193
-
194
- #if CHIP_DEVICE_LAYER_TARGET_BL702L
195
- extern " C" void __attribute__ ((weak)) user_vAssertCalled(void )
196
- {
197
- void * ra = (void *) __builtin_return_address (0 );
198
-
199
- taskDISABLE_INTERRUPTS ();
200
-
201
- if (xPortIsInsideInterrupt ())
202
- {
203
- printf (" vAssertCalled, ra = %p in ISR\r\n " , (void *) ra);
204
- }
205
- else
206
- {
207
- printf (" vAssertCalled, ra = %p in task %s\r\n " , (void *) ra, pcTaskGetName (NULL ));
208
- }
209
180
210
- while (true )
211
- ;
212
- }
213
-
214
- extern " C" void __attribute__ ((weak)) user_vApplicationStackOverflowHook(TaskHandle_t xTask, char * pcTaskName)
215
- {
216
- puts (" Stack Overflow checked\r\n " );
217
- if (pcTaskName)
218
- {
219
- printf (" Stack name %s\r\n " , pcTaskName);
220
- }
221
- while (1 )
222
- {
223
- /* empty here*/
224
- }
225
- }
226
-
227
- extern " C" void __attribute__ ((weak)) user_vApplicationMallocFailedHook(void )
228
- {
229
- printf (" Memory Allocate Failed. Current left size is %d bytes\r\n " , xPortGetFreeHeapSize ());
230
- #if defined(CFG_USE_PSRAM)
231
- printf (" Current psram left size is %d bytes\r\n " , xPortGetFreeHeapSizePsram ());
232
- #endif
233
- while (1 )
234
- {
235
- /* empty here*/
236
- }
237
- }
238
-
239
- extern " C" void bflb_assert (void ) __attribute__((weak, alias(" user_vAssertCalled" )));
240
- #else
241
181
extern " C" void user_vAssertCalled (void ) __attribute__((weak, alias(" vAssertCalled" )));
242
182
extern " C" void bflb_assert (void ) __attribute__((weak, alias(" vAssertCalled" )));
243
- #endif
244
183
245
184
// ================================================================================
246
185
// Main Code
@@ -336,16 +275,8 @@ extern "C" void setup_heap()
336
275
{
337
276
bl_sys_init ();
338
277
339
- #if CHIP_DEVICE_LAYER_TARGET_BL702
340
- bl_sys_em_config ();
341
- #elif CHIP_DEVICE_LAYER_TARGET_BL702L
278
+ #if CHIP_DEVICE_LAYER_TARGET_BL702 || CHIP_DEVICE_LAYER_TARGET_BL702L
342
279
bl_sys_em_config ();
343
-
344
- // Initialize rom data
345
- extern uint8_t _rom_data_run;
346
- extern uint8_t _rom_data_load;
347
- extern uint8_t _rom_data_size;
348
- memcpy ((void *) &_rom_data_run, (void *) &_rom_data_load, (size_t ) &_rom_data_size);
349
280
#endif
350
281
351
282
#if CHIP_DEVICE_LAYER_TARGET_BL702
@@ -376,9 +307,6 @@ extern "C" void app_init(void)
376
307
377
308
#if CHIP_DEVICE_LAYER_TARGET_BL702L
378
309
bl_flash_init ();
379
-
380
- rom_freertos_init (256 , 400 );
381
- rom_hal_init ();
382
310
#endif
383
311
384
312
hosal_uart_init (&uart_stdio);
0 commit comments