tags:

views:

75

answers:

1

Hi, I have bought a olimex sam7-p256 development board. Can anyone guide me to a website or tutorial that gives an idea as to how to install the tools and start using it? I am using ubuntu 9.10. Though I have got a windows OS, I would prefer to use it under linux. Any help on the good starting point in windows / linux will be good. Thank you.

Krish.

+1  A: 

I may edit this a few times before it is over.

Start by getting the code sourcery lite tools. That or embdebian, but code sourcery is better and easier. the linux gnueabi are fine because you dont need/wont use the linux calls you just need a generic gcc cross compiler. llvm is an alternative that might be even easier to install, but less people know how to use it at the moment (need the base llvm plus clang, I normally build from sources but that takes forever).

Try for a blinking led thing first. following the olimex link in JB's comment above. lpcstuff.blogspot.com, lmistuff.blogspot.com may give you an idea on how to get started note that the formerly luminary micro stellaris now texas instruments stellaris is a cortex m3 which is a thumb(2) only machine and boots differently than the arm7 in the sam7.

I dont have a sam7-p256 but have the more boring sam7-h64 or h256 something like that header board. Surprised I dont have a sam7stuff blog with blinky leds examples and jtag examples. I remember being quite pleased with the sam7 board incorporated it into a few projects. Jtag was not required.

I have but have not used an olimex usb wiggler, have been using the amontec jtag-tiny and have been quite pleased, other than over seas shipping cost/time. sparkfun has a recent link to an article using the ftdi ft232r which could probably be used as a wiggler as well, and a little easier to come by in the usa, although you would need to do some soldering to cable up to the jtag connector.

http://www.sparkfun.com/commerce/news.php?id=386

some notes on cross compiling, also in the blogs above

ARMGNU = arm-none-linux-gnueabi

AOPS = --warn --fatal-warnings

COPS = -Wall -Werror -O2 -nostdlib -nostartfiles -ffreestanding

$(ARMGNU)-gcc -c $(COPS) somefile.c -o somefile.o

$(ARMGNU)-as $(AOPS) vectors.s -o vectors.o

$(ARMGNU)-ld -T memmap vectors.s somefile.o -o someprog.elf

$(ARMGNU)-objdump -D someprog.elf > somefile.list

$(ARMGNU)-objcopy diags.elf -O binary somefile.bin

look at my blogs for memmap formats and match that to your device addresses. if at all possible start with ram-only programs then try to figure out the .text and .data split for rom and ram.

I highly recommend disassembling your binary to make sure your linker script (memmap in my example) worked right. you may not need the .bin file depending on how you load. if you have any non-zero data in .data (very bad embedded programming) that .bin file can be not at all what you expected, so be very careful, elfs are preferred (trivial to write an elf parser, I have probably provided one or several variations over the years).

good luck, have fun.

EDIT:

I dont have the same board, but here is a page that walks you through the first embedded program (blinking an led) for the simpler sam7-h64 board. Your led might be on another pin and you can easily adjust the example for that, otherwise this should work for your board too.

http://sam7stuff.blogspot.com/

dwelch
thank you.. I am on to it...