mirror of https://github.com/YosysHQ/icestorm.git
icemulti: Remove constant `NUM_HEADERS'
This commit is contained in:
parent
a622580c13
commit
0e503a69a8
|
|
@ -33,7 +33,6 @@ static char *program_short_name;
|
|||
int log_level = 0;
|
||||
|
||||
static const int NUM_IMAGES = 4;
|
||||
static const int NUM_HEADERS = NUM_IMAGES + 1;
|
||||
static const int HEADER_SIZE = 32;
|
||||
|
||||
static void align_offset(uint32_t &offset, int bits)
|
||||
|
|
@ -262,7 +261,7 @@ int main(int argc, char **argv)
|
|||
error("Specified non-existing image for power on reset\n");
|
||||
|
||||
// Place images
|
||||
uint32_t offs = NUM_HEADERS * HEADER_SIZE;
|
||||
uint32_t offs = (NUM_IMAGES + 1) * HEADER_SIZE;
|
||||
if (align_first)
|
||||
align_offset(offs, align_bits);
|
||||
for (int i=0; i<image_count; i++) {
|
||||
|
|
@ -289,7 +288,7 @@ int main(int argc, char **argv)
|
|||
}
|
||||
|
||||
uint32_t file_offset = 0;
|
||||
for (int i=0; i<NUM_HEADERS; i++)
|
||||
for (int i=0; i<NUM_IMAGES + 1; i++)
|
||||
{
|
||||
pad_to(*osp, file_offset, i * HEADER_SIZE);
|
||||
if (i == 0)
|
||||
|
|
|
|||
Loading…
Reference in New Issue