Using the NAND driver from this post, we have been been successfully able to load our custom application into our custom board, and its working fine as well.
Settings in CCES:
Boot mode: NAND
Boot Format: ASCII
Output Width: 8 bits
The .ldr file created is of size 429KB. And the code is booting successfully from the NAND.
But now I have stumbled upon an un-expected error. As the size of the .ldr increased to 439KB, I am unable to load the program from the NAND.
While flashing the code into the NAND, the CLDP doesnt give any error.
To check my code, I executed the code using JTAG, in debug mode and it is working fine as well. To verify our custom NAND, I flashed the same code onto the NAND of the ADSP-BF548 Ez kit lite board, but the result is same. The code is not getting boot from the NAND.
But if I reduce the size of my .ldr file, to say 429KB again, I am able to boot from NAND again successfully, both on the Custom Board and on the EzKit lite board.
Also as suggested in this post, I increased my boot blocks to 250 from 128, in the NAND flashing driver file. Compiled it in Visual DSP, and used elf2elf to make it CCES compatible. But still didnt help.
One more info: The external SDRAM in our Custom Board is of 32MB. But the timing are same as per the init code provided with the ez kit lite board.
The NAND is same. i.e it has same number of blocks, no of pages, and page size.
I am confused. what could be the probable reason for such an error. Please guide.
It is possiblt to share the code, or the project if required.
Here is the command I am providing to the CLDP:
cldp -verbose -proc ADSP-BF548 -emu ICE-100B -driver "C:\Analog Devices\ADSP-BF548_EZKIT-Rel1.0.0\BF548_EZ-Kit_Lite\Blackfin\Examples\NandFlashProgrammer\Nand_backup_22_07_13\ADSP-BF548\Debug\BF548_new.dxe" -cmd prog -erase affected -format hex -file "C:\Documents and Settings\admin\CrossCore Embedded Studio_new\MBM_loopback\Debug\MBM_loopback.ldr"
I have branched your latest question into a new discussion and moved it to the Blackfin Processors community. Please continue the discussion here.
For continuity, this is the link I am referring to:
I believe you are converting VDSP nand flash driver posted in the http://ez.analog.com/thread/38606 link to CCES compatible executable by using elf2elf utility.
You are not passing compare command to CLDP to verify the flash content after programming the flash.You can pass compare command as below.
-cmd compare -format hex -file "D:\xxxx.ldr"
The driver posted in the link is not official and hence not supported. I would suggest you to refer code provided in the EE-344 Application-note and use it to program nand flash by generating Boot image in Ascii format and passing it as a buffer to the nand write function.
Thanks for the reply.
1. Is there any way I can flash the nand using CLDP, and without this particular driver?
2. Yes, I have been able to flash the NAND using the applciation code provided in EE-344. In the code I am reading a .bit file and flashing into the NAND, page by page. So please suggest, can this .dxe be used as a driver for the CLDP utility as well?
3. Using CLDP, we dont pass the block size and page size as argument, so does it have a defualt boot location where it flashes the boot code. I am clear about linux, where we mention the address, but I am unclear how things happen using CLDP.
Also if I read the .ldr file like I did for the .bit file, at what page and block would it be suggestible I dump the boot code?. Block 0, page 0?. Please suugest?
1. The CLDP needs a driver to interface with the target. The VisualDSP++ driver you found on the other thread may serve as a starting point for developing your own under CCES, or the code in EE-344 could serve as a starting point for developing your own.
2. As provided, no, the example code for EE344 cannot be used with the CLDP. The CLDP expects certain API and symbols present in the executable that it can use and manipulate to automate the programming of flash/nand/otp/etc.
Take a look at "Help: Contents: CrossCore Embedded Studio 1.0.3 > Integrated Development Environment > Working with Bootable and Non-bootable Files > Device Programmer > Custom Device Drivers".
3. The CLDP takes parameters such as the layout and size of the target device from the Driver. This will become clear when you read the API symbols and commands within the documentation I have mentioned under "2.".