Proxmark3 community

Research, development and trades concerning the powerful Proxmark3 device.

Remember; sharing is caring. Bring something back to the community.


"Learn the tools of the trade the hard way." +Fravia

You are not logged in.

Announcement

Time changes and with it the technology
Proxmark3 @ discord

Users of this forum, please be aware that information stored on this site is not private.

#1 2009-12-15 02:43:38

bushing
Contributor
Registered: 2008-10-14
Posts: 42

MinGW vs MS cl

Does anyone have any particular emotional attachment to using the MS C Compiler for the Windows client instead of MinGW (assuming we can get that to work)?  Not having proper C99 support really makes things annoying when trying to reuse code between platforms.

Offline

#2 2009-12-18 11:00:11

bushing
Contributor
Registered: 2008-10-14
Posts: 42

Re: MinGW vs MS cl

Seeing that nobody seems to feel particularly strongly about the matter, I'm going to start merging the two clients in SVN and switch to using MinGW.  This will *break* the current build system for Windows, but the resulting code is cleaner and MinGW is really easy to install... I don't see much of a downside.

However, if anyone objects, please speak up!

Offline

#3 2009-12-18 13:47:51

rule
Member
Registered: 2008-05-21
Posts: 417

Re: MinGW vs MS cl

Hey Bushing,

Very nice work you have done here! Currently the end-of-the-year holidays are absorbing my time, it may apply for others as well wink Particularly I don't think that anybody minds about breaking with the (commandline M$ cl.exe compiler).
When I have time I will try to look into the new environment and test it where I can.

Thanks again, cheers,

  Roel

Offline

#4 2009-12-22 14:11:38

bushing
Contributor
Registered: 2008-10-14
Posts: 42

Re: MinGW vs MS cl

Well, I wanted to do it gradually, but I couldn't make the thing compile without performing all of the commits, so ... it's all there.

To compile for Windows:
* Download and run the "Automated MinGW Installer" from http://sourceforge.net/projects/mingw/files/ (I used MinGW-5.1.6.exe)
* Install to c:\MinGW (or change paths in the makefiles)
* From client/, run c:\mingw\bin\mingw32-make.exe

Offline

#5 2010-01-28 18:07:15

cbergonzi
Member
Registered: 2009-12-11
Posts: 3

Re: MinGW vs MS cl

Hey Bushing, great job.
Can you update also the changes.txt files in the doc folder? You can add the last post to it. It would be nice.
Thanx

Offline

#6 2010-01-29 10:09:34

XEROEFFECT
Contributor
From: Sydney Australia
Registered: 2009-07-20
Posts: 132

Re: MinGW vs MS cl

Hi Guys,

I need help understanding what bushing has done here. Are the compiling source code instructions on the Wiki still valid for windows users? Do I still need to use Subcommander to get updates for source code? Are the procedures setout in the Wiki still the same? I just don't get whats happening here.

Please help.

Offline

#7 2010-01-29 12:49:07

cbergonzi
Member
Registered: 2009-12-11
Posts: 3

Re: MinGW vs MS cl

Just one question, why the old winsrc folder disappeared? It would be better to keep it for a while.
I have some problem with the new gui.
Example:

> tune
   #db# Measuring antenna characteristics, please wait.
   unrecognized command 00000401

while with the old gui, everything goes nicely

similar problem with the command
prox os <osimage>

I think it has something to do with the ethernal cr/lf unix/dos difference, but it is just a feeling.

Last edited by cbergonzi (2010-01-29 12:50:38)

Offline

#8 2010-01-29 14:56:43

adam@algroup.co.uk
Contributor
From: UK
Registered: 2009-05-01
Posts: 203
Website

Re: MinGW vs MS cl

I had a similar problem recently - it's because your client and firmware are out of sync. Make sure you've flashed everything with the ELF versions, not the S19. Get rid of the old winsrc and linux clients and only use the one in the client directory.

Simplest way to make sure you've got a clean setup is to check out a new copy of the repo...

Offline

#9 2010-02-04 17:22:51

cbergonzi
Member
Registered: 2009-12-11
Posts: 3

Re: MinGW vs MS cl

Ok, I will try from a clean start.
An update of procedures in the manual or somewhere in a txt file in the release would help me and other people like me just starting.  XEROEFFECT seems to have similar issues.

Offline

#10 2010-02-05 02:58:46

XEROEFFECT
Contributor
From: Sydney Australia
Registered: 2009-07-20
Posts: 132

Re: MinGW vs MS cl

I also need help understanding. I don't mean to brag like a bitch all night but it's annoying trying to keep up with you guys. To me an ELF is santas little helper. How does that simplify things for the benefit of the user? cbergonzi, You would be doing a great honour for dummies like me if you could please post the process you took- from compile to flash so I could follow your steps.

