9 Replies Latest reply on Apr 24, 2012 3:58 AM by userc_45538

    cy_boot update

      Hi,

         

      Yesterday I have updated PSoC Creator.  When I load the project I have worked on, only cy_boot apears to be newer - from ver 2.2 to 2.21. I have updated it. I made some changes and since then there are only troubles with stuff, that worked before. I am not pasting any code here, because it is very long, but operators like:

         

          char outputStr [3] [20];

         

          float input [3];

         

           ...

         

          sprintf (outputStr [i], "%.3f", input [i]);

         

      seemed to mess up the mem data.

         

      I tryed:

         

            sprintf (outputStr [i], "%.3f", 123.456);

         

      and it was the same. Then I tryed:

         

           char test [20];

         

           ...

         

           sprintf (test, "%.3f", 123.456);

         

      same story.

         

      It is working fine with %d, but with %f is not. I debug it several times wondering what's wrong with the code, and I found nothing. Then I get the backed up project (before the update). I started it up, it asked for an update and I choose no. The project runs smooth. The very same project - I loaded it again, and it asked again for update (I didn't mark it previous time as up to date). I made update. I check explicitly what exactly is going to e updated. Compile it, run it - data was messy. 

         

      I spent almost a day chasing gosts. Can you please advise waht's going on. 
       

         

      Thanks,

         

      Stoyan Karanfilov

        • 1. Re: cy_boot update

          Hi Stoyan,

             

           

             

          From the description provided above, what I understand is that the data gets messy after the cy_boot is updated to latest version.

             

          Here are a few questions to clarify the doubts:

             

          1) Are all other components in the project also updated to the latest version?

             

          2) Is the "stdio.h" header included in the project when sprintf( ) function is used?

          • 2. Re: cy_boot update

            Hi Stoyan,

               

             

               

            I was able to test the code which you have mentioned at my end on PSoC5 Development kit.

               

            The project worked fine and the output was as expected. It was verified by displaying the values on an LCD.

               

             

               

            In the sprintf( ) function, when "%.3f" is used, then it must be remembered that the minimum size of the array declared should be = Number of Integers + Number of digits after decimal point (which in this case is 3) + 1 (for decimal point) + 1 (for '\0' to indicate the end).

            • 3. Re: cy_boot update

              The project is attached along with this comment.

                 

               

                 

              Regards,

                 

              dasg

              • 4. Re: cy_boot update
                YuxianL_01

                Hi,

                   

                This is an known issue of cy_boot_2.21 with PSoC5, please keep using cy_boot_2.20 while using PSoC5.

                   

                Regards,

                   

                Roy

                • 5. Re: cy_boot update
                  YuxianL_01

                  Hi Dasg,

                     

                  Your project is using cy_boot_2.20, but not 2.21 which comes along PSoC Creator 1.0 sp2.

                     

                  Regards,

                     

                  Roy

                  • 6. Re: cy_boot update

                    Hi Roy,

                       

                     

                       

                    Thanks a lot for bringing this to our notice.

                       

                    I have used cy_boot version 2.20 and didn't update it to version 2.21

                       

                     

                       

                     

                       

                    Regards,

                       

                    dasg

                    • 7. Re: cy_boot update

                      Hi,

                         

                      Thank you all for replying my post. Dasg, I knew the issue was not in the C program itself, that's why I didn't attach any program. Roy, I am going to stick to 2.20 version of the cy_boot for time being. I'd like to know is this something that you guys are working on, or not at the moment. I mean with the next update of the cy_boot will there be a fix for that problem.

                         

                      Thanks,

                         

                      Stoyan Karanfilov

                      • 8. Re: cy_boot update
                        YuxianL_01

                        Hi, Stoyan, We are working on this issue, but I am not sure it will be fixed in next release of PSoC Creator. The update from 2.20 to 2.21 of cy_boot is for PSoC3 typically.

                           

                        Regards,

                           

                        Roy