Closed Qyriad closed 2 years ago
:thinking: Can you provide me a link to the document with this extension?
I can apply the changes you asked easily and add tests but I would like to link the behavior with the spec.
I'll merge this for now but I couldn't find the specification document. If you have a link it would be great!
The document is deceptively hard to find, tbh. It's this: https://www.st.com/content/ccc/resource/technical/document/user_manual/cc/6d/c3/43/ea/29/4b/eb/CD00135281.pdf/files/CD00135281.pdf/jcr:content/translations/en.CD00135281.pdf. Technically it's the the guide for the "firmware kit" used to implement these extensions.
Yes I did try to google the exact example and everything but couldn't find it xD Thanks a bunch, I will add that to the README
Thank you for the quick fix!
https://github.com/dfu-rs/dfu-core/blob/6abef200bdf1025e9ed0572b5b573614a2970ebf/src/memory_layout.rs#L88-L93
The STM32/DeFuse extensions to the DFU specification (where the memory layout string descriptor is defined) indicates that the page count can be a maximum of 2 digits, and the page size can be a maximum of 3 digits, but this parser fails on page counts of 1 digit and page sizes of 1 digit or 2 digits.
Purely for your reference, the two strings the guide to the STM32 DFU extensions gives as examples are:
@Internal Flash 0 /0x00000000/8*064Kg
@Internal Flash 0 /0x00000000/32*064Kg
Which may be useful for testing purposes.