4 Replies Latest reply on Dec 22, 2011 3:10 AM by user_1377889

    Smartsense 17button compile error

    amin.kamarulzaman

      Hi All,

         

      I planned to use CY8C21534B for capsense with the standard PSoC designer 5.1. I'm planning to use smartsense module. We have 16button used for sensing and 1 additional button for guard ring, so I need to setup 17button in the wizard. Without any additional code added to main.c, I tried to compile and below error appear. I reduced the button to 16button and it can compile successfully.

         

      I havent done anything to the project to include coding and already encounter this error... are they any workaround on this?

         

      17 button

         

      /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

         


      ./main.c
      Linking..
      LMM info: area 'InterruptRAM' uses 59 bytes in SRAM bank 0
      LMM info: area 'ram2' item of 71 bytes allocated in SRAM page 0
      LMM info: area 'ram1' item of 68 bytes allocated in SRAM page 0
      LMM info: area 'ram0' item of 34 bytes allocated in SRAM page 0
      LMM info: area 'data' item of 17 bytes allocated in SRAM page 0
      !E <library>(1747): {linker} Cannot allocate space for paged area 'virtual_registers'
      C:\PROGRA~1\Cypress\PSOCDE~1\5.1\Common\CY3E64~1\tools\make: *** [output/GTR_1_2.rom] Error 1
       
      GTR_1_2 - 2 error(s) 0 warning(s) 14:13:16

         

       

         

      16 button

         

      /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

         

      /main.c
      Linking..
      LMM info: area 'InterruptRAM' uses 57 bytes in SRAM bank 0
      LMM info: area 'ram2' item of 66 bytes allocated in SRAM page 0
      LMM info: area 'ram1' item of 64 bytes allocated in SRAM page 0
      LMM info: area 'ram0' item of 32 bytes allocated in SRAM page 0
      LMM info: area 'data' item of 16 bytes allocated in SRAM page 0
      LMM info: area 'virtual_registers' uses 7 bytes in SRAM page 0
        ROM 32% full. 2584 out of 8192 bytes used (does not include absolute areas).
        RAM 95% full. 242 bytes used (does not include stack usage).
      idata dump at output/GTR_1_2.idata
      Built with ICCM8C STD V7.04
       
      GTR_1_2 - 0 error(s) 0 warning(s) 14:11:14

         

       

         

       

         

       

         

       

         

       

         

      Thanks

         

       

         


       

        • 1. Re: Smartsense 17button compile error
          vikram..

          There wasn't sufficient space available in the page 0 of RAM to allocate when you select 17 sensors.Hence you were getting the error.

             

          Change the stack page offset as shown in the attached picture to 08.This  creates sufficient space in the page1 of RAM, and the project compiles successfully.

             

           

             

          Regards,

             

          Vikram

          • 2. Re: Smartsense 17button compile error
            amin.kamarulzaman

            Thanks! I can now compile it successfully.

               

            However as I tried to change the "Threshold setting Mode" to Automatic from the SmartSense wizard application, I encounter the same problem again.

               

            I have tried to increase the page offset value to "99" and still cant compile successfully. It can compile successfully when I reduce the sensor count to 15 (blank project with no code at main.c). Is any other way to get this compile successfully with 17 or 16 sensor at least with the "Threshold setting Mode" to Automatic?

               

             

               

             

               

            // 17 button (Automatic threshold)

               

            ./main.c
            Linking..
            LMM info: area 'InterruptRAM' uses 59 bytes in SRAM bank 0
            LMM info: area 'ram2' item of 71 bytes allocated in SRAM page 0
            LMM info: area 'ram1' item of 68 bytes allocated in SRAM page 0
            LMM info: area 'ram0' item of 34 bytes allocated in SRAM page 0
            LMM info: area 'data' item of 17 bytes allocated in SRAM page 0
            LMM info: area 'data' item of 34 bytes allocated in SRAM page 1
            LMM info: area 'data' item of 34 bytes allocated in SRAM page 1
            LMM info: area 'data' item of 34 bytes allocated in SRAM page 1
            LMM info: area 'data' item of 17 bytes allocated in SRAM page 1
            LMM info: area 'data' item of 17 bytes allocated in SRAM page 1
            LMM info: area 'data' item of 17 bytes allocated in SRAM page 1
            !E <library>(2187): {linker} Cannot allocate space for paged area 'virtual_registers'
            !E <library>(2187): {linker} Cannot allocate space for 17 bytes for 'data' area
            !E <library>(2187): {linker} Cannot allocate space for 17 bytes for 'data' area
            C:\PROGRA~1\Cypress\PSOCDE~1\5.1\Common\CY3E64~1\tools\make: *** [output/GTR_1_2.rom] Error 1
             
            GTR_1_2 - 4 error(s) 0 warning(s) 16:01:38

               

             

               

             

               

            Thanks

            • 3. Re: Smartsense 17button compile error
              user_3718432

               SmartSense library consumes more flash and RAM when threshold setting mode is set to automatic. Check out the actual figures from the SmartSense user module datasheet. This is the reason why the project doesn't compile with automatic threhsold setting mode.

              • 4. Re: Smartsense 17button compile error
                user_1377889

                To help you to understand what you are setting with the offset.

                   

                The chip has two SRam areas (Pages), one for your (and the module's) data, one for the stack, The latter is always in the upmost page, in your case page 1. The data area starts at the bottom of page 0 ang goes up to the end and into page 1 when needed. When it reaches the begin of the stack area, you get exactly the error you have now.

                   

                You may set the offset to 200 (0xC8), but then you must be VERY resrtict with stack usage in your C-Program (Local vars, calls etc)

                   

                 

                   

                Happy Ho Ho Ho

                   

                Bob