Skip to content

Commit dadc1e4

Browse files
committed
component: ulp: Fix memory initialization
Do not clear shared memory in initialization Signed-off-by: Lucas Tamborrino <[email protected]>
1 parent b21aa62 commit dadc1e4

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

components/ulp/lp_core/lp_core.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -160,8 +160,8 @@ esp_err_t ulp_lp_core_load_binary(const uint8_t* program_binary, size_t program_
160160
uint32_t* base = RTC_SLOW_MEM;
161161
#endif
162162

163-
//Start by clearing memory reserved with zeros, this will also will initialize the bss:
164-
memset(base, 0, ULP_COPROC_RESERVE_MEM);
163+
/* Clear only program size bytes to avoid clearing the shared memory */
164+
memset(base, 0, program_size_bytes);
165165
memcpy(base, program_binary, program_size_bytes);
166166

167167
return ESP_OK;

0 commit comments

Comments
 (0)