William Reynolds
/
LPC_Bootloader
Diff: ID.cpp
- Revision:
- 1:0872c208795f
- Parent:
- 0:15536fa79743
- Child:
- 3:eb6d9211592d
--- a/ID.cpp Tue Sep 27 15:44:55 2011 +0000 +++ b/ID.cpp Thu Sep 29 11:32:52 2011 +0000 @@ -4,144 +4,21 @@ int SerialBuffered::IDCheck(int idcode) { switch (idcode) { //Cortex M3 - LPC17xx - case 638664503: - strcpy(strChipType, "LPC1769 - Cortex M3"); - lastSector = 29; - break; case 637615927: - strcpy(strChipType, "LPC1768 - Cortex M3"); - lastSector = 29; - break; - case 637610039: - strcpy(strChipType, "LPC1767 - Cortex M3"); - lastSector = 29; - break; - case 637615923: - strcpy(strChipType, "LPC1766 - Cortex M3"); - lastSector = 21; - break; - case 637613875: - strcpy(strChipType, "LPC1765 - Cortex M3"); - lastSector = 21; - break; - case 637606178: - strcpy(strChipType, "LPC1764 - Cortex M3"); - lastSector = 17; - break; - case 621885239: - strcpy(strChipType, "LPC1759 - Cortex M3"); - lastSector = 29; - break; - case 620838711: - strcpy(strChipType, "LPC1758 - Cortex M3"); - lastSector = 29; - break; - case 620828451: - strcpy(strChipType, "LPC1756 - Cortex M3"); - lastSector = 21; - break; - case 620828450: - strcpy(strChipType, "LPC1754 - Cortex M3"); - lastSector = 17; - break; - case 620761377: - strcpy(strChipType, "LPC1752 - Cortex M3"); - lastSector = 15; - break; - case 620761368: - strcpy(strChipType, "LPC1751 - Cortex M3"); - lastSector = 7; - break; - case 620761131: - strcpy(strChipType, "LPC1102 - Cortex M0"); - lastSector = 7; - break; - //Cortex M0 - LPC111x - case 0x041E502B: - strcpy(strChipType, "LPC1111FHN33/101 - Cortex M0"); - lastSector = 1; - break; - case 0x2516D02B: - strcpy(strChipType, "LPC1111FHN33/102 - Cortex M0"); - lastSector = 1; - break; - case 0x0416502B: - strcpy(strChipType, "LPC1111FHN33/201 - Cortex M0"); - lastSector = 1; + strcpy(strChipType, "LPC1768 - Cortex M3"); //Chip name + lastSector = 29; //Last available sector in Flash + RAM = 268435968; //First RAM address break; - case 0x2516902B: - strcpy(strChipType, "LPC1111FHN33/202 - Cortex M0"); - lastSector = 1; - break; - case 0x042D502B: - strcpy(strChipType, "LPC1112FHN33/101 - Cortex M0"); - lastSector = 3; - break; - case 0x2524D02B: - strcpy(strChipType, "LPC1112FHN33/102 - Cortex M0"); - lastSector = 3; - break; - case 0x0425502B: - strcpy(strChipType, "LPC1112FHN33/201 - Cortex M0"); - lastSector = 3; - break; - case 0x2524902B: - strcpy(strChipType, "LPC1112FHN33/202 - Cortex M0"); - lastSector = 3; - break; - case 0x0434502B: - strcpy(strChipType, "LPC1113FHN33/201 - Cortex M0"); - lastSector = 5; - break; - case 0x2532902B: - strcpy(strChipType, "LPC1113FHN33/202 - Cortex M0"); - lastSector = 5; - break; - case 0x0434102B: - strcpy(strChipType, "LPC1113FHN33/301 OR LPC1113FBD48/301 - Cortex M0"); - lastSector = 5; - break; - case 0x2532102B: - strcpy(strChipType, "LPC1113FHN33/302 OR LPC1113FBD48/302 - Cortex M0"); - lastSector = 5; - break; - case 0x0444502B: - strcpy(strChipType, "LPC1114FHN33/201 - Cortex M0"); - lastSector = 7; - break; - case 0x2540902B: - strcpy(strChipType, "LPC1114FHN33/202 - Cortex M0"); - lastSector = 7; - break; - case 0x0444102B: - strcpy(strChipType, "LPC1114FHN33/301 OR LPC1114FBD48/301 OR LPC1114FA44/301 - Cortex M0"); - lastSector = 7; - break; - case 0x2540102B: - strcpy(strChipType, "LPC1114FHN33/302 OR LPC1114FBD48/302 OR LPC1114FA44/302 - Cortex M0"); - lastSector = 7; - break; - //Cortex M0 - LPC11Cxx - case 0x1421102B: - strcpy(strChipType, "LPC11C12FBD48/301 - Cortex M0"); - lastSector = 3; - break; - case 0x1440102B: - strcpy(strChipType, "LPC11C14FBD48/301 - Cortex M0"); - lastSector = 7; - break; - case 0x1431102B: - strcpy(strChipType, "LPC11C22FBD48/301 - Cortex M0"); - lastSector = 3; - break; - case 0x1430102B: - strcpy(strChipType, "LPC11C24FBD48/301 - Cortex M0"); - lastSector = 7; + //ARM7 + case 117702437: + strcpy(strChipType, "LPC2387 - ARM7"); + lastSector = 27; + RAM = 0x40000200; break; default: strcpy(strChipType, "\n\rUnrecognised chip! Please add into the \"CheckTargetPresent\" function the chip's relevant information.\r\n\n"); - exit(0); + return(2); } return 0; } \ No newline at end of file