AnsweredAssumed Answered

Flash memory map conflict between documentation and template P2020RDB-PCA

Question asked by Felipe Magalhaes on Apr 3, 2020
Latest reply on Apr 6, 2020 by Yiping Wang

Hi there,

I am new to working with PowerPC P2020 dev board and its ecosystem. Still, I have worked with another PPC family before, the MPC 5777C dev board. I will try to go into details of my problem.

Currently, I am stating to develop applications for WindRiver's VxWorks, using their Workbench application. They provided me with the BSP file for my target, the P2020RDB board. The board has U-boot installed by default. 

 

Now, my problem here is with the flash mapping. NXP documentation shows the flash memory mapped to addresses between 0xEF000000 to 0xEFFFFFFF (16 mb) as:

U-Boot executing on the target, provides the same information (please notice flashstart and size):

 

On the other hand, NXP Codewarrior template for the target, as well as WindRiver BSP files, point to a different Flash memory mapping: from 0xFF000000 to 0xFFFFFFFF - and hence the same 16mb, but shifted. 

VxWorks mapping:

 

 

Codewarrior diagnostics:

l::target -lc "P2020-RDB-core00_RAM_P2020_Connect"
fl::target -b 0x0 0x40000000
fl::target -v on -l off
cmdwin::fl::device -d "S29GL128P" -o "8Mx16x1" -a 0xff000000 0xffffffff
cmdwin::fl::diagnose full
 Beginning Operation ...   
-------------------------
Performing target initialization ...   
 Downloading Flash Diagnostics Driver ...  
 Reading flash ID ...
Running Diagnostics ...  
 Running Diagnostics ........
