Hi, the OpenOCD contains support for some controllers with NAND interfaces, but the AT91SAM9260 isn't currently supported. I looked into this once, but SAM-BA is so easy to use, I didn't bother working on OpenOCD support for the SAM9s.
There's a Linux version of SAM-BA (I never used the Windows version, but the screenshots look similar): http://www.linux4sam.org/twiki/bin/view/Linux4SAM/SoftwareTools#SAM_BA_Linux_initiative I managed to erase the NAND flash (didn't have anything to put in it, but I guess loading would work, too) and I'm regularly programming the serial data flash. Regards, Dominic On Thursday 07 August 2008 23:01:12 Stefan Schoenleitner wrote: > Hello, > > > Looks like you had the internal SRAM mapped to 0x0 at that point. Check > > the processors user's manual for information about its internal memories > > and mappings. > > I had a closer look at the at91sam9260 datasheet. > On my board the code at the beginning of the NAND flash is loaded (thus > copied) to the internal SRAM at 0x300000. > Once the code has been loaded, the internal SRAM gets remapped to > address 0x0 and the CPU core can start to boot. > For this reason I was able to replace the code at this address region > (SRAM instead of NAND flash) and it's clear now why the changes to this > region were only temporary. > > Therefore, to be able to actually program the board, I would need write > access to NAND memory. > > The problem is, like you already said, that NAND isn't memory mapped: > > NAND flash has completely different characteristics, e.g. it isn't memory > > mapped. > > So, is there a possibility to write to the NAND flash on my board ? > > According to the datasheet, "the NAND flash logic is driven by the > Static Memory Controller on the NCS3 address space. ... > Access to an external NANDFlash device is then > made by accessing the address space reserved to NCS3 (i.e., between > 0x4000 0000 and 0x4FFF > FFFF)." > > Thus, in my understanding, if the at91sam9260 is initialized so that the > according output pins are used for NAND flash, the whole NAND flash > memory should be memory mapped by the static memory controller. > For this reason all I would have to do is to write to this memory region > provided that the at91sam9260 is initialized with NAND flash support. > > After reading through some examples, I found out that I can actually > create scripts which are executed after reset. > For this reason, I could initialize the memory controller so that it > memory maps the NAND flash. > After that I could write to NAND, true ? > > > Besides openocd, there is an atmel programming tool that can do flash > programming with the SMA-BA boot agent residing in the cores ROM. > However, the tool only runs on windows which would be kind of cumbersome > for me since my whole development environment runs under linux. > > Do you know of any other (linux) solution I could use to program the > NAND flash ? > > Like I said, the at91sam9260 has boot code in ROM (SAM-BA) that can be > used to write to memory regions. > But since SAM-BA doesn't know that there's NAND flash attached, I'm > pretty sure that it doesn't initialize the memory controller. > According to the datasheet, one can upload files over the serial/USB > port using the xmodem protocol. > But if the memory controller is not initialized to support NAND flash, > that won't be of much help either. > > How do you guys program your ARM based boards ? > They most possibly also have their code in NAND flash, haven't they ? > > stefan _______________________________________________ Openocd-development mailing list Openocd-development@lists.berlios.de https://lists.berlios.de/mailman/listinfo/openocd-development