Author Topic: HELP-OLIMEX-SAM7EX256-OPEN SOURCE TOOLS  (Read 32662 times)

Offline Venetec

  • Newbie
  • *
  • Posts: 9
    • View Profile
HELP-OLIMEX-SAM7EX256-OPEN SOURCE TOOLS
« on: September 21, 2008, 08:33:12 PM »
Hi Mark!
I have the Olimex SAM7EX256 and I use the Open Source Tools with SAM7X and uTasker project!
I read your post in http://www.utasker.com/forum/index.php?topic=34.0 but I can not donwload the project in the board.
I follow all steps that you utilice in the post (start eclipse, File | New | Project..., name: uTaskerV1.3, and I make the targets "all" and "clean"); when Double click on the "all" to build, in the console appear:

make -k all
make: *** No rule to make target `all'.

I change the path in the Build_SAM7X.bat because my directory is the next:

C:\Program Files\openocd-2007re204\bin;
C:\Program Files\openocd-2007re204\utils\bin;
C:\Program Files\yagarto\bin;
C:\Program Files\yagarto-tools-20070303\bin;

The new path is:

SET PATH=%PATH%;C:\Archivos de programa\yagarto-tools-20070303\bin
make -f make_uTaskerV1.3_GNU_SAM7X all

Therefore the message in the console is the same!
Thanks for your help!

Excume for my english!

Offline mark

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3238
    • View Profile
    • uTasker
Re: HELP-OLIMEX-SAM7EX256-OPEN SOURCE TOOLS
« Reply #1 on: September 21, 2008, 10:32:44 PM »
Hi

Please check that you have the latest service pack for the SAM7X - presently SP3.
http://www.utasker.com/software/softwareV1.3.html

Then check that you are using the make file suitable for the Eclipse/Yagarto tool chain, which is called
make_uTaskerV1.3_GNU_SAM7X (it looks correct from your post, but you may not have the latest one(?))

In this file you should find:
all: uTaskerV1.3.elf

This is the rule for making 'all', which is what the make utility is complaining about. It seems as though it is not finding this but it may that it is not finding the file(?)

Comparing your post to the original bat file I see that I used cs-make (code sourcery package) whereas you are using make. You could also try building by executing the BAT from a DOS console to see whether there is a difference. I don't know why it is not working correctly at the moment, but it may be that Eclipse is not using the paths which you expect it to be using. If you manage to get the make file operating correctly outside of Eclipse it may help solve any problems when operating inside of Eclipse.

Regards

Mark

Offline Venetec

  • Newbie
  • *
  • Posts: 9
    • View Profile
Re: HELP-OLIMEX-SAM7EX256-OPEN SOURCE TOOLS
« Reply #2 on: September 23, 2008, 05:50:18 AM »
Hi Mark!
Thanks for your help!
I still can not into operation the utasker!  :-[
I follow your instruction but the message in the console is the same.
I have the latest service pack for the SAM7X, then I am using the make file "make_uTaskerV1.3_GNU_SAM7X", but I changed the name for "makefile".
I think the problem is in the file .bat; specific in the path.
Let's see:

SET PATH=%PATH%;C:\Programme\CodeSourcery\Sourcery G++\bin
cs-make-f make_uTaskerV1.3_GNU_SAM7X all 

Red color: Obviously, I do not have the same location, but which is the location that is placed.?

Green color: I do not have the "cs-make", I read a similar case in the forum and the solution was

                 "searching your C:\Program Files" directory for make.exe. Note that "cs-make" is the CodeSourcery
                  version so you will probably have to change this to "make". Then set the path in the bat file to the
                  location where it exists." 

For these rason I changed "cs-make" for only "make", as my previous post. But the same thing happens.

Blue color: because I rename the make file (I changed "make_uTaskerV1.3_GNU_SAM7X" for "makefile"), I do not know
               which name should be in this position?

Please, I need help!
Excuse me for the inconvenience!

Cheers,
David.



Offline mark

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3238
    • View Profile
    • uTasker
Re: HELP-OLIMEX-SAM7EX256-OPEN SOURCE TOOLS
« Reply #3 on: September 23, 2008, 01:35:10 PM »
Hi David

At the moment I still don't see what is not correct, but I would suggest doing some simple tests to be sure that the paths are correct.

For example, ensure that the compiler tools path is being recognised by calling "gcc -v" from the bat file. This should start the compiler (normally in the same directory as make) and return its version number. If this doesn't work you need to correct the path, else you can look at the next point.

You may also have problems with the working directory. To test this you can call something like "copy test.txt test1.txt"
If you put a file in the directory that you think is being used as working directory with the name test.txt it should copy it. If not it may be trying to work in a different directory to the one you expect and then not finding the files that it needs.

Generally when the make doesn't work there is not a lot of information as to what is not actually working so it may be best to use some simple tests as above to be sure that it is trying to do what you expect - sometimes the error turns out to be very simply (once it is understood).

regards

Mark


Offline Venetec

  • Newbie
  • *
  • Posts: 9
    • View Profile
Re: HELP-OLIMEX-SAM7EX256-OPEN SOURCE TOOLS
« Reply #4 on: September 24, 2008, 05:55:59 AM »
Hi Mark!
Again I try to use the utasker, but I can not have success!  ???
I am a novice using the eclipse and the olimex sam7ex256. In the bat file I execute the "gcc -v", and I got the expected results (the version number); in this location is not the "make".
I have great desire to use or uTasker but I do not know that to do.
Please sorry for the inconvenience!
Thanks for your help and your time!!!!
Cheers,
David Venegas. :-\

Offline hp

  • Newbie
  • *
  • Posts: 2
    • View Profile
Re: HELP-OLIMEX-SAM7EX256-OPEN SOURCE TOOLS
« Reply #5 on: September 24, 2008, 02:56:40 PM »
Hi David,

Just a couple of days ago I managed to run the uTasker with Eclipse on the Atmel AT91SAM7X-EK board, using the Olimex ARM-USB_OCD.
I'm also not very experienced with Eclipse, neither with makefiles...
However, here is what I did:

1. Installed the Yagarto/Eclipse toolchain using the very good tutorial from James P. Lynch.

2. Tested the installation using the project SAM7X256Test.zip in the HOWTO section on yagarto.de.
   There I found also the Debugger Scripts to download and debug the application using J-Link Debugger.
   The files for the ARM-USB_OCD can be found in the very same ZIP file as the tutorial from James P. Lynch
   Building and dbugging works very well.

3. Next I took the makefile from the project in SAM7X256Test.zip and exchanged the object files by those from uTasker.
   I put that makefile in the toplevel uTasker folder. So it automatically apears in the project file tree.
   You'll find my makefile as an attachment.

4. I imported the uTasker project files into Eclipse, according the tutorial from J. Lynch
   The project now can be built by 'Build Project' command (eventually 'Make clean' before)
   
5. Since downloading/debugging did not work for whatever reason, I also changed the uTaskerV1.3_RAM.ld using the linker file from
   SAM7X256Test.zip as a reference and changed the makefile according to the new file name.
   
   # Define linker script file here
   LDSCRIPT_RAM = ./Applications/uTaskerV1.3/GNU_SAM7X/sam7x256_ram.ld
   LDSCRIPT_ROM = ./Applications/uTaskerV1.3/GNU_SAM7X/uTaskerV1.3_FLASH.ld

   You'll find the linker file as attachment too.

I now can download the uTasker into SAM7X RAM and debug it. Of course I had to disable Ethernet support due to RAM size.
Next step will be to make the linker script for FLASH. Shouldn't be too comlicated.

The only thing I dislike is that my map file shows the usage of library functions 'udivsi3()' and 'dvmd_tls.o()' from libgcc.a.
Somehow driver.c uses 'udivsi3()' but I don't know where...

Hope you may use some parts to solve your problem
Hanspeter

Offline Venetec

  • Newbie
  • *
  • Posts: 9
    • View Profile
Re: HELP-OLIMEX-SAM7EX256-OPEN SOURCE TOOLS
« Reply #6 on: September 25, 2008, 03:12:12 AM »
Hi Hanspeter!
Thanks for your help!
I still can not work with utasker, but now I can add the target "all" and then the program is compile!
I decided to start again with all the steps, this was that I did (I have the Olimex SAM7EX256 and I use the SAM-BA for download the programs in the development kit):

. I download the service pack of http://www.utasker.com/software/softwareV1.3.html
. I used your makefile, it is the same! (I do not know if I have to add the directory and libraries that are used, example: string.h).
. I used your sam7x256_ram.ld. It is the same.
. I saw the source files in the makefile, and I saw that missing the following files: KeyScan.c, NetworkIndicator.c, eth_drv.c, watchdog.c, dns.c, icmp.c, pop3.c and telnet.c. But I looked up and I added.
. I add the target "all", then execute the target.
. When compiling, generated a lot of mistakes. I saw that in most of file are included the header "config.h", that generated an error, so all files to included the config.h I changed for: "..\..\Applications\uTaskerBoot\config.h"; and the error disappear.
. But a lot of mistakes are still, some of them are (Most are in webInterface.c and application.c):

code line (webInterface.c ): cPtr = fnDebugDec(temp_pars->temp_parameters.usTelnetPort, 0, cValue);
error: request for member 'usTelnetPort' in something not a structure or union

code line (webInterface.c ): if (ACTIVE_WEB_SERVER & temp_pars->temp_parameters.ucServers) {
error: request for member 'temp_parameters' in something not a structure or union

code line (config.h) : extern int fnConfigSPIFileSystem(void);
error: previous declaration of 'fnConfigSPIFileSystem' was here

code line (application.c) : const PARS cParameters = {
error: expected'=',',',';','asm'or'_attribute_'before'cParameters'

code line (application.c): uMemcpy(&temp_pars->temp_parameters, &cParameters, sizeof(PARS));    // {10}
error: request for member 'temp_parameters' in something not a structure or union

code line (SAM7X.c): fnEnterInterrupt(PIOB, (unsigned char)(PRIORITY_PIOB | ucTrigger), PortB_Interrupt);
error: 'PRIORITY_PIOB' undeclared (firs use in this function)

......................Many more :-[

I've tried to check the code but it is difficult as there are so many mistakes......
Excuse the audacity, but you can send me the complete code that you download the kit?
So, I need the same code that provides utasker, however, for some reason there are many mistakes, thank you very much for the help you can provide me!
Cheers!
David :)

Offline hp

  • Newbie
  • *
  • Posts: 2
    • View Profile
Re: HELP-OLIMEX-SAM7EX256-OPEN SOURCE TOOLS
« Reply #7 on: September 25, 2008, 02:28:02 PM »
Hi David,

no need to check the code, the uTasker compiles smoothly... if all settings are right  ;)

I think you missed a step in the tutorial. There is no need to add separate files after you have created your project, just import the whole uTasker directory and everything you need is already there.

Here is what I suggest to do:

1. Install Eclipse/Yagarto/ARM-USB-OCD driver/Zylin plug-in (what you probably already did)
    It's quite a bunch of things you have to install

2. Extract the uTasker ZIP file into a directory (i.e. c:/temp/uTasker)

3. Extract the SAM7XSP3 ZIP file into the same directory

4. Put the 'makefile' I attached into the same directory

5. Put the linker script 'sam7xram.ld' which I attached into c:/temp/uTasker/Applications/uTaskerV1.3/GNU

(I suggest you to follow the tutorial from 'http://yagarto.de/howto/yagarto2/index.html' from now on)
6. Create a new project in Eclipse, i.e. 'uTasker'
    Setup the tools as described in the above tutorial

7. IMPORT THE WHOLE c:/temp/uTasker FOLDER into your project
    Browse to c:/temp/uTasker and mark the folder uTasker in the left window pane and makefile in the right window pane
    When done you shoud see the folder tree in the Project Explorer

8. Choose 'Build Project'

Hope that will do the trick
Hanspeter



Offline Venetec

  • Newbie
  • *
  • Posts: 9
    • View Profile
Re: HELP-OLIMEX-SAM7EX256-OPEN SOURCE TOOLS
« Reply #8 on: September 29, 2008, 04:46:05 PM »
Hi Hanspeter!
Thank you for your answer, really thank you very much!
I have some doubts:
1. I use the SAM-BA, I connect my kit with a USB cable; it is really necessary to install the zylin plug in?
2. Anyway, I have tried to install it but the following error (I have version Eclpse Platform 3.2):

"Requested operation cannot be performed because it would invalidate the current configuration. See details for more information.Zylin Embedded CDT (4.5.1) requires feature "org.eclipse.cdt (4.0.1.200709241202)", or later version."

3. I do not understand that you wrote to me in the points 2 and 3 (about uTasker ZIP and SAM7XSP3 ZIP), because I have the file ZIP called "uTaskerV1.3.0_SAM7X_SP3".

I think that my version of the eclipse is a bit old, I will try to install a newer!!

Please can you help me a little more? ???

Thanks!!!!
Cheers!
David :)

Offline Venetec

  • Newbie
  • *
  • Posts: 9
    • View Profile
Re: HELP-OLIMEX-SAM7EX256-OPEN SOURCE TOOLS
« Reply #9 on: September 30, 2008, 08:30:24 AM »
Hi HansPeter and Mark!
I found the problem!!
I feel a little shame but this it is. :-[
The problem was that I was doing the make targets in the root of project, and not in the folder GNU_SAM7X. By placing the targets (and all clean) finally I was able to compile the projector.
 
But not everything could be so good; first download the program in the kit with the SAM-BA, then I've created a LAN through a switch between my PC and the kit, finally to try to ping the kit the answer is no correct (all lost packets)! ???

I download the file .bin (µTasker demo binary image for AT91SAM7X-EK and Olimex SAM7-EX256 Evaluation Boards (loading with SAM-BA) )of the page utasker for the kit SAM7EX256 of OLIMEX and I downloaded to the kit, and tried it in LAN and to make the ping functioned properly.

I would say please where you can find the correct code with which generated the file .bin which is on the page utasker?
Thank you for the help!!!
Cheers!
David :)

Offline mark

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3238
    • View Profile
    • uTasker
Re: HELP-OLIMEX-SAM7EX256-OPEN SOURCE TOOLS
« Reply #10 on: September 30, 2008, 09:19:07 AM »
Hi David

Make sure that you set up the project for the Olimex board - it uses a different PHY to the ATMEL board.
In config.h activate OLIMEX_EX256 and deactivate SAM7X_EVAL.

Regards

Mark

Offline Venetec

  • Newbie
  • *
  • Posts: 9
    • View Profile
Re: HELP-OLIMEX-SAM7EX256-OPEN SOURCE TOOLS
« Reply #11 on: September 30, 2008, 10:07:05 AM »
Hi Mark!
That part it is configured correctly!
I use the utasker version  that is located at the following link: http://www.uTasker.com/software/V1.3/uTaskerV1.3.0_SAM7X.zip

Besides I use the the GNU_YAGARTO.zip.
I am using the correct code?
Thanks for your help!
Cheers!
David

Offline mark

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3238
    • View Profile
    • uTasker
Re: HELP-OLIMEX-SAM7EX256-OPEN SOURCE TOOLS
« Reply #12 on: September 30, 2008, 11:50:12 AM »
Hi David

I believe that you are using the correct code (V1.3 + SP3) and you have already proved that your board is working, using the reference binary file.

Can you confirm that the LED is blinking when you run your own compiled code?
Then you need to find out why the ping is not working - can you debug? To debug you can follow the following:
http://www.utasker.com/forum/index.php?topic=161.0

Regards

Mark

Offline Venetec

  • Newbie
  • *
  • Posts: 9
    • View Profile
Re: HELP-OLIMEX-SAM7EX256-OPEN SOURCE TOOLS
« Reply #13 on: September 30, 2008, 04:18:10 PM »
Hi Mark!
Thanks for your interest! ;)
Yes, when I download my code to the kit the LCD blinking!
I also follow the instructions of the PHY configuration but nothing!
A question: Why I download the newest version of SAM7X (service pack 3), there is a folder called uTaskerBoot, while the code with which I work does not have that folder?
Thanks!
Cheers!
David :)

Offline mark

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3238
    • View Profile
    • uTasker
Re: HELP-OLIMEX-SAM7EX256-OPEN SOURCE TOOLS
« Reply #14 on: September 30, 2008, 05:38:32 PM »
David

The uTaskerBoot folder contains a (separate) project for the uTasker boot loader. This can be used to enable uploads of new firmware via FTP or Web Browser.
The details are here: http://www.utasker.com/docs/uTasker/uTaskerBoot_003.PDF

The files in this folder are not needed for the demo project which you are working on.

Regards

Mark