avr-rust/avr-mcu

When accessing a single packfile, do not load every packfile into memory

dylanmckay opened this issue · 1 comments

Using the avr_mcu::microcontroller("atmega328p") function will load and parse every single packfile in the repository, causing it to take ~20s.

We should modify the function so that it only loads the packfile for the specified device.

This may be possible by downcasing the filenames of the packfiles and comparing them to the specified CPU. This may not work depending on whether or not all packfiles have unique filenames and also have filenames matching the mcu name.

Given that the names of a couple of the directories (automotive and atmega) don't line up with the names of the pack files inside, it will require magic matching in the load logic to find the appropriate files for AT90* and the ATA* mcu's.

The pack files do seem to have unique names. It may be slightly easier to do this operation if all of the pack files are dumped into a single directory.