kopia lustrzana https://github.com/stlink-org/stlink
[fix] make_memory_map should receive flash_size as uint32_t
rodzic
4f35b81fc5
commit
08a79ed0fe
|
@ -46,7 +46,7 @@ struct chip_params {
|
||||||
};
|
};
|
||||||
|
|
||||||
int serve(struct stlink* sl, int port);
|
int serve(struct stlink* sl, int port);
|
||||||
static char* make_memory_map(const struct chip_params *params, uint32_t flash_size);
|
char* make_memory_map(const struct chip_params *params, uint32_t flash_size);
|
||||||
|
|
||||||
int main(int argc, char** argv) {
|
int main(int argc, char** argv) {
|
||||||
if(argc != 3) {
|
if(argc != 3) {
|
||||||
|
@ -121,8 +121,7 @@ static const char* const memory_map_template =
|
||||||
" <memory type=\"rom\" start=\"0x1ffff800\" length=\"0x8\"/>" // option byte area
|
" <memory type=\"rom\" start=\"0x1ffff800\" length=\"0x8\"/>" // option byte area
|
||||||
"</memory-map>";
|
"</memory-map>";
|
||||||
|
|
||||||
static char*
|
char* make_memory_map(const struct chip_params *params, uint32_t flash_size) {
|
||||||
make_memory_map(const struct chip_params *params, uint32_t flash_size) {
|
|
||||||
/* This will be freed in serve() */
|
/* This will be freed in serve() */
|
||||||
char* map = malloc(4096);
|
char* map = malloc(4096);
|
||||||
map[0] = '\0';
|
map[0] = '\0';
|
||||||
|
|
Ładowanie…
Reference in New Issue