UMDK and windows?

36 views
Skip to first unread message

Nicolas Hamel

unread,
Jul 7, 2017, 6:54:06 AM7/7/17
to UMDKv2 Developers
Hello,

I've finally put my hand on an UMDK (thanks Matt!) and the situation about windows is not super clear to me.

Is it possible to use the UMDK on windows or for now it's only linux? I've installed the makestuff cross compiler setup , was able to follow the step in the readme but after that, not sure what to  do.

Thanks!
Nic

Chris McClelland

unread,
Jul 7, 2017, 2:37:31 PM7/7/17
to umdkv...@googlegroups.com
> was able to follow the step in the readme
>
Which readme are you referring to?

Currently, whilst it's possible to use UMDK on Windows, it only supports a basic command-line GDB (DDD, the frontend suggested in the Wiki, is not available for Windows), although a couple of years ago I did get GDB working in slightly-friendlier mode within an Emacs host[1]. Apparently Visual Studio has support for remote-debugging with GDB now, so that would be a good solution.

TBH whilst several people have expressed an interest in using UMDK on Windows, I think it really needs someone who is prepared to own the Windows build, and support Windows users, and bring it up to the same level of support that Linux enjoys. Unfortunately nobody has volunteered for this. I can't realistically do it because I lack the military-grade patience required by people who develop on Windows. If you're prepared to be that person then of course I can help get you up and running.

Chris

--
You received this message because you are subscribed to the Google Groups "UMDKv2 Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to umdkv2-dev+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

csmith

unread,
Jul 8, 2017, 3:48:46 AM7/8/17
to umdkv...@googlegroups.com



On 07/07/17 20:37, Chris McClelland wrote:
> was able to follow the step in the readme
>
Which readme are you referring to?

Currently, whilst it's possible to use UMDK on Windows, it only supports a basic command-line GDB (DDD, the frontend suggested in the Wiki, is not available for Windows), although a couple of years ago I did get GDB working in slightly-friendlier mode within an Emacs host[1]. Apparently Visual Studio has support for remote-debugging with GDB now, so that would be a good solution.
This is true : I am no expert on using VS but I had a need to use it for a project and it does have GDB support.  Also, one other option may be to see what Eclipse can do on Windows as I feel that may be a good option with Eclipse often including GNU tools under Windows.


TBH whilst several people have expressed an interest in using UMDK on Windows, I think it really needs someone who is prepared to own the Windows build, and support Windows users, and bring it up to the same level of support that Linux enjoys. Unfortunately nobody has volunteered for this. I can't realistically do it because I lack the military-grade patience required by people who develop on Windows. If you're prepared to be that person then of course I can help get you up and running.
DrM expressed some interest in the Windows build but we shall have to see if can commit to it.  But the more people that use UMDK the better the chances.

On 7 July 2017 at 11:54, Nicolas Hamel <gouk...@gmail.com> wrote:
Hello,

I've finally put my hand on an UMDK (thanks Matt!) and the situation about windows is not super clear to me.

Is it possible to use the UMDK on windows or for now it's only linux? I've installed the makestuff cross compiler setup , was able to follow the step in the readme but after that, not sure what to  do.

Thanks!
Nic
--
You received this message because you are subscribed to the Google Groups "UMDKv2 Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to umdkv2-dev+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "UMDKv2 Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to umdkv2-dev+...@googlegroups.com.
Message has been deleted

Nicolas Hamel

unread,
Jul 8, 2017, 6:25:40 AM7/8/17
to UMDKv2 Developers
I was referring to the one in the makestuff-windows-20140401.zip archive. Tried to run gdbbridge but w/o success so far,

Thanks for the link Chris! I don't really care about the frontend actually as I'm working on something so I would like to add the UMDK support in it. 


Cheers
To unsubscribe from this group and stop receiving emails from it, send an email to umdkv2-dev+...@googlegroups.com.

Chris McClelland

unread,
Jul 8, 2017, 10:50:55 AM7/8/17
to umdkv...@googlegroups.com
OK, try this sequence:

Get the build infra from here: http://tiny.cc/msbiw (it's a ~4MiB download).

If you get a "Join DropBox" pop-up, click "No thanks, continue to view" at the bottom.

Click "Download -> Direct Download"

Open zip-file

Copy "makestuff" to C:\

Run "C:\makestuff\setup.exe"

Select your C/C++ compiler (I just tried with Visual Studio 2015). You can choose between an x86 (i.e 32-bit) compiler and an x64 (i.e 64-bit) compiler.

Click "Create Shortcut". This will create a console icon on your desktop. Double-click it, and start entering the following commands:

