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

compiler: extend flash command to support different output file types #198

Merged
merged 1 commit into from
Feb 23, 2019

Conversation

deadprogram
Copy link
Member

This PR addresses #142 by extending the tinygo flash command to support different output file types based on contents of flash key in target file.

For example, the target file microbit.json

"flash": "openocd -f interface/cmsis-dap.cfg -f target/nrf51.cfg -c 'program {hex} reset exit'",

will continue to compile a .hex file becase the token in the flash key is {hex}.

Modifying the target file itsybitsy-m0.json like this:

"flash": "uf2conv.py {bin}"

will compile a .bin file before trying to execute the flashing command.

…, based on contents of flash key in target file

Signed-off-by: Ron Evans <ron@hybridgroup.com>
@aykevl aykevl merged commit acaf096 into dev Feb 23, 2019
@aykevl
Copy link
Member

aykevl commented Feb 23, 2019

It seems to me that this was never really necessary, this works just fine for me:

{
    "flash": "/home/ayke/src/uf2/utils/uf2conv.py {hex}"
}

@deadprogram
Copy link
Member Author

This seemed to be the case for me: microsoft/uf2#3

@aykevl
Copy link
Member

aykevl commented Feb 23, 2019

Well, it actually works for me. Program seems to work fine.

@deadprogram
Copy link
Member Author

I know I have that problem if I used the bossac bootloader. In any case, it does set up the next part which will be a pure Go solution to replace that Python script.

@aykevl
Copy link
Member

aykevl commented Feb 23, 2019

Oh that would be really nice. To eliminate dependencies one by one.

@deadprogram deadprogram deleted the feature/target-flash-filetypes branch March 2, 2019 12:37
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