[fix] make_memory_map should receive flash_size as uint32_t

pull/8/head
Fabien Le Mentec 2011-06-05 12:35:09 -05:00
rodzic 4f35b81fc5
commit 08a79ed0fe
1 zmienionych plików z 2 dodań i 3 usunięć

Wyświetl plik

@ -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';