Hi again:
I sorry to be such a pain but, here are two more problems with the  
last patch file called: "avarice-2.10_atxmega256a3_support.patch".

Problem #1:
  All the file names in this patch are prefixed by "+++  
avarice-2.10_patched/src/xxxx".
  The only way to get this patch to work is by removing all the "+++  
avarice-2.10_patched/" from the file names.  Is there another way to  
get "patch" to understand that the
  sub-directory is not "+++ avarice-2.10_patched" but "+++  
avarice-2.10".

Problem #2:
  When I did fix the above problem the patches apply OK but the make  
fails with a strange error:

  devdescr.cc:4799: error: brace-enclosed initializer used to  
initialize ‘unsigned int’
  devdescr.cc:4799: error: brace-enclosed initializer used to  
initialize ‘dev_flags’
  make[2]: *** [devdescr.o] Error 1
  make[1]: *** [all] Error 2
  make: *** [all-recursive] Error 1

The problem seems to be this large chunk of code being added:

@@ -4476,6 +4476,95 @@
            fill_b2(0), // EECRAddress
        },
      },
+
+
+        /*******************************************************/
+        /************** SUPPORT FOR ATXMEGA256A3 ***************/
+        /*******************************************************/
+       
+/* Datasheet (doc8068) specifies a size of 256 words (2Bytes) per  
page and 512 pages.
+/* I assume the page size to be 128 words and 1024 pages, because  
otherwise I can't
+/* reprogram the atxmega256a3 successfully */
+#define BOOT_PAGES                     16
+#define APP_PAGES                              1024
+#define WORD_SIZE                              2
+#define F_PAGES_WORD_SIZE      256 * 1024 /*[Bytes]*/ /2 /*[words]*/ /  
APP_PAGES /*[words/page]*/
+#define F_PAGES_SIZE           F_PAGES_WORD_SIZE * WORD_SIZE
+#define EE_PAGE_SIZE                   32
+#define EE_PAGES                               128
+#define BOOT_START_ADDR                0x40000
+#define SRAM_START_ADDR                0x2000
+
+
+        {
+       "atxmega256a3",
+       0x9842,
+       F_PAGES_SIZE, APP_PAGES + BOOT_PAGES,           // 270336 Bytes of flash
+       EE_PAGE_SIZE, EE_PAGES,                                                 
// 4096 [0x1000] bytes EEPROM
+       0 * 4,  // 36 interrupt vectors
+       DEVFL_MKII_ONLY,
+       NULL,   // registers not yet defined
+        true,
+       {
+           0   // no mkI support
+       },
+       {
+           CMND_SET_DEVICE_DESCRIPTOR,
+           { 0xFF,0xFF,0xFF,0xF9,0xFF,0x3D,0xB9,0xF8 }, // ucReadIO
+           { 0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00 }, // ucReadIOShadow
+           { 0xFF,0xFF,0x1F,0xE0,0xFF,0x1D,0xA9,0xF8 }, // ucWriteIO
+           { 0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00 }, // ucWriteIOShadow
+           { 0x73,0xFF,0x3F,0xFF,0xF7,0x3F,0xF7,0x3F,
+             0xF7,0x3F,0x5F,0x3F,0x37,0x37,0x36,0x00,
+             0x00,0x00,0x00,0x00,0xFF,0x0F,0x00,0x00,
+             0xF7,0x3F,0x36,0x00 }, // ucReadExtIO
+           { 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+             0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+             0x00,0x00,0x00,0x00 }, // ucReadIOExtShadow
+           { 0x73,0xFF,0x3F,0xF8,0xF7,0x3F,0xF7,0x3F,
+             0xF7,0x3F,0x5F,0x2F,0x36,0x36,0x36,0x00,
+             0x00,0x00,0x00,0x00,0xFF,0x0F,0x00,0x00,
+             0xF7,0x3F,0x36,0x00 }, // ucWriteExtIO
+           { 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+             0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+             0x00,0x00,0x00,0x00 }, // ucWriteIOExtShadow
+           0x90,       // ucIDRAddress
+           0x57,       // ucSPMCRAddress Store Program Memory Control Register
+           0,  // ucRAMPZAddress               RAMPZ seems to be an instruction
+           fill_b2(F_PAGES_SIZE),      // uiFlashPageSize
+           32, // ucEepromPageSize
+           fill_b4(BOOT_START_ADDR),   // ulBootAddress
+           fill_b2(0x40),      // uiUpperExtIOLoc
+           fill_b4(F_PAGES_SIZE * (APP_PAGES + BOOT_PAGES)),   // ulFlashSize
+           { 0x00 },   // ucEepromInst
+           { 0x00 },   // ucFlashInst
+           0x3E,       /* ucSPHaddr (Stack Pointer Higher ADDR)
+                                        * In regs it's 0x1D and remapped in 
I/O regs @ 0x3E*/
+           0x3D,       /* ucSPLaddr (Stack Pointer Lower ADDR)
+                                        * In regs it's 0x1C and remapped in 
I/O regs @ 0x3D*/
+           fill_b2(APP_PAGES + BOOT_PAGES),    // uiFlashpages
+           0x00,       // ucDWDRAddress
+           0x00,       // ucDWBasePC
+           0x00,       // ucAllowFullPageBitstream
+           fill_b2(0x00),      // uiStartSmallestBootLoaderSection
+           1,  // EnablePageProgramming
+           0x02,       // ucCacheType
+           fill_b2(SRAM_START_ADDR),   // uiSramStartAddr
+           0,  // ucResetType
+           0,  // ucPCMaskExtended
+           0,  // ucPCMaskHigh
+           0,  // ucEindAddress
+           fill_b2(0), // EECRAddress
+       },
+    },
+       
+       
+        /*******************************************************/
+        /*********** Eof SUPPORT FOR ATXMEGA256A3 **************/
+        /*******************************************************/
+
+
+
      // DEV_ATMEGA128RFA1
      {
        "atmega128rfa1",

It seems that somewhere in this mess is an extra curly brace, or one  
missing and I don't understand this file format so I cannot discern  
where exactly the problem lies.
If I remove this chunk of code all the patches apply fine and Avarice  
builds to completing without any errors.
However, I don't know if it works as I haven't actually used it for  
anything yet.
Perhaps tomorrow I'll get to it.

TIA,
Ed
------------------------------------------------------------------------------
Colocation vs. Managed Hosting
A question and answer guide to determining the best fit
for your organization - today and in the future.
http://p.sf.net/sfu/internap-sfd2d
_______________________________________________
avarice-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/avarice-user

Reply via email to