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

Cannot override uploader command #6

Closed
kitlith opened this issue Jan 31, 2017 · 6 comments
Closed

Cannot override uploader command #6

kitlith opened this issue Jan 31, 2017 · 6 comments
Assignees

Comments

@kitlith
Copy link

kitlith commented Jan 31, 2017

There are various different methods of 'uploading' a bitstream, they depend on your setup.

For instance, with the mystorm board, which has a hardcore cpu as well, the bitstream is managed by the hardcore, with methods ranging from 'include this in the hardcore binary' to 'just send it out over serial and the hardcore will handle it'. I could also imagine a 'stick this on an SD card' upload or others.

At the moment, there is no way to override the uploader command from an extra_script, so if one really wants to change the behavior, they have to prepend PATH with a directory that contains a fake 'iceprog' script that actually does what they want.

Alternatively, there may be some SCons magic that I'm not familiar with and don't know how to find. (I'm not a SCons user, but I've been looking into it due to platformio.)

@Jesus89
Copy link
Collaborator

Jesus89 commented Feb 1, 2017

A solution may be to allow override the programmer in an environment variable (Just editing the builder).
Let's see what Ivan thinks.

@ivankravets
Copy link
Member

@Jesus89 Could you implement uploading using a separate command? Please take a look how we do that for Atmel AVR development platform:

Here is example how user can override this "upload command"

@Jesus89 Jesus89 self-assigned this Mar 1, 2017
@Jesus89
Copy link
Collaborator

Jesus89 commented Mar 1, 2017

Added in the builder the env vars:

  • $UPLOADER
  • $UPLOADERFLAGS
  • $UPLOADBINCMD = $UPLOADER $UPLOADERFLAGS $SOURCES

These variables can be modified from an extra_script.py:

Import('env')
env.Replace(UPLOADBINCMD='yourprogrammer $SOURCES')
Import('env')
env.Replace(UPLOADER='yourprogrammer', UPLOADFLAGS='yourflags')

It will be available in the release v1.2.0

@Jesus89 Jesus89 closed this as completed Mar 1, 2017
@ivankravets
Copy link
Member

@Jesus89 Thanks a lot for your contribution! Can I release 1.2.0 or you have other changes?

@Jesus89
Copy link
Collaborator

Jesus89 commented Mar 1, 2017

I am doing more changes. Btw, I have included windows_x86 and windows_amd64 packages in each toolchain (icestorm, iverilog) but AppVeyor looks for windows package. Do I need to fix the manifest.json?

@Jesus89
Copy link
Collaborator

Jesus89 commented Mar 1, 2017

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

3 participants