mirror of
https://github.com/avrdudes/avrdude.git
synced 2026-09-29 04:18:54 +03:00
Move ordering of memory sections after reading config file
As suggested, sort the memory sections into order right after reading the config file, so all consumers of the library will later see them in the same order.
This commit is contained in:
@@ -378,6 +378,10 @@ part_def :
|
||||
yywarning("revise fileio_mem_offset(), avrdude.conf entry or memory type assignment");
|
||||
}
|
||||
|
||||
// Sort memories in canonical order
|
||||
if(current_part->mem)
|
||||
lsort(current_part->mem, avr_mem_cmp);
|
||||
|
||||
existing_part = locate_part(part_list, current_part->id);
|
||||
if(existing_part) {
|
||||
{ /* temporarily set lineno to lineno of part start */
|
||||
|
||||
@@ -1184,11 +1184,6 @@ int main(int argc, char *argv[]) {
|
||||
}
|
||||
}
|
||||
|
||||
// Sort memories of all parts in canonical order
|
||||
for(LNODEID ln1 = lfirst(part_list); ln1; ln1 = lnext(ln1))
|
||||
if((p = ldata(ln1))->mem)
|
||||
lsort(p->mem, avr_mem_cmp);
|
||||
|
||||
// Set bitclock from configuration files unless changed by command line
|
||||
if(default_bitclock > 0 && bitclock == 0.0) {
|
||||
bitclock = default_bitclock;
|
||||
|
||||
Reference in New Issue
Block a user