mirror of
https://github.com/stnolting/neorv32.git
synced 2025-04-24 22:27:21 -04:00
[image_gen] minor optimization
This commit is contained in:
parent
53861bdf8d
commit
5b41edd253
1 changed files with 3 additions and 7 deletions
|
@ -349,7 +349,7 @@ int main(int argc, char *argv[]) {
|
|||
// header
|
||||
sprintf(tmp_string, "memory_initialization_radix=16;\n");
|
||||
fputs(tmp_string, output);
|
||||
sprintf(tmp_string, "memory_initialization_vector=");
|
||||
sprintf(tmp_string, "memory_initialization_vector=\n");
|
||||
fputs(tmp_string, output);
|
||||
|
||||
i = 0;
|
||||
|
@ -359,18 +359,14 @@ int main(int argc, char *argv[]) {
|
|||
tmp |= (uint32_t)(buffer[2] << 16);
|
||||
tmp |= (uint32_t)(buffer[3] << 24);
|
||||
if (i == (input_words-1)) {
|
||||
sprintf(tmp_string, "\n%08x", (unsigned int)tmp);
|
||||
sprintf(tmp_string, "%08x;\n", (unsigned int)tmp);
|
||||
}
|
||||
else {
|
||||
sprintf(tmp_string, "\n%08x,", (unsigned int)tmp);
|
||||
sprintf(tmp_string, "%08x,\n", (unsigned int)tmp);
|
||||
}
|
||||
fputs(tmp_string, output);
|
||||
i++;
|
||||
}
|
||||
|
||||
// footer
|
||||
sprintf(tmp_string, ";\n");
|
||||
fputs(tmp_string, output);
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue