Not impossible, but subject to a lot of severe restrictions:
- instruction set must be similar to NOR flash (the instruction codes
may be different, but the basic operations must be similar), no serious
problem
- bad block management must be transparent to read command, i. e. the
flash must replace bad blocks automatically with good ones; at least
newer flash devices support this, so again, not really serious
- some NAND flash have page sizes which are not powers of two, the
"spare area" might be unusable. Of course, it's possible to ignore these
spare areas.
- some NAND flash don't have true random read, but page read only, where
a whole page is copied from the memory array to a page buffer first, and
then the contents of the page buffer is shifted out sequentially, that's
completely incompatible with the QSPI's memory-mapped mode.
Consider Winbond's W25M02GV: To read some bytes you must first issue a
"Page Data Read". This transfers a page of 2112 bytes to the read
buffer. Then a separate command "Read Data" is used to read from this
buffer.
- the internal address space is not contiguous, i. e. the addresses
consist of page address and column address (within page), hence the
linker script would have to have a separate section for each page. Not
absolutely impossible, but a nightmare to deal with ... This means
splitting the code manually(!) into pieces which each fit into one page.
And each jump from one page to another would require insertion of a
special page selection function (in RAM or internal flash). And
PC-relative addressing ... Like in the old days of 8-bit controllers
with 16-bit addresses ...
BTW: Why do you consider NAND flash in the first place? For code
storage, you certainly don't need Gbytes?!
And NOR flash is easily available up to 64 Mbytes. I don't see any point
in dealing which all the additional complexity of NAND flash.
If you don't need it for code but data, it's different, and then page
structure won't be a big problem, that's what a flash file system is
good for.
On 2018-10-02 22:41, Praveen wrote:
> I haven't gone through the framework of adding a new NAND Flash, but
> is it worth to give a try and check OR is it impossible ?
---
** [tickets:#208] Open OCD for external qspi programming and debugging**
**Status:** closed
**Milestone:** 0.9.0
**Labels:** QSPI Flash
**Created:** Sat Sep 29, 2018 08:58 PM UTC by Praveen
**Last Updated:** Tue Oct 02, 2018 08:41 PM UTC
**Owner:** nobody
Hi,
We want to use Open OCD + GDB to program and debug from external quad NAND
flash for STM32H7xx micrcontroller. Till now we have been using internal flash.
Please share any reference documents or sample projects to develop the scripts
or drivers to acheive our debug environment.
Thanks,
Praveen
---
Sent from sourceforge.net because [email protected] is
subscribed to https://sourceforge.net/p/openocd/tickets/
To unsubscribe from further messages, a project admin can change settings at
https://sourceforge.net/p/openocd/admin/tickets/options. Or, if this is a
mailing list, you can unsubscribe from the mailing list.
_______________________________________________
OpenOCD-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openocd-devel