tinyfpga / TinyFPGA-Bootloader

An open source USB bootloader for FPGAs
Apache License 2.0
352 stars 94 forks source link

Bootloader metadada issue #68

Closed myval closed 3 years ago

myval commented 3 years ago

Hi, I have isse with tinyprog to send the metadata back. I try tinyprig -m with my TinyFPGA BX board it returns meta no problem. I have created my own board with UP5K everything looks fine it connects tiny prog finds it but when I do tinyprog -m I get this:

Traceback (most recent call last):
  File "c:\users\xmexj\appdata\local\programs\python\python36\lib\runpy.py", line 193, in _run_module_as_main
    "__main__", mod_spec)
  File "c:\users\xmexj\appdata\local\programs\python\python36\lib\runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "C:\Users\xmexj\AppData\Local\Programs\Python\Python36\Scripts\tinyprog.exe\__main__.py", line 7, in <module>
  File "c:\users\xmexj\appdata\local\programs\python\python36\lib\site-packages\tinyprog\__main__.py", line 308, in main
    m["port"] = str(port)
TypeError: 'NoneType' object does not support item assignment

there is metadata in secure page 1 nad two of the SPI flash. I have created my own meta and it did not work so I thought I was doing something silly and coppied page 1 and 2 from my BX board (copy and paste from one spiflash to another, same SPIflash model.

Can somene save me and give me some pointer what I have done wrong?

oh one observation the LED on BX flashes way faster about 130Hz as in PWM is 130Hz and on my board its about half.

running 16MHz osc I have checked internal 12MHz and 48MHz all spot on, so it is definitely different version.

The meta in BX returns bootloader V 1.0.1 and one in my board is downloaded from git this week.

I would appreciate any help Thanks Jose

myval commented 3 years ago

Right I am officially going insane. I have connected logic analyzer and the scope on the board and everything just started to work. Any suggestions please? I am bloody loosing it I think. Anyway two new problems emerged the programming via tinyprog keeps failing randomly like it runs have to run it few times to program it.

But the main problem is can any of you FPGA masterminds tell me how to figure out where to load the user image? well where to put it is kind of obvious that is in bootmeta.json but how do I force warmboot to actually go there?

Hopefully this is the last issue to solve.

myval commented 3 years ago

I am shining with briliance today I have figured out that last puzzle, don't you worry about me got it all A1+ running and loading. funny how I talk to my self here is this place dead?