Thank you.

Offline

#11 2010-02-05 12:08:36

iZsh
Contributor
Registered: 2010-01-02
Posts: 95

Re: MinGW vs MS cl

You might want to wait a few day for the windows version because at the moment the client won't compile. We are currently restructuring the whole code... Or alternatively you could checkout the r317 version. Which is the version just before my changes.

Offline

#12 2010-02-19 19:17:07

Omikron
Contributor
Registered: 2010-02-12
Posts: 78

Re: MinGW vs MS cl

So is the current development environment as of 02/19/2010 compiling in Windows?  I've been fiddling with it all day and still coming up with errors following the instructions on the wiki.

Once I install MiniGW, what changes do I need to make to sources from the repository in order to get everything compiled?

Offline

#13 2010-02-19 19:39:18

Omikron
Contributor
Registered: 2010-02-12
Posts: 78

Re: MinGW vs MS cl

Looks like I've made some headway.  I ended up using the binaries in devkitWIN to compile the armsrc and bootrom, and MiniGW to compile the client.

I did have to end up altering the 0setpath.bat file to include the additional paths, since it only seems to include the path for devkitARM for some reason.

Are there any other deviations from the current wiki that I should be aware of?

Offline

#14 2010-02-19 21:29:31

iZsh
Contributor
Registered: 2010-01-02
Posts: 95

Re: MinGW vs MS cl

No, the current revision does not compile under windows yet, but r317 should (which is from 01/29/2010) as far as I know.

Offline

#15 2010-02-19 21:44:55

Omikron
Contributor
Registered: 2010-02-12
Posts: 78

Re: MinGW vs MS cl

If it *appears* to compile and does indeed produce the relevant .s19 files, should I assume that it was successful?

Offline

#16 2010-02-19 21:55:32

iZsh
Contributor
Registered: 2010-01-02
Posts: 95

Re: MinGW vs MS cl

which revision? r317?

Offline

#17 2010-02-19 22:06:25

d18c7db
Contributor
Registered: 2008-08-19
Posts: 292

Re: MinGW vs MS cl

As you've already noticed, you have to use two different compilers to compile the code tree. This is because you're compiling for two different platforms, the code under armsrc and bootrom runs on the ARM and need a cross compiler, ie a compiler that runs on one platform (PC) but produces executable code for another (ARM).

The client directory needs a compiler that produces code for the PC only, though it it currently aimed at compiling on PCs running different OSs (Windows, Linux, Mac).

If you made clean beforehand so the obj directories under bootrom and armsrc are empty then you see see .elf and .s19 files in these subdirs and no errors during compile then yes, you can assume it compiled correctly.

Similarly, if you delete prox.exe in the client directory then compile and you get a new prox.exe with no compile errors, chances are it worked.

Offline

#18 2010-02-19 22:22:53

Omikron
Contributor
Registered: 2010-02-12
Posts: 78

Re: MinGW vs MS cl

Thanks for the detailed info.

I was able to after some minor edits get the current SVN version to compile under Windows, so I'm happy about that.

Now I just have to figure out how to merge the files and flash using the SAM-ICE device I have.

Offline

#19 2010-02-20 00:18:12

Omikron
Contributor
Registered: 2010-02-12
Posts: 78

Re: MinGW vs MS cl

Hmm...I guess even though .s19 files were produced, they may be bad.  I'm getting "Bad file format." errors when attempting to flash.

Offline

#20 2010-02-20 00:22:59

iZsh
Contributor
Registered: 2010-01-02
Posts: 95

Re: MinGW vs MS cl

you have to use the .elf file now. s19 files are not used anymore.

Offline

#21 2010-02-20 00:29:25

Omikron
Contributor
Registered: 2010-02-12
Posts: 78

Re: MinGW vs MS cl

iZsh wrote:

you have to use the .elf file now. s19 files are not used anymore.

THANK YOU!  I would not have found that on my own for quite some time because I keep referencing the Google Code Wiki, which as I've learned today, is EXCEEDINGLY out of date.

I was able to successfully flash the fpgaimage.elf file but get the following error when flashing osimage.elf:

C:\prox-dev\proxmark\client>prox os ../armsrc/obj/osimage.elf
Flashing os from ../armsrc/obj/osimage.elf
count=3 phoff=34
type=1 offset=0 paddr=100000 vaddr=108000 filesize=1df7e memsize=1df7e flags=7 a
lign=8000
flashing offset=0 paddr=100000 size=1df7e
skipping forward 0x2000 because of strange linker thing
WriteBlock(102000, 256, 00 00 00 00 00 00 00 00 ... 00 00 00 00 00 00 00 00)
bad ACK

Thoughts?

Offline

Board footer

Powered by FluxBB