Will no longer exit if #pragma maxram has not been defined.
authorslade_rich <slade_rich@4a8a32a2-be11-0410-ad9d-d568d2c75423>
Tue, 10 Aug 2004 01:23:04 +0000 (01:23 +0000)
committerslade_rich <slade_rich@4a8a32a2-be11-0410-ad9d-d568d2c75423>
Tue, 10 Aug 2004 01:23:04 +0000 (01:23 +0000)
git-svn-id: https://sdcc.svn.sourceforge.net/svnroot/sdcc/trunk/sdcc@3427 4a8a32a2-be11-0410-ad9d-d568d2c75423

src/pic/device.c
src/pic/device.h
src/pic/pcode.c

index d83c48c453af492ef651e03ce2148e39fc0999bc..67b168d329df16425d58fcffbe358a7d7bfefba8 100644 (file)
@@ -39,8 +39,9 @@ static PIC_device Pics[] = {
                {"p16f627", "16f627", "pic16f627", "f627"}, /* processor name */
                (memRange *)NULL,
                (memRange *)NULL,
-               0,                               /* max ram address (calculated) */
-               0x80,                            /* Bank Mask */
+               0,                /* max ram address (calculated) */
+               0x1ff,            /* default max ram address */
+               0x80,             /* Bank Mask */
        },
        
        {
@@ -48,6 +49,7 @@ static PIC_device Pics[] = {
                (memRange *)NULL,
                (memRange *)NULL,
                0,
+               0x1ff,
                0x80,
        },
        
@@ -56,6 +58,7 @@ static PIC_device Pics[] = {
                        (memRange *)NULL,
                        (memRange *)NULL,
                        0,
+                       0xcf,
                        0x80,
        },
        
@@ -64,6 +67,7 @@ static PIC_device Pics[] = {
                        (memRange *)NULL,
                        (memRange *)NULL,
                        0,
+                       0x1ff,
                        0x180,
        },
 
@@ -72,6 +76,7 @@ static PIC_device Pics[] = {
                        (memRange *)NULL,
                        (memRange *)NULL,
                        0,
+                       0x1ff,
                        0x180,
        },
        
@@ -80,6 +85,7 @@ static PIC_device Pics[] = {
                        (memRange *)NULL,
                        (memRange *)NULL,
                        0,
+                       0x1ff,
                        0x80,
        },
 
@@ -618,3 +624,11 @@ int getConfigWord(int address)
                return 0;
        
 }
+
+/*-----------------------------------------------------------------*
+*  
+*-----------------------------------------------------------------*/
+void setDefMaxRam(void)
+{
+       setMaxRAM(pic->defMaxRAMaddrs); // Max RAM has not been included, so use default setting
+}
index 9b944cf1e242285b5135da49b5c5ca58b925da30..d961b339de51a5c8477dce07b54bb29148fb7dc2 100644 (file)
@@ -80,6 +80,7 @@ typedef struct PIC_device {
        memRange *sfr;              /* SFR memory map */
 
        int maxRAMaddress;          /* maximum value for a data address */
+       int defMaxRAMaddrs;         /* default maximum value for a data address */
        int bankMask;               /* Bitmask that is ANDed with address to extract banking bits */
        //  int hasAliasedRAM:1;        /* True if there are bank independent registers */
 
@@ -99,5 +100,6 @@ int isREGinBank(regs *reg, int bank);
 int REGallBanks(regs *reg);
 void addMemRange(memRange *r, int type);
 void setMaxRAM(int size);
+void setDefMaxRam(void);
 
 #endif  /* __DEVICE_H__ */
index f8a573ff44e916db2e8b246691b7a7065ec7dfad..db50767e50614e7c96e8e24523b3fab5e8573db9 100644 (file)
@@ -5404,12 +5404,13 @@ void AnalyzeBanking(void)
        pBlock  *pb;
        
        if(!picIsInitialized()) {
-               fprintf(stderr,"Temporary ERROR: at the moment you have to use\n");
-               fprintf(stderr,"an include file create by inc2h.pl. See SDCC source:\n");
-               fprintf(stderr,"support/scripts/inc2h.pl\n");
-               fprintf(stderr,"this is a nuisance bug that will be fixed shortly\n");
+//             fprintf(stderr,"Temporary ERROR: at the moment you have to use\n");
+//             fprintf(stderr,"an include file create by inc2h.pl. See SDCC source:\n");
+//             fprintf(stderr,"support/scripts/inc2h.pl\n");
+//             fprintf(stderr,"this is a nuisance bug that will be fixed shortly\n");
                
-               exit(1);
+//             exit(1);
+               setDefMaxRam(); // Max RAM has not been included, so use default setting
        }
        
        /* Phase x - Flow Analysis - Used Banks