mm icon indicating copy to clipboard operation
mm copied to clipboard

Bss script update

Open AngheloAlf opened this issue 1 year ago • 3 comments

  • Update the bss script to use mapfile parser
  • Add flag to specify sections other than .bss, allowing to check for reordering in other sections.
  • Hardcode the path to the mapfile
    • This way it is more consistent with the other scripts.
  • Some code cleanups

Misc changes:

  • Update mapfile_parser version to 2.x.x
    • The most remarkable change is the actual mapfile parsing was rewritten in Rust, so it should be faster
  • Changed the python-Levenshtein requirement to Levenshtein
    • According to its PyPI page the project was renamed, so I think it is better to use the new name instead.

AngheloAlf avatar Feb 04 '24 00:02 AngheloAlf

If it sees a symbol is shifted then it will complain. Example:

f32 sKaleidoSetupRightPageEyeX[] = {
    PAUSE_EYE_DIST * -PAUSE_MAP_X,   // PAUSE_ITEM
    PAUSE_EYE_DIST * -PAUSE_QUEST_X, // PAUSE_MAP
    PAUSE_EYE_DIST * -PAUSE_MASK_X,  // PAUSE_QUEST
    PAUSE_EYE_DIST * -PAUSE_ITEM_X,  // PAUSE_MASK
    0 // Added this
};
f32 sKaleidoSetupRightPageEyeZ[] = {
    PAUSE_EYE_DIST * -PAUSE_MAP_Z,   // PAUSE_ITEM
    PAUSE_EYE_DIST * -PAUSE_QUEST_Z, // PAUSE_MAP
    PAUSE_EYE_DIST * -PAUSE_MASK_Z,  // PAUSE_QUEST
    PAUSE_EYE_DIST * -PAUSE_ITEM_Z,  // PAUSE_MASK
};

Build mapfile:    build/mm.map
Expected mapfile: expected/build/mm.map

Symbol Name,Build Address,Build File,Expected Address,Expected File,Difference,GOOD/BAD/MISSING
sKaleidoSetupRightPageEyeZ,801BDB1C,src/code/z_kaleido_setup.c,801BDB1C,src/code/z_kaleido_setup.c,4,BAD

  BAD
Symbol reordering in src/code/z_kaleido_setup.c

  Symbols are REORDERED!!
  Oh! MY GOD!!

AngheloAlf avatar Feb 04 '24 02:02 AngheloAlf

is it intended both the build and expected addresses are 801BDB1C in this example?

Dragorn421 avatar Feb 04 '24 02:02 Dragorn421

No, that's a bug on the library

AngheloAlf avatar Feb 04 '24 03:02 AngheloAlf