It is currently Tue Feb 18, 2020 1:06 pm
       


All times are UTC + 1 hour




Post new topic Reply to topic  [ 7 posts ] 
Author Message
 Post subject: When I 'make' the file 'demo.c', no hex file appears
PostPosted: Thu Mar 27, 2014 11:25 am 
Offline
New User

Joined: Thu Mar 27, 2014 10:50 am
Posts: 4
Hi All,
I am not new to microcontrollers but I am new to programming in C. The manual provides a good introduction to C and shows how to compile the file 'test.c' in the 'FirstTry' folder so that it makes a hex file for flashing.

That works fine. But because I am not anywhere near being able to program in C myself, I assumed that one of the other files supplied, like 'Demo.c' or 'LineDemo.c' would make my robot do something.

I tried to 'make' these files (in the SelfTest folder) using the make tools previously made for the manual example. No hex file appeared even though the compiler shows a successful build with no errors.

Then I guessed that maybe a new make tool could be made in the relevant folder (SelfTest, where the demo.c file is found) using command something like C:\ASURO_src\SelfTest\Demo-all.bat but that did nothing also.

It seems that the manual is missing the chapter where you actually make the robot work and doesn't even hint at how to do it. It's very frustrating, particularly as I was doing this with my 14 year old daughter who needs to see that programming can do something useful after all the code!!

Please help! :wall:


Top
 Profile E-mail  
 
 Post subject: Re: When I 'make' the file 'demo.c', no hex file appears
PostPosted: Sun Mar 30, 2014 4:37 pm 
Offline
arexx.com expert user

Joined: Thu Oct 16, 2008 1:08 pm
Posts: 223
Location: Assen, Netherlands
I don't know which robot model you speak of, so I also can't be sure which manual you are refering to. Asuro? RP6? Robot-arm? (though it doesn't do linefollowing obviously)

[EDIT] Nevermind, the "C:\ASURO_SRC" filepath speaks for itself..

The name of the hex-file is specified in the makefile. It is a file named "makefile. ". (no filetype/extension) That has all the configuration settings needed to make the compiler do all it's work. But there are so many configuration options in it that it cannot simply be explained in the robot manual. You will have to consult the documentation of the WinAVR compiler to learn more about it. To make it simple for beginners the makefile is expecting the main code file to be called "test.c" and thus generates "test.hex" is everything works ok.

[edit]Does the compiler process give any error-messages or warnings as it tries to compile the files?

I don't know for the other robot models, but the WinAVR compiler installed by the Asuro CD is quite old, and not up-to-date to handle how the newer Windows OSses work.


Top
 Profile  
 
 Post subject: Re: When I 'make' the file 'demo.c', no hex file appears
PostPosted: Tue Apr 08, 2014 3:06 am 
Offline
New User

Joined: Thu Mar 27, 2014 10:50 am
Posts: 4
Hi Valen,
Yes I am using the ASURO robot with Windows XP and WinAVR.

Perhaps my problem is: 1- the WinAVR as you suggest and 2- the possibility that other 'programs' found on the cd supplied with the ASURO such as 'LineDemo.c' (I thought this would be a complete program to make the robot follow a line), are not actually programs at all. Maybe they are just c code that forms part of the self test (or other) program?

The reason I say '1' above is that I realise that WinAVR, when run (with 'no errors' showing) is not actually creating a hex file at all. I can flash the hex file 'SelfTest.hex' to my ASURO only because it is ALREADY in the SelfTest folder supplied on the CD. If I delete the file SelfTest.hex and then try to create it with Programmer's Notepad I get nothing; no hex file is generated. The same goes for the other hex files on the CD. Sadly 'LineDemo.hex' is not on the CD or I might at least have a line-following robot to play with.

Can you suggest where I can get some useful completed and working code to make my robot do something and what program I can use to make a hex file?

Thanks- especially for being the only one to reply to a newbie.


Top
 Profile E-mail  
 
 Post subject: Re: When I 'make' the file 'demo.c', no hex file appears
PostPosted: Tue Apr 08, 2014 9:35 pm 
Offline
arexx.com expert user

Joined: Thu Oct 16, 2008 1:08 pm
Posts: 223
Location: Assen, Netherlands
Hi,

With Windows XP the issues with WinAVR version are not so apparent as Windows Vista, 7 or 8. It should work fine since the Asuro Cd was released in that timeframe.

But regarding 2: Yes, the linedemo.c program is not a true C-program, as it is missing the main-function. This is a reserved name that should exist only once, and not less, in every program. I forgot that the SelfTest program is indeed build up from multiple sub-programs. The makefile has a line where all the parts are mentioned to be needed to compile.

If you want to make your own program then it should suffice to make a renamed copy of the entire FirstTry folder/directory, and insert your own code into the test.c file. Make sure you save the files you have changed before compiling, as it is often forgotten by beginners. Then simply execute the Test-All.bat program in this folder to start the compilation progress. (or manually execute the command "make all" in a commandline window)

I don't know of any sites in English where you can find Asuro programs, other than what is posted in this forum. Or on a private site of one of the developers for Arexx, Arexx-Henk.

http://home.kpn.nl/h.van.winkoop/Asuro/AsuMaiPagFrm.htm

Personally I often go to the Asuro-section of the Roboternetz Forum, but that is in the German language. Which you may not be capable of understanding. Sorry I don't have any other English suggestions.

http://www.roboternetz.de/community/forums/53-Asuro


Top
 Profile  
 
 Post subject: Re: When I 'make' the file 'demo.c', no hex file appears
PostPosted: Tue Apr 15, 2014 4:59 am 
Offline
New User

Joined: Thu Mar 27, 2014 10:50 am
Posts: 4
Ah, Thank you Valen. That first site looks to contain what I need. Will post back if I'm successful.

Lincoln


Top
 Profile E-mail  
 
 Post subject: Re: When I 'make' the file 'demo.c', no hex file appears
PostPosted: Sun Apr 20, 2014 11:40 am 
Offline
New User

Joined: Thu Mar 27, 2014 10:50 am
Posts: 4
Hi Again,

The Arexx-Henck site you recommended-

http://home.kpn.nl/h.van.winkoop/Asuro/AsuMaiPagFrm.htm

was invaluable. I could take hex files from the software page, paste to Programmers Notepad and flash them to the ASURO and make it do things which at last is very encouraging.

However when I try to 'make' and 'clean' a c file such as 'test.c', I still never get a hex file generated so I'm a bit stuck there. I believe I'm following all his instructions right.

Any suggestions?

Thanks,
Lincoln


Top
 Profile E-mail  
 
 Post subject: Re: When I 'make' the file 'demo.c', no hex file appears
PostPosted: Sun Apr 20, 2014 1:51 pm 
Offline
arexx.com expert user

Joined: Thu Oct 16, 2008 1:08 pm
Posts: 223
Location: Assen, Netherlands
Well, "clean" cleans up the folder by removing the (by)products of the compilation process. So if you did that last then there is no hex file anymore. It has been deleted. So if you want to generate a hex file only do "make all". If it succeeds then there should be a hex-file. If not, it is best to show us the errors that the compiler generates in the window.

To dump those messages, with hopefully no errors, out to a text file I like to use the following command instead:

make all > compiler_output_log.txt

But some of example files provided by Arexx-Henk have slightly different names. Notice the columns include and library in his table. These should be inside the project folder as well. And mentioned in the makefile to be included into the process. If the compiler cannot find them then this should also be evident in the log file.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 7 posts ] 

All times are UTC + 1 hour


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group