Skip to content
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

Append script to a hex file with included filesystem #2

Open
microbit-carlos opened this issue Jan 18, 2019 · 1 comment
Open

Append script to a hex file with included filesystem #2

microbit-carlos opened this issue Jan 18, 2019 · 1 comment

Comments

@microbit-carlos
Copy link
Collaborator

If we attempt to append a script to a hex file we should first check if the filesystem is already in use.
If so we should throw an error.

Technically we could move any possible magnetometer calibration data and persistent config page, but this use case is so small it is not worth the effort.

@microbit-carlos
Copy link
Collaborator Author

microbit-carlos commented Feb 7, 2019

/**
* Converts the Python code into the Intel Hex format expected by
* MicroPython and injects it into a Intel Hex string containing a marker.
*
* TODO: Throw error if filesystem is using the penultimate page already.
*
* @param intelHex - Single string of Intel Hex records to inject the code.
* @param pyStr - Python code string.
* @returns Intel Hex string with the Python code injected.
*/
function addIntelHexAppendedScript(intelHex: string, pyCode: string): string {

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

No branches or pull requests

1 participant