Re: openFPGAloader successfully built, but can't flash with ftdi error

2023-10-11 Thread Theo de Raadt
Gregory Edigarov  wrote:

> On Fri, 6 Oct 2023 10:06:15 - (UTC)
> Stuart Henderson  wrote:
> 
> > On 2023-10-06, S V  wrote:
> > >> The software that you're using may need the USB device to be
> > >> attached to ugen rather than uftdi. The simplest way to do this is
> > >> probably to type "boot -c" at the boot loader, "disable uftdi",
> > >> "quit".  
> > >
> > >
> > > Thanks!!! It works!!!  
> > 
> > good, thanks for confirming.
> > 
> > > Last "barrier" in front of openhardware
> > >
> > > more or less falls! :D :D :D  
> > 
> > btw, see bsd.re-config(5) if you want this regularly (but then, you
> > won't be able to connect to a uftdi device as a normal serial port
> > with cu).
> > 
> 
> Just a small bit of side note, perhaps somebody with knowledge of usb
> stack will find it interesting enough to implement.
> I think we need a way to detach a specific usb driver from device on the
> fly, leaving it attached as ugen.
> That "disable [whatever]" way is a problem itself because it is
> possible that there also is a real device that needs to be attached. 

That seems like what you want, but please consider.

Now that you've done that, who is opening that 'raw usb device'?

Or is the regular user?

Who fully audited the USB stack for this use case, to make sure there
are no bugs which can result in escalation or misbehaviour?  What happens
if a usb device is played with directly, while there is a kernel driver
which assumes it has control over it?  What kinds of racy bugs lurk in that
area? We really have no interlock design allowing such sharing.

I can give you the anwers to these questions.  Noone did that audit.
That is why we have been avoiding going down your chosen roadmanp.

When you say "I think we need", you can easily read it as "I think I want"
and it means someone must do the not-small job.



Re: openFPGAloader successfully built, but can't flash with ftdi error

2023-10-11 Thread Gregory Edigarov
On Fri, 6 Oct 2023 10:06:15 - (UTC)
Stuart Henderson  wrote:

> On 2023-10-06, S V  wrote:
> >> The software that you're using may need the USB device to be
> >> attached to ugen rather than uftdi. The simplest way to do this is
> >> probably to type "boot -c" at the boot loader, "disable uftdi",
> >> "quit".  
> >
> >
> > Thanks!!! It works!!!  
> 
> good, thanks for confirming.
> 
> > Last "barrier" in front of openhardware
> >
> > more or less falls! :D :D :D  
> 
> btw, see bsd.re-config(5) if you want this regularly (but then, you
> won't be able to connect to a uftdi device as a normal serial port
> with cu).
> 

Just a small bit of side note, perhaps somebody with knowledge of usb
stack will find it interesting enough to implement.
I think we need a way to detach a specific usb driver from device on the
fly, leaving it attached as ugen.
That "disable [whatever]" way is a problem itself because it is
possible that there also is a real device that needs to be attached. 
--
With best regards,
 Gregory Edigarov



Re: openFPGAloader successfully built, but can't flash with ftdi error

2023-10-06 Thread Stuart Henderson
On 2023-10-06, S V  wrote:
>> The software that you're using may need the USB device to be attached to
>> ugen rather than uftdi. The simplest way to do this is probably to type
>> "boot -c" at the boot loader, "disable uftdi", "quit".
>
>
> Thanks!!! It works!!!

good, thanks for confirming.

> Last "barrier" in front of openhardware
>
> more or less falls! :D :D :D

btw, see bsd.re-config(5) if you want this regularly (but then, you
won't be able to connect to a uftdi device as a normal serial port with
cu).



Re: openFPGAloader successfully built, but can't flash with ftdi error

2023-10-06 Thread S V
> The software that you're using may need the USB device to be attached to
> ugen rather than uftdi. The simplest way to do this is probably to type
> "boot -c" at the boot loader, "disable uftdi", "quit".


Thanks!!! It works!!!

Last "barrier" in front of openhardware

more or less falls! :D :D :D




пт, 6 окт. 2023 г., 03:01 S V :

