File tree Expand file tree Collapse file tree 6 files changed +22
-22
lines changed Expand file tree Collapse file tree 6 files changed +22
-22
lines changed Original file line number Diff line number Diff line change @@ -69,12 +69,12 @@ def read_stub_json(json_file):
6969 {{
7070 .addr = { text_start } ,
7171 .size = { text_size } ,
72- .data = (uint8_t[]){{{ text_str } }},
72+ .data = (const uint8_t[]){{{ text_str } }},
7373 }},
7474 {{
7575 .addr = { data_start } ,
7676 .size = { data_size } ,
77- .data = (uint8_t[]){{{ data_str } }},
77+ .data = (const uint8_t[]){{{ data_str } }},
7878 }},
7979 }},
8080 }},
Original file line number Diff line number Diff line change @@ -539,7 +539,7 @@ esp_loader_error_t load_ram_binary(const uint8_t *bin)
539539 }
540540
541541 size_t remain_size = segments [seg ].size ;
542- uint8_t * data_pos = segments [seg ].data ;
542+ const uint8_t * data_pos = segments [seg ].data ;
543543 while (remain_size > 0 ) {
544544 size_t data_size = MIN (ESP_RAM_BLOCK , remain_size );
545545 err = esp_loader_mem_write (data_pos , data_size );
Original file line number Diff line number Diff line change @@ -87,7 +87,7 @@ typedef struct {
8787typedef struct {
8888 uint32_t addr ;
8989 uint32_t size ;
90- uint8_t * data ;
90+ const uint8_t * data ;
9191} esp_loader_bin_segment_t ;
9292
9393typedef struct {
Load Diff Large diffs are not rendered by default.
Load Diff Large diffs are not rendered by default.
Original file line number Diff line number Diff line change @@ -57,7 +57,7 @@ esp_loader_error_t loader_run_stub(target_chip_t target)
5757 }
5858
5959 size_t remain_size = stub -> segments [seg ].size ;
60- uint8_t * data_pos = stub -> segments [seg ].data ;
60+ const uint8_t * data_pos = stub -> segments [seg ].data ;
6161 while (remain_size > 0 ) {
6262 size_t data_size = MIN (ESP_RAM_BLOCK , remain_size );
6363 err = esp_loader_mem_write (data_pos , data_size );
You can’t perform that action at this time.
0 commit comments