[Open_electroporator] culture shock build automation script

Nathan McCorkle nmz787 at gmail.com
Sat May 5 08:06:44 UTC 2018


On Fri, May 4, 2018 at 7:41 AM, John Griessen <john at industromatic.com>
wrote:

> On 05/04/2018 05:03 AM, Nathan McCorkle wrote:
>
>>
>> (I made --frozen an option, but it seems you require it.. so either I
>> will change it so frozen is default... or you can change the other place
>> (your pyflex repo I guess) so it's optional)
>>
>
> No, that was just for debugging from scratch when assembly is broken.
>

Well I played around with the Python script some more, edited your Bash
script (didn't see it before, only saw the commented out bash code you had
in the Python file, which I assumed was unworking or copy-pasted from some
online Bash example... I didn't really pay attention to it) but now the
Python script and Bash script leave me with the same error:


------------------------------------------------------------
------------------------------------------------------------
------------------------------------------------------------------------
------------------------------------------------
GEN build-PYFLEX_F401/frozen_mpy.c
python ../../tools/mpy-tool.py -f -q
build-PYFLEX_F401/genhdr/qstrdefs.preprocessed.h
> build-PYFLEX_F401/frozen_mpy.c
usage: mpy-tool.py [-h] [-d] [-f] [-q QSTR_HEADER]
                   [-mlongint-impl {none,longlong,mpz}] [-mmpz-dig-size N]
                   files [files ...]
mpy-tool.py: error: too few arguments
../../py/mkrules.mk:118: recipe for target 'build-PYFLEX_F401/frozen_mpy.c'
failed
make: *** [build-PYFLEX_F401/frozen_mpy.c] Error 2
make: *** Deleting file 'build-PYFLEX_F401/frozen_mpy.c'
make: *** Waiting for unfinished jobs....
Build failure
------------------------------------------------------------
------------------------------------------------------------
------------------------------------------------------------------------
------------------------------------------------

But when I follow the wiki-page instructions (with minor fixes for typos in
that doc), I get this error:

------------------------------------------------------------
------------------------------------------------------------
------------------------------------------------------------------------
------------------------------------------------
LINK build-PYFLEX_F401/firmware.elf
build-PYFLEX_F401/py/builtinhelp.o: In function `mp_builtin_help':
builtinhelp.c:(.text.mp_builtin_help+0x168): undefined reference to
`mp_frozen_str_names'
build-PYFLEX_F401/py/frozenmod.o: In function `mp_find_frozen_str':
frozenmod.c:(.text.mp_find_frozen_str+0x58): undefined reference to
`mp_frozen_str_names'
frozenmod.c:(.text.mp_find_frozen_str+0x5c): undefined reference to
`mp_frozen_str_content'
frozenmod.c:(.text.mp_find_frozen_str+0x60): undefined reference to
`mp_frozen_str_sizes'
build-PYFLEX_F401/py/frozenmod.o: In function `mp_frozen_stat':
frozenmod.c:(.text.mp_frozen_stat+0x1c): undefined reference to
`mp_frozen_str_names'
Makefile:440: recipe for target 'build-PYFLEX_F401/firmware.elf' failed
make: *** [build-PYFLEX_F401/firmware.elf] Error 1
------------------------------------------------------------
------------------------------------------------------------
------------------------------------------------------------------------
------------------------------------------------


So again things are pointing to that 'frozen' stuff...


OK after some more playing around, it seems as you implied the 'frozen'
stuff isn't needed, and I can omit that from the 'make' command.

After some more tweaking, the make PY script is working for me.

>From culture_shock root dir, I can just run this:
python code_PYFLEX_F401/make_PYFLEX_F401.py

and PYFLEX will build, and attempt to flash, then error at the DFU not
found stage:

nathan at nathan-lenovo:~/Projects/github/culture_shock$ python
code_PYFLEX_F401/make_PYFLEX_F401.py

... compilation output....
!!!!!!!!!!!!! compiled MicroPython for Culture_Shock !!!!!!!!!!!!!
!!!!!!!!!!!!! now attempting to flash !!!!!!!!!!!!!
Use make V=1 or set BUILD_VERBOSE in your environment to increase build
verbosity.
Writing build-PYFLEX_F401/firmware.dfu to the board
Traceback (most recent call last):
  File "../../tools/pydfu.py", line 541, in <module>
    main()
  File "../../tools/pydfu.py", line 521, in main
    init()
  File "../../tools/pydfu.py", line 80, in init
    raise ValueError('No DFU device found')
ValueError: No DFU device found
Makefile:391: recipe for target 'deploy' failed
make: *** [deploy] Error 1


Code has been committed and pushed to my repo. I didn't update with your
latest changes, let's talk about what you are thinking and what you're
after.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://cibolo.us/pipermail/open_electroporator/attachments/20180505/f520e82c/attachment-0001.html>


More information about the open_electroporator mailing list