Sector Map (read from target)  
=============================  
Sector 00000: 0xFF000000 - 0xFF01FFFF Size=0x00020000 unprotected programmed  
Sector 00001: 0xFF020000 - 0xFF03FFFF Size=0x00020000 unprotected      blank  
Sector 00002: 0xFF040000 - 0xFF05FFFF Size=0x00020000 unprotected programmed  
Sector 00003: 0xFF060000 - 0xFF07FFFF Size=0x00020000 unprotected      blank  
Sector 00004: 0xFF080000 - 0xFF09FFFF Size=0x00020000 unprotected programmed  
Sector 00005: 0xFF0A0000 - 0xFF0BFFFF Size=0x00020000 unprotected programmed  
Sector 00006: 0xFF0C0000 - 0xFF0DFFFF Size=0x00020000 unprotected programmed  
Sector 00007: 0xFF0E0000 - 0xFF0FFFFF Size=0x00020000 unprotected programmed  
Sector 00008: 0xFF100000 - 0xFF11FFFF Size=0x00020000 unprotected programmed  
Sector 00009: 0xFF120000 - 0xFF13FFFF Size=0x00020000 unprotected programmed  
Sector 00010: 0xFF140000 - 0xFF15FFFF Size=0x00020000 unprotected programmed  
Sector 00011: 0xFF160000 - 0xFF17FFFF Size=0x00020000 unprotected programmed  
Sector 00012: 0xFF180000 - 0xFF19FFFF Size=0x00020000 unprotected programmed  
Sector 00013: 0xFF1A0000 - 0xFF1BFFFF Size=0x00020000 unprotected programmed  
Sector 00014: 0xFF1C0000 - 0xFF1DFFFF Size=0x00020000 unprotected programmed  
Sector 00015: 0xFF1E0000 - 0xFF1FFFFF Size=0x00020000 unprotected programmed  
Sector 00016: 0xFF200000 - 0xFF21FFFF Size=0x00020000 unprotected programmed  
Sector 00017: 0xFF220000 - 0xFF23FFFF Size=0x00020000 unprotected programmed  
Sector 00018: 0xFF240000 - 0xFF25FFFF Size=0x00020000 unprotected programmed  
Sector 00019: 0xFF260000 - 0xFF27FFFF Size=0x00020000 unprotected programmed  
Sector 00020: 0xFF280000 - 0xFF29FFFF Size=0x00020000 unprotected programmed  
Sector 00021: 0xFF2A0000 - 0xFF2BFFFF Size=0x00020000 unprotected programmed  
Sector 00022: 0xFF2C0000 - 0xFF2DFFFF Size=0x00020000 unprotected programmed  
Sector 00023: 0xFF2E0000 - 0xFF2FFFFF Size=0x00020000 unprotected programmed  
Sector 00024: 0xFF300000 - 0xFF31FFFF Size=0x00020000 unprotected programmed  
Sector 00025: 0xFF320000 - 0xFF33FFFF Size=0x00020000 unprotected programmed  
Sector 00026: 0xFF340000 - 0xFF35FFFF Size=0x00020000 unprotected programmed  
Sector 00027: 0xFF360000 - 0xFF37FFFF Size=0x00020000 unprotected programmed  
Sector 00028: 0xFF380000 - 0xFF39FFFF Size=0x00020000 unprotected programmed  
Sector 00029: 0xFF3A0000 - 0xFF3BFFFF Size=0x00020000 unprotected programmed  
Sector 00030: 0xFF3C0000 - 0xFF3DFFFF Size=0x00020000 unprotected programmed  
Sector 00031: 0xFF3E0000 - 0xFF3FFFFF Size=0x00020000 unprotected programmed  
Sector 00032: 0xFF400000 - 0xFF41FFFF Size=0x00020000 unprotected programmed  
Sector 00033: 0xFF420000 - 0xFF43FFFF Size=0x00020000 unprotected programmed  
Sector 00034: 0xFF440000 - 0xFF45FFFF Size=0x00020000 unprotected programmed  
Sector 00035: 0xFF460000 - 0xFF47FFFF Size=0x00020000 unprotected programmed  
Sector 00036: 0xFF480000 - 0xFF49FFFF Size=0x00020000 unprotected programmed  
Sector 00037: 0xFF4A0000 - 0xFF4BFFFF Size=0x00020000 unprotected programmed  
Sector 00038: 0xFF4C0000 - 0xFF4DFFFF Size=0x00020000 unprotected programmed  
Sector 00039: 0xFF4E0000 - 0xFF4FFFFF Size=0x00020000 unprotected programmed  
Sector 00040: 0xFF500000 - 0xFF51FFFF Size=0x00020000 unprotected programmed  
Sector 00041: 0xFF520000 - 0xFF53FFFF Size=0x00020000 unprotected programmed  
Sector 00042: 0xFF540000 - 0xFF55FFFF Size=0x00020000 unprotected programmed  
Sector 00043: 0xFF560000 - 0xFF57FFFF Size=0x00020000 unprotected programmed  
Sector 00044: 0xFF580000 - 0xFF59FFFF Size=0x00020000 unprotected programmed  
Sector 00045: 0xFF5A0000 - 0xFF5BFFFF Size=0x00020000 unprotected programmed  
Sector 00046: 0xFF5C0000 - 0xFF5DFFFF Size=0x00020000 unprotected programmed  
Sector 00047: 0xFF5E0000 - 0xFF5FFFFF Size=0x00020000 unprotected programmed  
Sector 00048: 0xFF600000 - 0xFF61FFFF Size=0x00020000 unprotected programmed  
Sector 00049: 0xFF620000 - 0xFF63FFFF Size=0x00020000 unprotected programmed  
Sector 00050: 0xFF640000 - 0xFF65FFFF Size=0x00020000 unprotected programmed  
Sector 00051: 0xFF660000 - 0xFF67FFFF Size=0x00020000 unprotected programmed  
Sector 00052: 0xFF680000 - 0xFF69FFFF Size=0x00020000 unprotected programmed  
Sector 00053: 0xFF6A0000 - 0xFF6BFFFF Size=0x00020000 unprotected programmed  
Sector 00054: 0xFF6C0000 - 0xFF6DFFFF Size=0x00020000 unprotected programmed  
Sector 00055: 0xFF6E0000 - 0xFF6FFFFF Size=0x00020000 unprotected programmed  
Sector 00056: 0xFF700000 - 0xFF71FFFF Size=0x00020000 unprotected programmed  
Sector 00057: 0xFF720000 - 0xFF73FFFF Size=0x00020000 unprotected programmed  
Sector 00058: 0xFF740000 - 0xFF75FFFF Size=0x00020000 unprotected programmed  
Sector 00059: 0xFF760000 - 0xFF77FFFF Size=0x00020000 unprotected programmed  
Sector 00060: 0xFF780000 - 0xFF79FFFF Size=0x00020000 unprotected programmed  
Sector 00061: 0xFF7A0000 - 0xFF7BFFFF Size=0x00020000 unprotected programmed  
Sector 00062: 0xFF7C0000 - 0xFF7DFFFF Size=0x00020000 unprotected programmed  
Sector 00063: 0xFF7E0000 - 0xFF7FFFFF Size=0x00020000 unprotected programmed  
Sector 00064: 0xFF800000 - 0xFF81FFFF Size=0x00020000 unprotected programmed  
Sector 00065: 0xFF820000 - 0xFF83FFFF Size=0x00020000 unprotected programmed  
Sector 00066: 0xFF840000 - 0xFF85FFFF Size=0x00020000 unprotected programmed  
Sector 00067: 0xFF860000 - 0xFF87FFFF Size=0x00020000 unprotected programmed  
Sector 00068: 0xFF880000 - 0xFF89FFFF Size=0x00020000 unprotected programmed  
Sector 00069: 0xFF8A0000 - 0xFF8BFFFF Size=0x00020000 unprotected programmed  
Sector 00070: 0xFF8C0000 - 0xFF8DFFFF Size=0x00020000 unprotected programmed  
Sector 00071: 0xFF8E0000 - 0xFF8FFFFF Size=0x00020000 unprotected programmed  
Sector 00072: 0xFF900000 - 0xFF91FFFF Size=0x00020000 unprotected programmed  
Sector 00073: 0xFF920000 - 0xFF93FFFF Size=0x00020000 unprotected programmed  
Sector 00074: 0xFF940000 - 0xFF95FFFF Size=0x00020000 unprotected programmed  
Sector 00075: 0xFF960000 - 0xFF97FFFF Size=0x00020000 unprotected programmed  
Sector 00076: 0xFF980000 - 0xFF99FFFF Size=0x00020000 unprotected programmed  
Sector 00077: 0xFF9A0000 - 0xFF9BFFFF Size=0x00020000 unprotected programmed  
Sector 00078: 0xFF9C0000 - 0xFF9DFFFF Size=0x00020000 unprotected programmed  
Sector 00079: 0xFF9E0000 - 0xFF9FFFFF Size=0x00020000 unprotected programmed  
Sector 00080: 0xFFA00000 - 0xFFA1FFFF Size=0x00020000 unprotected programmed  
Sector 00081: 0xFFA20000 - 0xFFA3FFFF Size=0x00020000 unprotected programmed  
Sector 00082: 0xFFA40000 - 0xFFA5FFFF Size=0x00020000 unprotected programmed  
Sector 00083: 0xFFA60000 - 0xFFA7FFFF Size=0x00020000 unprotected programmed  
Sector 00084: 0xFFA80000 - 0xFFA9FFFF Size=0x00020000 unprotected      blank  
Sector 00085: 0xFFAA0000 - 0xFFABFFFF Size=0x00020000 unprotected      blank  
Sector 00086: 0xFFAC0000 - 0xFFADFFFF Size=0x00020000 unprotected      blank  
Sector 00087: 0xFFAE0000 - 0xFFAFFFFF Size=0x00020000 unprotected      blank  
Sector 00088: 0xFFB00000 - 0xFFB1FFFF Size=0x00020000 unprotected      blank  
Sector 00089: 0xFFB20000 - 0xFFB3FFFF Size=0x00020000 unprotected      blank  
Sector 00090: 0xFFB40000 - 0xFFB5FFFF Size=0x00020000 unprotected      blank  
Sector 00091: 0xFFB60000 - 0xFFB7FFFF Size=0x00020000 unprotected      blank  
Sector 00092: 0xFFB80000 - 0xFFB9FFFF Size=0x00020000 unprotected      blank  
Sector 00093: 0xFFBA0000 - 0xFFBBFFFF Size=0x00020000 unprotected      blank  
Sector 00094: 0xFFBC0000 - 0xFFBDFFFF Size=0x00020000 unprotected      blank  
Sector 00095: 0xFFBE0000 - 0xFFBFFFFF Size=0x00020000 unprotected      blank  
Sector 00096: 0xFFC00000 - 0xFFC1FFFF Size=0x00020000 unprotected      blank  
Sector 00097: 0xFFC20000 - 0xFFC3FFFF Size=0x00020000 unprotected      blank  
Sector 00098: 0xFFC40000 - 0xFFC5FFFF Size=0x00020000 unprotected      blank  
Sector 00099: 0xFFC60000 - 0xFFC7FFFF Size=0x00020000 unprotected      blank  
Sector 00100: 0xFFC80000 - 0xFFC9FFFF Size=0x00020000 unprotected      blank  
Sector 00101: 0xFFCA0000 - 0xFFCBFFFF Size=0x00020000 unprotected      blank  
Sector 00102: 0xFFCC0000 - 0xFFCDFFFF Size=0x00020000 unprotected      blank  
Sector 00103: 0xFFCE0000 - 0xFFCFFFFF Size=0x00020000 unprotected      blank  
Sector 00104: 0xFFD00000 - 0xFFD1FFFF Size=0x00020000 unprotected      blank  
Sector 00105: 0xFFD20000 - 0xFFD3FFFF Size=0x00020000 unprotected      blank  
Sector 00106: 0xFFD40000 - 0xFFD5FFFF Size=0x00020000 unprotected      blank  
Sector 00107: 0xFFD60000 - 0xFFD7FFFF Size=0x00020000 unprotected      blank  
Sector 00108: 0xFFD80000 - 0xFFD9FFFF Size=0x00020000 unprotected      blank  
Sector 00109: 0xFFDA0000 - 0xFFDBFFFF Size=0x00020000 unprotected      blank  
Sector 00110: 0xFFDC0000 - 0xFFDDFFFF Size=0x00020000 unprotected      blank  
Sector 00111: 0xFFDE0000 - 0xFFDFFFFF Size=0x00020000 unprotected      blank  
Sector 00112: 0xFFE00000 - 0xFFE1FFFF Size=0x00020000 unprotected      blank  
Sector 00113: 0xFFE20000 - 0xFFE3FFFF Size=0x00020000 unprotected      blank  
Sector 00114: 0xFFE40000 - 0xFFE5FFFF Size=0x00020000 unprotected      blank  
Sector 00115: 0xFFE60000 - 0xFFE7FFFF Size=0x00020000 unprotected      blank  
Sector 00116: 0xFFE80000 - 0xFFE9FFFF Size=0x00020000 unprotected      blank  
Sector 00117: 0xFFEA0000 - 0xFFEBFFFF Size=0x00020000 unprotected      blank  
Sector 00118: 0xFFEC0000 - 0xFFEDFFFF Size=0x00020000 unprotected      blank  
Sector 00119: 0xFFEE0000 - 0xFFEFFFFF Size=0x00020000 unprotected      blank  
Sector 00120: 0xFFF00000 - 0xFFF1FFFF Size=0x00020000 unprotected      blank  
Sector 00121: 0xFFF20000 - 0xFFF3FFFF Size=0x00020000 unprotected      blank  
Sector 00122: 0xFFF40000 - 0xFFF5FFFF Size=0x00020000 unprotected      blank  
Sector 00123: 0xFFF60000 - 0xFFF7FFFF Size=0x00020000 unprotected programmed  
Sector 00124: 0xFFF80000 - 0xFFF9FFFF Size=0x00020000 unprotected programmed  
Sector 00125: 0xFFFA0000 - 0xFFFBFFFF Size=0x00020000 unprotected programmed  
Sector 00126: 0xFFFC0000 - 0xFFFDFFFF Size=0x00020000 unprotected programmed  
Sector 00127: 0xFFFE0000 - 0xFFFFFFFF Size=0x00020000 unprotected programmed  
Flash Information  
=================  
Flash Manufacturer ID     :0x00000001
Flash Device ID (byte1)   :0x0000227E
Flash Device ID (byte2)   :0x00002221
Flash Device ID (byte3)   :0x00002201
Secure Device Verification:0x0000FFBF

 

I am able to flash VxWorks image using CodeWarrior to these addresses (as you can see above, the memory is "programmed" in the good addresses), but I am not able to execute it, because there is no boot-loader. When I try to reach for this area with U-boot, to copy to memory and initialize, obviously it does not see the area.

If I try to adjust the flash memory map on CodeWarrior, to comply with the documentation (starting at 0xEF000000), CodeWarrior returns an error message that the target flash does not exist / is not available. 

 

So, I am in a trick situation. I can flash the image and verify it was flashed with codewarrior, but at the same time I have conflicting information with U-boot. The funny part is that Linux images that came with the board were overwritten, but not U-boot. BUT, linux images were also in the 0xEF range, which I supposedly never touched.

 

Am I missing something here? 

Thanks in advance for the assistance! 

Outcomes