-
Notifications
You must be signed in to change notification settings - Fork 118
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Mini boot #11
base: mini-boot
Are you sure you want to change the base?
Mini boot #11
Conversation
The firmware matches pretty much the DFU 1.1 specification. This is a follow up of 95e1150 which only changed the separately defined u8_usbFunctionalDescriptor but not the one included in the configuration descriptor. And which also got it wrong (0.1). (Ideally the code should be cleaned up to only specify this in one place) Also fix the detach timeout which was set to 64 seconds. I believe the intended value was 255 ms like stated in the comment. Since the Maple devices are not detached (transition between run-time mode and DFU mode, issued over the DFU interface), this is not used anyway. Signed-off-by: Tormod Volden <[email protected]> Acked-by: Marti Bolivar <[email protected]>
To let DFU programmers such as dfu-util know that they can trust the DFU functional descriptor on this device. Signed-off-by: Tormod Volden <[email protected]> Acked-by: Marti Bolivar <[email protected]> Signed-off-by: Marti Bolivar <[email protected]>
It's about time we had one of these, and I don't want to imply that the previous two commits for DFU compliance were mine. So credit their author, Tormod Volden, in the single entry. We can add more people as we go. Signed-off-by: Marti Bolivar <[email protected]>
Comitting the results of: $ find . -name '*.c' -o -name '*.s' -o -name '*.h' -o -name '*.ld' | xargs fromdos Signed-off-by: Marti Bolivar <[email protected]>
Command used: $ ack --files-with-matches '[ \t]+$' | xargs sed -i -E 's/[ \t]+$//' `ack' is also known as `ack-grep' on some systems and in some package managers (e.g. Ubuntu's). Signed-off-by: Marti Bolivar <[email protected]>
32 ms is the value used in ST's DFU IAP example for STM32. For DFU-compliant programming tools like dfu-util this change should speed up flashing more than ten times. Signed-off-by: Tormod Volden <[email protected]>
The sources have ugly whitespace. Run astyle on them, ignoring those in usb_lib/. Astyle version 2.01 (2.01-1 on Ubuntu 12.04) options were: --indent=spaces=4 --style=java --indent-namespaces --pad-oper --pad-header --unpad-paren --align-pointer=name --indent-preprocessor --lineend=linux Signed-off-by: Marti Bolivar <[email protected]>
Signed-off-by: Marti Bolivar <[email protected]>
USB uses little endian, as does ARM, so there should not be any byte swapping. Bytes were swapped back and forth inconsistently and would break word access of u16_u8 union types. It seems like this has gone unnoticed for long because the word values are mostly used for comparing against zero. Signed-off-by: Tormod Volden <[email protected]>
The DFU_UPLOAD support allows copying the contents of the flash or RAM memory of the Maple to the computer. Note that we use the wValue (BlockNum in the DFU standard) to calculate the target address. We therefore rely on the host program (for instance dfu-util) to set (increase) wValue for each block. This use of wValue is not mandated by the DFU standard, which only says wValue should be incremented by the host "to provide useful context" to the device, but this implementation allows random access of memory locations. On the other hand the DFU_DNLOAD code does not make use of BlockNum but simply increases its memory pointer for each block received. Maybe this was done because reading out wValue was broken due to endian mix-up? Signed-off-by: Tormod Volden <[email protected]>
Signed-off-by: Marti Bolivar <[email protected]>
Fixing dfu.c to allow compiling with -Os
Conflicts: dfu.c hardware.c hardware.h main.c usb.c
Can you tell me whether you still intend maintaining your repo now that LeafLabs have issued an End of Life notification? (Marti just closed a issue I put in to the leaflabs repo about build targets using the Make file rather than using Branches) I have forked your repo and intend to make some changes, possibly including build targets, but as Marti will not be actioning Pull Requests any more, either your repo will need to become the master and I will issue a Pull Request to your repo, Or I need to make a new master. Thanks Roger |
Merge mini-boot into master (for faster downloads, astyle etc)