1 2 Previous Next 15 Replies Latest reply on Jan 20, 2015 3:09 PM by user_14586677

    PSoC Creator C++?


      Hi all, I'm wondering what the current state of C++ support is in the latest versions of PSoC Creator?  I see some traffic about limited support, but that was quite some time ago.  Has anything improved?


        • 1. Re: PSoC Creator C++?

          Bob can comment on this but GNU, GCC is  open source so its support


          model is one of open source community.










          Regards, Dana.

          • 2. Re: PSoC Creator C++?

            As far as I can see, PSOC Creator 3.1 does not support C++, for example there is no choice for creating a c++ (.cpp) file in the "project/new item" menu and no editor support for C++ keywords highlighting. The underlying compiler such as GCC (depends on your configuration) can support C++ from decades (it supported C++ before supporting ARMv7-M).




            Furthermore, C++ is tricky to use when your platform has less than 256K of flash and less than 64K of RAM.







            • 3. Re: PSoC Creator C++?

              The demand for C++ is increasing and Cypress knows that, the customers voted for C++.


              So there is no question whether but when we will get C++. Since the current status is that all PSoC projects are written in C we have to consider how the switching to C++ is performed, how co-existence of the different language can be maintained and the re-writing of the component libraries and documentation will cost a lot of $$ and time.





              • 4. Re: PSoC Creator C++?

                Thanks folks.  So it sounds like one is still on their own for C++ though it is probably possible.


                To Bob's point, I think that is good news that it will probably be coming.  I think Cypress can look to some of the other tool / chip vendors and ecosystems for how to add support, how to handle having both, etc. I'm not sure it would have to be a total major rewrite, though...I don't see why most of the existing libraries and documentation can't stay the same?  Since C++ is "just" a superset of C, backwards compatible, etc.  Similar to having assembler libraries called from C functions, as things are today.


                Shooting from the hip here, I could be wrong.  Thoughts?

                • 5. Re: PSoC Creator C++?

                  I saw this online -
















                  Regards, Dana.

                  • 6. Re: PSoC Creator C++?

                    One year later, and still no C++ support.  I've been using PSoC since when CY8C26 came out.  I've migrated from 100% assembly to using C on the 3/5LP devices and now I am very much wanting/"needing" C++ support as well and hope it comes soon.  I may have to look at switching to a different IDE and program/debug interface on my next design.  Not sure which I would switch to though.  I have spent too much time banging my head on the keyboard with Eclipse, but it might be worth it for C++ support.

                    • 7. Re: PSoC Creator C++?

                      According the the response from a support case, this is barely on their radar and will not be included in their next major version of Creator.  I suggest that if anyone wants C++, they post to this thread to let them know how many of us are interested.

                      • 8. Re: PSoC Creator C++?

                        I would like to see C++ in Creator. Full stop.


                        On the other hand, we are talking about embedded systems, no operating system, no (or few) peripherals and limited number of internal components. So what will be the advantages we get from C++? Housekeeping might consume some of the valuable resources as flash and sram. A PSoC is not a Raspberry.





                        • 9. Re: PSoC Creator C++?

                          The definition of "embedded" gets a bit blurry.  My current project includes an RTOS, TCP/IP stack, control of a serially connected display unit with full-color touchscreen, 3 SPI, 1 UART, 1 CAN, and 2 OneWire interfaces, voltage and signal frequency measurement, data and event logging, and, of course, about a dozen simple digital IOs.


                          The term "embedded" is becoming less and less meaningful as it can be an 8-bit controller with 256 bytes of RAM and 2k of Flash or it can be a 5LP with 64k RAM and 256k flash.  I wouldn't want to use very much C++ at all on the former, but my current project could have been made much easier to handle with a few C++ features.

                          • 11. Re: PSoC Creator C++?

                            +1 for CPP also. The mbedded.ninja is interesting. 

                            • 12. Re: PSoC Creator C++?

                              Really Cypress? You guys do such awesome stuff with your PSOC series, and you have a pretty solid marketing campaign (CypressPSOC is pretty active on reddit), but you don't support something as fundamental as C++? If you were running your own compiler then sure, I would mildly understand as C++ is huge, but you are using ARM's fork of GCC! So the toolchain already supports C++, it's just that you have to allow the option of generating C++ files in the IDE and throwing the right flags at GCC (which currently has to be done manually) and fixing all the issues present in the other post in this thread.


                              Since you seem to have your own parser for auto complete and syntax highlighting, you could argue that C++ support for those will be too much work (though you will have to do it eventually, times are changing). How about instead you have an "Experimental" option in the IDE which allows generation of C++ files, all while lacking syntax highlighting? Then those of us who want to can fiddle with using Clion/Atom/vim/notepad for syntax highlighting and proper auto complete, as a glorified text editor.


                              And, c++ is most certainly usable for embedded. Sure, you shouldn't use the c++ implementation of strings, or exceptions, but on the other hand you get to use classes along with RAII, constexpr for compile time behavior while maintaining type safety (instead of preprocessor macors), namespaces, operator overloading, templates, the standard library (well, a decent chunk of it), and many other benefits. Not to mention, almost every vendor out there that makes MCU's or IDE's targeted towards MCU's supports C++ in one way or other (Keil, IAR, Atollic, Atmel, Freescale, NXP, even Microchip). Heck, even companies which create their own architectures like Adapteva with their 16 core Epiphany MCU, XMOS with their 4+ core MCU's, and Parallax with their 8 core propeller all support C++.


                              Some resources for those who found this post when googling "Cypress C++" like I did and are considering C++ for embedded, feel free to PM me for links to various resources since mollom thinks I am spamming. Instead, here is a single video show casing C++11 for small embedded devices. Don't forget, Arduino which uses an Atmega328P can handle c++ even.



                              • 13. Re: PSoC Creator C++?

                                I will add my vote for C++. I've told the sales reps that C++ support is a requirement for my company to use PSoC parts in production products. We have successfully used C++ on STM32 projects with 256 KB of FLASH and a few KB of RAM. You can use C++ in embedded systems as long as you fully understand how the code you write will be compiled. 


                                We've tried to compile a test project for PSoC using standard GNU ARM tools, but that has fallen flat on it's face for numerous reasons. 


                                Hopefully this will happen sooner than later.

                                • 14. Re: PSoC Creator C++?

                                  Yes I also vote for C++. Please Cypress....

                                  1 2 Previous Next