how to add MX29LV320EBTI-70G's flash driver in digi ESP for ns7520

My ns7520 Net+OS device’s Nor flash is M29W320DB70N6E, but it shut down, so we replace it with MX29LV320EBTI-70G. When I write a driver for MX29LV320EBTI-70G, my device can’t work. Can any one help me?

It doesn’t appear like we have used this FLASH part in any of our products so we have no experience with it. However, I do not see any reason why it would not work from hardware perspective. On the software side, you would have to add support of this part to Netos and recompile libflash library. To give you an idea of which files to modify below is a tree of a patch we created for netos when we added a new flash part.

C:\Temp>tree /f
Folder PATH listing for volume Windows
Volume serial number is 00000083 A8B4:7867
C:\Netos75
├───h
│ Flash.h
│ naflash.h

├───lib
│ ├───arm7
│ │ └───32b
│ │ └───gnu
│ │ libflash.a
│ │ libflashdbg.a
│ │
│ └───arm9
│ └───32b
│ └───gnu
│ libflash.a
│ libflashdbg.a

└───src
├───bsp
│ ├───common
│ │ flashparts.c
│ │ main.c
│ │
│ └───platforms
│ ├───connectcore7u_a
│ │ flashparts.h
│ │
│ ├───connectcore9p9215_a
│ │ flashparts.h
│ │
│ ├───connectcorewi9p9215_a
│ │ flashparts.h
│ │
│ ├───connectme
│ │ flashparts.h
│ │
│ └───connectme9210
│ flashparts.h

└───flash
naflash.c

you will have to rebuild libfalsh library from command line. Once you do you should be also able to debug it using dgbtk debugger. Or just use printf to see what is detected etc.

Thank you,

I modified related flash files, and recompile libflash library as you say,
but some errors happened:

I start “Digi NET+OS 7.5 Build Environment”,
enter command:
make PLATFORM=ns7520_a_esp BOARD_TYPE=ns7520_a clean
run OK, then enter:
make PLATFORM=ns7520_a_esp BOARD_TYPE=ns7520_a
the processing will error:
./…/libs/libc.a(malloc.o): definition of malloc
./…/libs/libc.a(makebuf.o): In function __smakebuf': /usr2/src/xtools-3.4w/newlib/libc/stdio/makebuf.c:97: undefined reference to isatty’
collect2: ld returned 1 exit status
make[3]: *** [blram.elf] Error 1
make[2]: *** [bootloader/ramImage/blram.o] Error 2
make[1]: *** [mylocalall] Error 2
make: *** [bsp/7_5/ns7520_a/lib/libbsp.a] Error 2

I don’t know how to process the error, can you help me?