Skip to content

Remove hex manipulation code and use Nordic Intel Hex lib #77

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

Merged
merged 3 commits into from
Feb 1, 2019

Conversation

microbit-carlos
Copy link
Collaborator

Uses https://github.com/NordicSemiconductor/nrf-intel-hex, included as static/js/intel-hex.browser.js.

@microbit-rosslowe Can you review?

@microbit-carlos microbit-carlos changed the title Remove hex manipulation code and use Nordics lib Remove hex manipulation code and use Nordic Intel Hex lib Jan 16, 2019
@microbit-rosslowe
Copy link
Contributor

Odd bug in Safari Version 12.0.1 (14606.2.104.1.1), using a micro:bit 1.3b:

DAPLink Firmware - see https://mbed.com/daplink
Version: 0234
Build:   Oct 12 2015 14:53:22

I tested the basic, initial hello world script. In this PR, I get this hex file:
Unknown.zip

When attempting to flash the process appears to time out, and when the micro:bit is ejected it needs to be disconnected and reconnected.

The file works on my 1.5 if you rename to .hex:

# DAPLink Firmware - see https://mbed.com/daplink
Unique ID: 9901000050244e45003a2009000000670000000097969901
HIC ID: 97969901
Auto Reset: 1
Automation allowed: 0
Overflow detection: 0
Daplink Mode: Interface
Interface Version: 0249
Bootloader Version: 0243
Git SHA: 9c5fd81e6545d00b7f7c21ca9d8577dbd6a5fed2
Local Mods: 0
USB Interfaces: MSD, CDC, HID, WebUSB
Bootloader CRC: 0x32eb3cfd
Interface CRC: 0xcdb7b2a3
Remount count: 1
URL: https://microbit.org/device/?id=9901&v=0249

The first time I didn't rename I got a FAIL.TXT, which mentioned something about a time out. But since trying again this flashed fine.

@microbit-rosslowe
Copy link
Contributor

microbit-rosslowe commented Jan 16, 2019

Chrome downloads this as .hex, as expected, but this file still won't flash properly to the 1.3. On master, this produces a file that flashes fine.

https://python.microbit.org/v/0 works fine, and will flash without renaming to .hex.
Tested this on another 1.3, same version of DAPLink; same outcome.

@microbit-carlos
Copy link
Collaborator Author

@microbit-rosslowe I've updated the code to pad the code so that it works in older versions of DAPLink, could you test again?
(Safari should still have the "unknown" filename issue, but adding the .hex extension should work).

@microbit-rosslowe
Copy link
Contributor

Thanks @microbit-carlos this works on both versions of DAPLink now.

To keep all things related to the Intel Hex format and the MicroPython
details contained in their own modules.

There is no functional changes, just the refactor.
@microbit-carlos microbit-carlos merged commit d24fc7d into bbcmicrobit:master Feb 1, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants