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

tinyprog no metadata issue uploading #72

Open
Blackninja543 opened this issue Aug 26, 2023 · 3 comments
Open

tinyprog no metadata issue uploading #72

Blackninja543 opened this issue Aug 26, 2023 · 3 comments

Comments

@Blackninja543
Copy link

When I attempt to upload the TinyFPGA/Blink example using apio upload, I receive the error

(DEBUG) Profile path: <REDACTED>/.apio/profile.json
(DEBUG) Home_dir: <REDACTED>/.apio
(DEBUG) Profile path: <REDACTED>/.apio/profile.json
(DEBUG) Home_dir: <REDACTED>/.apio
(DEBUG) Run Command: lsusb
(DEBUG) System_base_dir: <REDACTED>/.apio/packages/tools-oss-cad-suite
(DEBUG) System bin dir: <REDACTED>/.apio/packages/tools-oss-cad-suite/bin
(DEBUG) Executable file: <REDACTED>/.apio/packages/tools-oss-cad-suite/bin/lsusb
Expecting value: line 1 column 1 (char 0)
Error: board TinyFPGA-BX not connected

After doing some digging it appears the tinyprog script is failing in the _read_metadata call in some way.

When I perform a tinyprog -m I get the following output (I added some debug information)

DEBUG: __init__.py:_read_metadata():171:meta_roots [None, None, None, None, None, None, None, None, None, None, None]
DEBUG __main__.py:main():255:p <tinyprog.TinyProg object at 0x7fc35bc1e850>
DEBUG __main__.py:main():255:p.meta <tinyprog.TinyMeta object at 0x7fc35c19cdd0>
DEBUG __main__.py:main():255:p.meta.root None
Traceback (most recent call last):
  File "<REDACTED>/tmp/bin/tinyprog", line 8, in <module>
    sys.exit(main())
             ^^^^^^
  File "<REDACTED>/tmp/lib/python3.11/site-packages/tinyprog/__main__.py", line 260, in main
    m["port"] = str(port)
    ~^^^^^^^^
TypeError: 'NoneType' object does not support item assignment

tinyprog -l can locate my tinyfpga-bx board, however is does indicate there is no metadata.

TinyProg CLI
------------
Using device id 1d50:6130
Only one board with active bootloader, using it.
Boards with active bootloaders:

    /dev/ttyACM0: No metadata

I have also attempted this as the root user and received the same behavior.

@Blackninja543
Copy link
Author

There appears to be a problem with the batch of TinyFPGA-BXs produced July 2023. The some of the boards appears to have the bootload but no metadata. The result is an error when attempting to upload a new program.

tinyfpga/TinyFPGA-BX#37

@Blackninja543
Copy link
Author

I am reopening this bug to gain more visability as there has been no response from @tinyfpga on how to resolve this issue.

@aacuevas
Copy link

This issue seems to stem from a change on the memory part from the AT25SF081 to the AT25SF081B which is 99% the same except the address bits for security pages are shifted 4 bits. Unfortunately, the Device ID of both parts is the same, preventing any type of automated detection.

After receiving a bunch of those on the company I work for, I have managed to program these units with some hacks to tinyprog. Detailed info in tinyfpga/TinyFPGA-BX#37 (comment)

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

2 participants