6 Replies Latest reply on Mar 20, 2019 2:17 AM by shrac_2642471

    S-Flash User area APIs are not created ?


      Hi Team


      I am using Cypress PSoC 4200 for CY8C4248LQI-BL483 for my project. I see that for some reason, the PSoC is not generating the following #defines



          #define CY_SFLASH_USERBASE  (CYREG_SFLASH_MACRO_0_FREE_SFLASH0) /**< The base pointer of the user SFlash memory. */

          #define CY_SFLASH_SIZE      (CYDEV_SFLASH_SIZE)                 /**< The size of the SFlash memory. */

          #define CY_SFLASH_SIZEOF_USERROW        (CYDEV_FLS_ROW_SIZE)    /**< The size of the SFlash row. */

          #define CY_SFLASH_NUMBER_USERROWS       (4u)                    /**< The number of SFlash row. */

      #endif /* (CY_SFLASH_XTRA_ROWS) */


      How do I generate it? Is there a setting which needs to be enabled in the PSoC creator ?

        • 1. Re: S-Flash User area APIs are not created ?

          Please right click on the project > 'Device Selector' and change the device to CY8C4248LQI-BL483. Later 'Clean and Build' the project.

          • 2. Re: S-Flash User area APIs are not created ?

            Hi GeonaP_26
            Well I see what the problem is. Even If I select the device as CY8C4248LQI-BL483, PSoC Creator automatically selects the device as BL493, which is super weird. That is why the correct MACROs aren't being selected.
            See in my project it is correctly selected as follows

            Now lets see what the code generation is doing. I see that all Cortex M0 files which are generated is is 493


            You see it is automatically selecting 493 and obviously it is not generating the right data. Do you know why it happens ?



            • 3. Re: S-Flash User area APIs are not created ?
              • ARM_GCC_493 stands for the toolchain used for building the project. I assume you are using PSoC Creator 4.0 or 3.3 which has the GCC ARM Embedded toolchain GCC 4.9-2015-q1 by default. You can confirm the build settings by, right click on the project > Build Settings.


              • Please confirm whether the Skip Code Generation is set as False. Skipping code generation effectively locks the design such that any changes to the schematic, design-wide resources, and so on are not incorporated into the build output. Please set it as 'False' and 'Clean and Build' the project.


              • 4. Re: S-Flash User area APIs are not created ?

                Here you will know more about the complete process of using popups and you can use it if you required.

                • 5. Re: S-Flash User area APIs are not created ?

                  Hi GeonaP_26
                  I have the same configuration as you have mentioned, yet the APIs aren't being generated. Since I am part of a research team here I cannot really zip the code and send it across.


                  However I can give you a background.


                  So the connectivity team at my office has a proprietary project using Cypress CY8C4248LQI-BL493. My project which uses the connectivity code has to migrate to code base of 493 but use CY8C4248LQI-BL483. So I am using their project and porting my application code on it. However I changed the device to BL483. But when I do this, the code for 483 S-Flash is not being generated. I have cleaned and deleted all the files and tried as well still didn't help.


                  When I create a fresh project, then it is creating the correct file. However, that's not really that helpful for me now.




                  • 6. Re: S-Flash User area APIs are not created ?

                    I did some more investigation and figured out what the problem was. And once I figured out what the problem was, it was easy to fix this.

                    In the figure below you can see CyFlash.h which says that the component version is 5.20. I also had a look at my other projects where I see the component version was 5.40. Which means there is a new component which had to be used for S-Flash


                    So this is what I did,



                    In the cy_boot I updated the module to 5.40 and as soon as I did that all the APIs which were missing became available. By the way thanks so much for creating a cypress ticket for me to officially debug my environment. I don't think that would be needed anymore. I guess the problem was more because of the component version.


                    Thanks for a wonderful support.!