Click here to Skip to main content
15,893,904 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Hello,

I have been using a windows based IDE with an arm toolchain but have recently migrated to linux. I have several large projects that I can not make a proper makefile for as they throw errors left right and center.

I wish to continue using the same arm compiler because arm and gnu asmbler syntax are different and some of my file are in asm.

Is their a way I can run an app that will monitor everything a program does so I can load my project in the IDE, hit rebuild and know the entire call sequence to the asm, gcc and linker?

I can do this via windows or linux with wine which ever is easier. I tried doing systrace but oh wow thats way to much output and 'ps' with a full thread view does not give enough information.

Thanks!
Posted
Comments
Espen Harlinn 1-Jan-11 13:00pm    
By large - how many files?
How are they organized?
There are many tools out there that can automagically create makefiles for complex projects ...
Manfred Rudolf Bihy 1-Jan-11 17:36pm    
I have made an update to my answer concerning WMIC tool in Windows XP.

Hi Trevor,

I don't know for how long your program runs, but "process explorer" from Sysinternals lets you look at how a program was started including the whole command line. I think it is in the property dialog of a process that can be opened via context menu from the list of processes.
In the property dialog go through the tabs that are there and look around. I think it is on the image tab where the whole command line can be seen. So if you know what the name of the executable is that's doing your compilation stuff you should be all set to go and try that out.
Only problem I see is the program finishing to soon for you to have a chance to find the process and have a look at it.

Good luck!

Modification
On windows XP Professional there is a command line tool to do WMI: http://windowsxp.mvps.org/listproc.htm[^].
On the site above they do it like this:
WMIC /OUTPUT:C:\ProcessList.txt PROCESS get Caption,Commandline,Processid

End of modification
Best regards,

Manfred
 
Share this answer
 
v2
Comments
Trevor Johansen 1-Jan-11 21:44pm    
Interesting little utility. It defiantly does what ps does but with alot more effort.

The IDE does not spawn a visible process for the ARMCC.exe so I can not tell what it was called with and have no idea how I would setup the command string to dump every ~100ms only knowing that programs name. In linux you could just write a simple script and use ps -A | grep binary and away you go.

Do you have any experience with WMI? or know how I can get it to dump what I want?
Trevor Johansen 4-Jan-11 20:23pm    
Sorry for the late reply work got busy after the holidays. I have tried out Process Explorer from SysInternals and its quite a handy app even though it spits out so much info its overwhelming.

I did manage to figure out how the IDE builds its projects though. Turns out it was making c,as,link instructions internally and then dumping them in the system temp directory so whenever I saw the compiler thread the input was garbled but that was actually the temp file name!

Finally got windows to hold onto the temp files and now I can make my makefiles. Although I have a makefile question now and will make a new request.

Thanks!
Manfred Rudolf Bihy 4-Jan-11 21:19pm    
Thanks for updating me! Glad if I could help. If you also vote on my answer I'd appreciate it. Thank you.
My project tree has several folders and outputs obj, lst, lib to seperate directories from around ~40 files.

What programs would you recommended to create a makefile skeleton for a large project? I can make basic makefiles but then theirs a lot of dependencies and output folders the %:.: and .c.o: can get confusing.

Also I ran 'strace wine ide.exe 2>dump.txt' and then 'cat dump.txt | grep armgcc' and I only found references to the files locations. In the IDE i compiled one c file and when I grep for that file I see:


stat64("/home/uminded/.wine/dosdevices/c:/Keil/ARM/Examples/Blinky/Blinky.c", {st_mode=S_IFREG|0644, st_size=1755, ...}) = 0
write(19, "compiling Blinky.c...\r\n", 23) = 23
write(19, "Blinky.c - 0 Error(s), 0 Warning"..., 38) = 38

But I can not find the string that was passed to armgcc.exe to compile Blinky.c

The end goal is to get the project IDE as Code::Blocks but use the arm compiler
 
Share this answer
 
Some tools that might help:

Cmake at http://www.cmake.org/[^]

ACE MPC som info here:http://www.ociweb.com/products/MPC[^] and download as part of ACE+TAO here http://download.dre.vanderbilt.edu/[^]

Gnu autotools - some info here http://www.lrde.epita.fr/~adl/autotools.html[^]

Hope this helps
Espen Harlinn
 
Share this answer
 
Comments
Trevor Johansen 1-Jan-11 14:23pm    
Oh wow the autotools tutorial is long but excellent. Exactly the info I was looking for on how to make a better makefile thats for sure!

However I still need to find out what command line switches to actually pass to my compiler as its documentation is not spectacular and I can only compile 50% of my programs by hand

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900