How to program NGW100 u-boot with JTAGICE mkII

Go To Last Post
13 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I'm new to Linux and new to AVR32's I have developed several applications with 8-bit AVR's using a JTAGICE mkII.
After reading several posts here and on Wiki I still have not found the step by step for loading u-boot with AVR32program.
I'm running SUSE Enjterprise Desktop SP01
I also have sucessfuly compiled buildroot-avr32-v2.1.0-rc9
I have tried to create an SD load but with no luck...
so how do I use AVR32program with JTAGICE HELP!!

Dyan KV9R....

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I think this docco is up to date: https://www.avrfreaks.net/wiki/in...

If you haven't already, explore the wiki for docco and the forum for faqs.

-S.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

squidgit wrote:
I think this docco is up to date: https://www.avrfreaks.net/wiki/in...

I have seen this... a step up from avr32program -h..
but it assumes that one knows the values for all the switches and the flash locations.
The real problem I have found in working with the AVR32's is that all of the tips to programming I have found assume that the other person is Linux literate... I'm illiterate :wink: , I'm learning, but with every step I try I find that there are gaping holes in documentation and/or procedure.
An example is trying to get avr32program run for a user rather than root... I followed all the directions, created avrtools.rules made avrtools a group and added myself to avrtools group... still didn't work.. most likely I left something out that it was assumed that I would know how to do. Sorry for the rant :)

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I found some answers from Atmel Support.
http://support.atmel.no/bin/cust...

Connect the JTAGICE mkII, and then use "avr32program" from the (Cygwin or Linux) command line prompt:

# avr32program erase -fcfi@0

# avr32program program -F bin -vfcfi@0 uboot.bin (Programming the bootloader)

# avr32program program -F bin -vfcfi@0 -O 0x20000 ngw_jffs2_root.img (Programming the filesystem)

I will try this this evening.... :lol:

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

When you have, if you feel like clarifying the wiki docco that'd be great :). As you say, it's currently more of a reference than a tutorial, if you feel comfortable adding some more n00b-level explinations it'd be much appreciated.

-S.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

You can combine the program and erase steps into one by adding -e to the "program" command line.

avr32program program -F bin -vefcfi@0 uboot.bin
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hi,
well I tried that as well, but my jffs2 wasn't readable however uboot worked. Does anybody know how to dump the whole flash (not internal memory, which is not present with the ap7000) with avr32program. I want to make some comparements to check about the filestructure.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Have a look at what

avr32program help read

says.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Well... as ... I said not the onchip flash which isn't even present...????

P.S. this is an AP7000 you know.It has only !!!external flash!!!

I have allready tried that, but there is nothing in there because this command is for internal flash.
Maybe there are some arguments not mentioned in the avr32program help read output?

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

avr32program read can be used to read from a memory address as well.

I can not remember the syntax, but something like "avr32program read -O 0 -f 0 -s 4096 -o flash.bin" should read out the 4096 bytes from address 0 to the file flash.bin. avr32program read can be used to read register values as well, just enter the base address for the peripheral + the register offset, and read out 4 bytes :)

Hans-Christian

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

moik2001 wrote:
P.S. this is an AP7000 you know.It has only !!!external flash!!!

I have allready tried that, but there is nothing in there because this command is for internal flash.


Doesn't matter. One of the nice things with flash is that it can be read exactly the same way as RAM. "avr32program read" doesn't care -- you just throw an address at it and it shows you what lies there.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Damn I wonder what I did wrong the first time. It works.
Thanks a lot. I used this to copy the whole flash from a new board to a messed up board and it was great.

But I also was accounting something very strange.
I always thought the enviroment vars of u-boot where also in this flash, but after I copied the whole flash the receiving board wanted to boot from sd-card wether the original board was configured to boot from onboard flash???
By the way could it be that atmel.com is down?
Tried to do some buildroot but can't get in there since make wants to go online even if you did make source before.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Try to transfer uboot.bin like this

avr32program program -F bin -vefcfi@0 uboot.bin
I receive error message like:
uboot.bin is not a valid file
Any suggestion?

Best Regards