> Good Day, List!
>
> This mail is call for help, advice and to stir interest.
>
> While playing with open source workflow for FPGA chips
> I found with pleasure that not only GoWin FPGAs supported by open
> source tools, but also all needed tools easily built on OpenBSD
> (working on ports now). yosys, project apycula, nextpnr-gowin,
> openFPGAloader all successfully build.
>
> But I can't flash "compiled" bitstream to hardware device with
> openFPGAloader.
>
> Here is description of problem:
>
> After building software and attaching HW I can successfully scan usb
>
> found 10 USB device
> Bus device vid:pid probe type manufacturer serial product
> 000 001 0x:0x xvc-client Generic none xHCI root hub
> 001 001 0x:0x xvc-client Generic none xHCI root hub
> 001 005 0x0403:0x6010 FTDI2232 SIPEED FactoryAIOT Pro JTAG Debugger
>
> but cant detect or flash bitstream with next error
>
> doas openFPGALoader -b tangnano9k pack.fs --verbose-level=3
> try to open 403 6010 0 0
> iProduct : JTAG Debugger
> 8
> b
> 8
> b
> fail to read data usb bulk read failed
> JTAG init failed with: low level FTDI init failed
>
>
> here dmesg
>
> uftdi0 at uhub3 port 3 configuration 1 interface 0 "SIPEED JTAG
> Debugger" rev 2.00/5.00 addr 5 ucom0 at uftdi0 portno 1
> uftdi1 at uhub3 port 3 configuration 1 interface 1 "SIPEED JTAG
> Debugger" rev 2.00/5.00 addr 5 ucom1 at uftdi1 portno 2
>
> and also usbdevs outputs
>
> addr 05: 0403:6010 SIPEED, JTAG Debugger
> full speed, power 90 mA, config 1, rev 5.00, iSerial FactoryAIOT Pro
> driver: uftdi0
> driver: uftdi1
>
>
> I also posted issue to original github
> https://github.com/trabucayre/openFPGALoader/issues/382
>
> Any tips and tricks on how to debug it? Any interest in helping?
>
> --
> Nerfur Dragon
> -==(UDIC)==-
>


Re: openFPGAloader successfully built, but can't flash with ftdi error

2023-10-06 Thread Stuart Henderson
On 2023-10-06, S V  wrote:
> Here is description of problem:
>
> After building software and attaching HW I can successfully scan usb
>
> found 10 USB device
> Bus device vid:pid probe type manufacturer serial product
> 000 001 0x:0x xvc-client Generic none xHCI root hub
> 001 001 0x:0x xvc-client Generic none xHCI root hub
> 001 005 0x0403:0x6010 FTDI2232 SIPEED FactoryAIOT Pro JTAG Debugger
>
> but cant detect or flash bitstream with next error
>
> doas openFPGALoader -b tangnano9k pack.fs --verbose-level=3
> try to open 403 6010 0 0
> iProduct : JTAG Debugger
> 8
> b
> 8
> b
> fail to read data usb bulk read failed
> JTAG init failed with: low level FTDI init failed
>
>
> here dmesg
>
> uftdi0 at uhub3 port 3 configuration 1 interface 0 "SIPEED JTAG
> Debugger" rev 2.00/5.00 addr 5 ucom0 at uftdi0 portno 1
> uftdi1 at uhub3 port 3 configuration 1 interface 1 "SIPEED JTAG
> Debugger" rev 2.00/5.00 addr 5 ucom1 at uftdi1 portno 2
>
> and also usbdevs outputs
>
> addr 05: 0403:6010 SIPEED, JTAG Debugger
> full speed, power 90 mA, config 1, rev 5.00, iSerial FactoryAIOT Pro
> driver: uftdi0
> driver: uftdi1

The software that you're using may need the USB device to be attached to
ugen rather than uftdi. The simplest way to do this is probably to type
"boot -c" at the boot loader, "disable uftdi", "quit".




Re: openFPGAloader successfully built, but can't flash with ftdi error

2023-10-06 Thread S V
Strangely enough I can see your message on MARC, but not in mailbox
I'm using Sipeed TangNano 9k

> This subject interests me a lot. Can you tell us which model of FPGA
> have you bought / are you using?



пт, 6 окт. 2023 г. в 03:01, S V :
>
> Good Day, List!
>
> This mail is call for help, advice and to stir interest.
>
> While playing with open source workflow for FPGA chips
> I found with pleasure that not only GoWin FPGAs supported by open
> source tools, but also all needed tools easily built on OpenBSD
> (working on ports now). yosys, project apycula, nextpnr-gowin,
> openFPGAloader all successfully build.
>
> But I can't flash "compiled" bitstream to hardware device with
> openFPGAloader.
>
> Here is description of problem:
>
> After building software and attaching HW I can successfully scan usb
>
> found 10 USB device
> Bus device vid:pid probe type manufacturer serial product
> 000 001 0x:0x xvc-client Generic none xHCI root hub
> 001 001 0x:0x xvc-client Generic none xHCI root hub
> 001 005 0x0403:0x6010 FTDI2232 SIPEED FactoryAIOT Pro JTAG Debugger
>
> but cant detect or flash bitstream with next error
>
> doas openFPGALoader -b tangnano9k pack.fs --verbose-level=3
> try to open 403 6010 0 0
> iProduct : JTAG Debugger
> 8
> b
> 8
> b
> fail to read data usb bulk read failed
> JTAG init failed with: low level FTDI init failed
>
>
> here dmesg
>
> uftdi0 at uhub3 port 3 configuration 1 interface 0 "SIPEED JTAG
> Debugger" rev 2.00/5.00 addr 5 ucom0 at uftdi0 portno 1
> uftdi1 at uhub3 port 3 configuration 1 interface 1 "SIPEED JTAG
> Debugger" rev 2.00/5.00 addr 5 ucom1 at uftdi1 portno 2
>
> and also usbdevs outputs
>
> addr 05: 0403:6010 SIPEED, JTAG Debugger
> full speed, power 90 mA, config 1, rev 5.00, iSerial FactoryAIOT Pro
> driver: uftdi0
> driver: uftdi1
>
>
> I also posted issue to original github
> https://github.com/trabucayre/openFPGALoader/issues/382
>
> Any tips and tricks on how to debug it? Any interest in helping?
>
> --
> Nerfur Dragon
> -==(UDIC)==-



