Author Topic: SAM7X IAR5.4 Project configuration  (Read 20344 times)

Offline mark

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3237
    • View Profile
    • uTasker
SAM7X IAR5.4 Project configuration
« on: January 30, 2010, 02:44:55 AM »
Hi All

In case anyone has any difficulties with loading code or debugging with IAR5.4 there is now have an improved project setup here:
www.uTasker.com/software/V1.4/IAR5_SAM7X.zip


Below is a description of the important settings as used there and also generally valid:

**********************************************************************************************************
1)   I set the macro files (in Debugger Setup) to be taken from settings the IAR program directory arm\examples\Atmel\resources\iar\at91sam7x-ek-flash.mac
(for RAM debug the file arm\examples\Atmel\resources\iar\at91sam7x-ek-sram.mac)

2)   For the device description file (same dialog) I took it from arm\config\debugger\Atmel\ioat91sam7x256

3)   In the download dialogue click “Use flash loader”. Then edit the configuration with
Memory Range – Start 0x100000 End 0xFFFFFFFF
Relocate Offset 0
Set overwrite default flash loader path with
arm\config\flashloader\Atmel\AT91SAM7XC256-EK\flash-at91sam7xc256.xml
As extra parameter set                   --flash

For the SRAM debug case I didn’t set anything in the Download dialog (all off)

Note that the paths above are referenced to the IAR program directory (eg. in my case c:\Programs\IAR Systems\Embedded Workbench 5.4\)
They can be referencing using like $TOOLKIT_DIR$ before the \config\... part to keep it install independent.
**********************************************************************************************************


Regards

Mark

Offline mike.newsome

  • Newbie
  • *
  • Posts: 7
    • View Profile
Re: SAM7X IAR5.4 Project configuration
« Reply #1 on: February 11, 2010, 02:07:49 PM »
Thanks for your help. Can you explain why you need to use the sam7XC downloader files, as its a sam7X processor?

I have tried the (what I think are correct) files, and the download completes, but the result will not run!

I have downloaded many SAM7X systems, and always used the 7X files OK so...

Looking forward to your thoughts

Mike

Offline mark

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3237
    • View Profile
    • uTasker
Re: SAM7X IAR5.4 Project configuration
« Reply #2 on: February 11, 2010, 11:55:20 PM »
Hi Mike

In fact I tried both sam7x and sam7xc and there didn't seem to be any difference. In the project setup as delivered in the link they should in fact all be set to the sam7x (not xc). The xc has an additional crypto accelerator (which I haven't used) but otherwise is the same in terms of linker script setup, etc.

The project in the link was tested (used to compile the demo project with IAR5.4) and has also been used by some other developers so I believe that it is correct. Therefore I will need some more details about why your board is not running. Check also that a pre-built project works (http://www.utasker.com/SW_Demos.html) and try a minimum project removing Ethernet, serial etc. so that just an LED blinks (for example) to ensure that it is not due to a resource problem - check the linker script that it suits your chip in case you have may a SAM7X128 (with less SRAM and FLASH).

Regards

Mark

Offline mike.newsome

  • Newbie
  • *
  • Posts: 7
    • View Profile
Re: SAM7X IAR5.4 Project configuration
« Reply #3 on: February 12, 2010, 08:40:03 PM »
Hello Mark.

This project setup is for ewarm 5.30.1 (This does by default install into directory 5.40).

Latest version 5.4 (latest version is 5.41) has a different setup for the flash loaders.
When running the project in 5.30.1, it downloads OK using either the sam7x or 7xc flash load tools. Transfering the settings to 5.41, using the settings here it will only download using 7xc. Using 7x (which should work) the code ends up running in addresses in RAM (0x20xxxx), and does not flash the lights. This is independant of the parts that are enabled. downloading the entire setup (with serial, usb, ethernet anyway) it works file.

Downloading using sam7xc downloaders works.

I will keep looking.

Mike

Offline mike.newsome

  • Newbie
  • *
  • Posts: 7
    • View Profile
Re: SAM7X IAR5.4 Project configuration
« Reply #4 on: February 15, 2010, 09:11:15 AM »
OK, the next step.

Using EWARM 5.41, I can get reliable downloads using the $TOOLKIT_DIR$\config\flashloader\Atmel\AT91SAM7X256-EK\flash-at91sam7x256.flash flash loader by specifying the correct device (Atmel AT91SAM7X256 for example) in the Project/Options/General Options/Target rather than the appropriate core (ARM7TDMI).
Also in the Project/Options/Debugger/Download/Edit, ensure that --boot parameter is shown. Without this, the chip seems to be left with ram mapped at 0.

I don't understand (yet) why I cannot build for the ARM7TDMI core, as the identical binary file is produced, and the download should be defined by the files used, not the processor settings but...

Regards

Mike

Offline Angeliple

  • Newbie
  • *
  • Posts: 1
    • View Profile
SAM7X IAR5 4 Project configuration
« Reply #5 on: March 06, 2011, 05:39:24 PM »
Thanks Ron, much appreciated.
It was awesome and inspiring.
 
I sent the link on to the SAM Event Director, perhaps he, they could identify.
 
Regards,
Don
_________________   
« Last Edit: March 06, 2011, 11:29:45 PM by mark »