cd $HOME
rm -rf libs/* apps/* common
cd apps
../scripts/msget.sh makestuff/flcli/dev
../scripts/msget.sh makestuff/gordon
cd flcli
make deps
cd ../gordon/usb
make deps
cd ../../..
scripts/msget.sh makestuff/hdlmake
cd hdlmake/apps
mkdir makestuff
cd makestuff/
../../../scripts/msget.sh makestuff/umdkv2
cd umdkv2/logread
make
cd ../hackdump
make
cd ../loader
make
cd ../gdb-bridge
make rel

Let me know you've done all of this without error. It should take only ten minutes or so, assuming you have a reasonably modern PC.

Chris


To unsubscribe from this group and stop receiving emails from it, send an email to umdkv2-dev+unsubscribe@googlegroups.com.

Nicolas Hamel

unread,
Jul 8, 2017, 12:04:51 PM7/8/17
to UMDKv2 Developers
Ok, done and everything went well but now when I connect the UMDK to the PC, windows cannot find the driver for it, device says FPGALink/FX2 20140311


Chris McClelland

unread,
Jul 8, 2017, 1:26:38 PM7/8/17
to umdkv...@googlegroups.com
Great, so in the console, type "zadig.sh". That will download the driver-generator and bring up a GUI that will allow you to select the FPGALink device and install a new WinUSB driver for it.

You should now be able to load a game over USB:

msvc.x64/rel/gdb-bridge -w sonic1.bin:0 -r

...and then get it to listen for GDB connections:

msvc.x64/rel/gdb-bridge-l 8000

Finally, you need GDB itself. Unless you particularly want to build it yourself, I suggest you just use the binary I built. In a different console window, do:

wget --no-check-certificate -qO /bin/gdb.exe  http://tiny.cc/umdk-gdb
wget --no-check-certificate -qO gdb.sh https://raw.githubusercontent.com/makestuff/umdkv2/3b51a4a/scripts/gdb.sh

The gdb.sh is a script that behaves a bit like the docs say ddd.sh behaves. So you should be able to connect to the listening gdb-bridge process like this, for example:

gdb.sh 8000

...which will hit the breakpoint and allow you to debug the running code. For example:

(gdb) x/8i $pc
=> 0xb10:    movem.l d0-fp, -(sp)
   0xb14:    tst.b 0xfffff62a
   0xb18:    beq.s 0xb88
   0xb1a:    move.w 0xc00004, d0
   0xb20:    move.l #1073741840, 0xc00004
   0xb2a:    move.l 0xfffff616, 0xc00000
   0xb32:    btst #6, 0xfffffff8
   0xb38:    beq.s 0xb42
(gdb)


Any problems, let me know.

Chris


On 8 July 2017 at 17:04, Nicolas Hamel <gouk...@gmail.com> wrote:
Ok, done and everything went well but now when I connect the UMDK to the PC, windows cannot find the driver for it, device says FPGALink/FX2 20140311


Chris McClelland

unread,
Jul 8, 2017, 1:28:23 PM7/8/17
to umdkv...@googlegroups.com
Ooops, missed a space; that should be: msvc.x64/rel/gdb-bridge -l 8000

Nicolas Hamel

unread,
Jul 8, 2017, 1:49:08 PM7/8/17
to UMDKv2 Developers
ok so everything went well, I can use the loader now (\o/) however i'm trying to break with gdb but i'm having troubles.

"x/8i $pc" on sonic doesn't seems to work, that give me "no registers".

I tried with a custom rom, set a break point but it never hit it, which is weird because the adress is valid for sure.

Any idea?
To unsubscribe from this group and stop receiving emails from it, send an email to umdkv2-dev+...@googlegroups.com.

Chris McClelland

unread,
Jul 8, 2017, 1:54:32 PM7/8/17
to umdkv...@googlegroups.com
That looks like the connection to the gdb-bridge was not established correctly. Did you see any errors in either console window? Is the gdb-bridge running OK? Did you use the same port number in both windows?

Also, there should be a log-file in /tmp/gdb.log

Chris


To unsubscribe from this group and stop receiving emails from it, send an email to umdkv2-dev+unsubscribe@googlegroups.com.

Nicolas Hamel

unread,
Jul 8, 2017, 2:02:48 PM7/8/17
to UMDKv2 Developers
hmm, everything seems fine.

Log from the first console:

Anarchy@Anarchy-PC$ ./gdb-bridge.exe -w sonic1.gen:0 -r
UMDKv2 Bridge Tool Copyright (C) 2014 Chris McClelland

Got 0x080000 bytes to load at 0x000000
Anarchy@Anarchy-PC$ ./gdb-bridge.exe -l 8000
UMDKv2 Bridge Tool Copyright (C) 2014 Chris McClelland

Waiting for GDB connection on :8000...
Got GDB connection from 127.0.0.1:43993

Log from the second:

Anarchy@Anarchy-PC$ ./gdb.sh 8000
GNU gdb (GDB) 7.7
Copyright (C) 2014 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "--host=i686-pc-mingw32 --target=m68k-elf".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
Find the GDB manual and other documentation resources online at:
For help, type "help".
Type "apropos word" to search for commands related to "word".
C:/Users/Anarchy/AppData/Local/Temp/gdb.cmd:3: Error in sourced command file:
/tmp/gdb.log: No such file or directory.
(gdb) x/8i $pc
No registers.
(gdb)

Chris McClelland

unread,
Jul 8, 2017, 3:12:30 PM7/8/17
to umdkv...@googlegroups.com
> hmm, everything seems fine.
> :
> C:/Users/Anarchy/AppData/Local/Temp/gdb.cmd:3: Error in sourced command file:
> /tmp/gdb.log: No such file or directory.
>
Be sure to actually read the messages you get on-screen. Some of them are important. In this case it's saying it cannot write to /tmp/gdb.log.

Try editing the gdb.sh script to say "set remotelogfile gdb.log" rather than "set remotelogfile /tmp/gdb.log". I'll fix it in the GitHub repo too. Make sure you use an editor that is smart enough to recognise Unix line-endings. Notepad, for example, will screw it up.

Chris


To unsubscribe from this group and stop receiving emails from it, send an email to umdkv2-dev+unsubscribe@googlegroups.com.

Nicolas Hamel

unread,
Jul 8, 2017, 3:28:21 PM7/8/17
to UMDKv2 Developers
ah ok my bad, edited and working fine now!

thanks for the help!
Reply all
Reply to author
Forward
0 new messages