-- 
Nerfur Dragon
-==(UDIC)==-



Re: openFPGAloader successfully built, but can't flash with ftdi error

2023-10-05 Thread misc
This subject interests me a lot. Can you tell us which model of FPGA 
have you bought / are you using?


On 10/5/23 21:01, S V wrote:

Good Day, List!

This mail is call for help, advice and to stir interest.

While playing with open source workflow for FPGA chips
I found with pleasure that not only GoWin FPGAs supported by open
source tools, but also all needed tools easily built on OpenBSD
(working on ports now). yosys, project apycula, nextpnr-gowin,
openFPGAloader all successfully build.

But I can't flash "compiled" bitstream to hardware device with
openFPGAloader.

Here is description of problem:

After building software and attaching HW I can successfully scan usb

found 10 USB device
Bus device vid:pid probe type manufacturer serial product
000 001 0x:0x xvc-client Generic none xHCI root hub
001 001 0x:0x xvc-client Generic none xHCI root hub
001 005 0x0403:0x6010 FTDI2232 SIPEED FactoryAIOT Pro JTAG Debugger

but cant detect or flash bitstream with next error

doas openFPGALoader -b tangnano9k pack.fs --verbose-level=3
try to open 403 6010 0 0
iProduct : JTAG Debugger
8
b
8
b
fail to read data usb bulk read failed
JTAG init failed with: low level FTDI init failed


here dmesg

 uftdi0 at uhub3 port 3 configuration 1 interface 0 "SIPEED JTAG
Debugger" rev 2.00/5.00 addr 5 ucom0 at uftdi0 portno 1
 uftdi1 at uhub3 port 3 configuration 1 interface 1 "SIPEED JTAG
Debugger" rev 2.00/5.00 addr 5 ucom1 at uftdi1 portno 2

and also usbdevs outputs

 addr 05: 0403:6010 SIPEED, JTAG Debugger
 full speed, power 90 mA, config 1, rev 5.00, iSerial FactoryAIOT Pro
 driver: uftdi0
 driver: uftdi1


I also posted issue to original github
https://github.com/trabucayre/openFPGALoader/issues/382

Any tips and tricks on how to debug it? Any interest in helping?





openFPGAloader successfully built, but can't flash with ftdi error

2023-10-05 Thread S V
Good Day, List!

This mail is call for help, advice and to stir interest.

While playing with open source workflow for FPGA chips
I found with pleasure that not only GoWin FPGAs supported by open
source tools, but also all needed tools easily built on OpenBSD
(working on ports now). yosys, project apycula, nextpnr-gowin,
openFPGAloader all successfully build.

But I can't flash "compiled" bitstream to hardware device with
openFPGAloader.

Here is description of problem:

After building software and attaching HW I can successfully scan usb

found 10 USB device
Bus device vid:pid probe type manufacturer serial product
000 001 0x:0x xvc-client Generic none xHCI root hub
001 001 0x:0x xvc-client Generic none xHCI root hub
001 005 0x0403:0x6010 FTDI2232 SIPEED FactoryAIOT Pro JTAG Debugger

but cant detect or flash bitstream with next error

doas openFPGALoader -b tangnano9k pack.fs --verbose-level=3
try to open 403 6010 0 0
iProduct : JTAG Debugger
8
b
8
b
fail to read data usb bulk read failed
JTAG init failed with: low level FTDI init failed


here dmesg

uftdi0 at uhub3 port 3 configuration 1 interface 0 "SIPEED JTAG
Debugger" rev 2.00/5.00 addr 5 ucom0 at uftdi0 portno 1
uftdi1 at uhub3 port 3 configuration 1 interface 1 "SIPEED JTAG
Debugger" rev 2.00/5.00 addr 5 ucom1 at uftdi1 portno 2

and also usbdevs outputs

addr 05: 0403:6010 SIPEED, JTAG Debugger
full speed, power 90 mA, config 1, rev 5.00, iSerial FactoryAIOT Pro
driver: uftdi0
driver: uftdi1


I also posted issue to original github
https://github.com/trabucayre/openFPGALoader/issues/382

Any tips and tricks on how to debug it? Any interest in helping?

-- 
Nerfur Dragon
-==(UDIC)==-