[Open_electroporator] culture shock build automation script

John Griessen john at cibolo.com
Sat May 5 04:16:12 UTC 2018


I tested make_PYFLEX_F401.py some.

I found it has option for doing G30TH.  I was thinking of having a separate file for that
in another dir, since often the code directory has files of the same name, boot.py, main.py, so being contained in a dir with  a
name like
code_PYFLEX_F401
or
code_G30TH
has utility.

Maybe we could turn this into a script called make-upy.py, short and easy to remember and use it from one ~/bin directory,
or /usr/local/bin/make-upy.py.  Otherwise the way I was using bash scripts is to have one in each code dir, with a few definitions
in the top lines to make it unique for a target board.

I'd like to have the target board defined by the dir it is called from.  Is there a way to grab that from
a file?  A file called BOARD.TXT?  Containing PYFLEX_F401 for the case of being in /culture_shock/code_PYFLEX_F401/BOARD.TXT?

Then you would call it without a --board xxx123 argument, and it would create a build dir called
../../micropython/ports/stm32/build-PYFLEX_F401

Call it with argument, --clean, and it erases ../../micropython/ports/stm32/build-PYFLEX_F401 and exits.

As of now, after --clean it asks for input.   That's a little mistake.

I pushed a version with ../../micropython as the relative location for micropython.  That assumes you start in
a dir like
/culture_shock/code_PYFLEX_F401
or
/culture_shock/code_G30TH.

I changed the top line of the below:

micropython_dirname = "micropython"
g30th_board_dirname = os.path.split(dhylands_g30th_board_url)[-1].split('.')[0]
pyflex_board_dirname = os.path.split(pyflex_board_url)[-1].split('.')[0]

to stop circular definition problem.  I don't think the board names need to come from a repo as it may change in
the future either.  These could just be string variables.

When I gave it the --board PYFLEX_F401 arguments, it was creating a build-PYB-V10 build dir...

I'm going ahead using the old bash script for now to get some hardware testing done.

Thanks in advance Nathan, if you have time to add more to this, and thanks for this error checking, data input asking script --
it will be good when its ready.


More information about the open_electroporator mailing list