A new way to do firmware development on programmable devices
In this Product How-To article Mark Saunders describes a new methodology for doing firmware development for the Cypress’ Arm-based Programmable SoCs, using the company’s PSoC Creator in combination with Arm’s uVision IDE.
Programmable devices are really cool and powerful, if you are a hardware designer. If you are a software developer, they can be a real headache, giving that you’ll be charged with writing the firmware for this ever-changing target. Device vendors typically solve this problem by incorporating software development features into their tools to create an all-inclusive environment that claims to support both disciplines.
The difficulty with this approach is that it forces software engineers to adapt to the tools hardware designers use, a situation that is less than ideal when you consider the heavily skewed ratio of software to hardware designers on a typical project.
Sometimes a single tool does work, but often not well for a distributed team of engineers with sophisticated and mature development flows already in place. These engineers need tools that reverse-engineer their thinking and incorporate hardware design into existing third-party software development flows, such as Cypress’ PSoC Creator coupled with ARM’s uVision IDE.
This combination satisfies the needs of both sides, freeing hardware engineers to innovate in silicon without creating a software development bottleneck. Just as the programmable capacity and CPU performance of today’s programmable devices vary enormously, so does the size and make-up of the design teams that use them. It is still common for successful applications to be built by a single engineer with expertise in both hardware and software.
More and more often, however, products are being designed by small teams with fairly differentiated roles: the hardware experts handle device configuration and write just enough software to verify that the system works as expected, leaving the software team to develop the application code. These distributed teams may not work in the same building or even the same country for that matter.
Your Tools, Your Way
All of these users can benefit from an integrated tools approach to software development. The lone ranger typically does not have the time to learn a new tool. Small software groups have their favorite products and do not welcome new environments being forced upon them. Finally, multi-site teams have too much infrastructure investment in place to be able to slot in a new environment for every project based on the current silicon decision.
Put simply, where including software development in the hardware configuration tool is a nice-to-have feature, feature-rich and reliable support for commercial and other popular software IDEs is just plain essential.
Before going into detail about how software IDEs can be integrated into hardware environments, it is useful to understand a little about PSoC and its design environment. PSoC is a fully programmable embedded system-on-chip integrating configurable analog and digital peripheral functions, memory, and a microcontroller on a single chip.
While the technology is very different, with much more analog content, the design flow is similar to what you would see in today’s FPGA devices, especially those that integrate a hard microprocessor core. The PSoC Creator tool provides an extremely flexible visual embedded design methodology that includes preconfigured, user-defined peripherals, and hierarchical schematic entry.
When a design is built in the tool, many software files are created. The most visible of these are the API files generated for each of the components used and placed in the project. With easily remembered names like Counter_Start() and ADC_SetValue(), these APIs form a consistent, simple-to-use means of controlling the hardware peripherals without having to know all about the implementation details.
All good tools for programmable devices should generate the software interface because “by construction” is the only way to ensure efficient and error-free code. In addition to the APIs are the boot files, which include the code to configure the programmable array. These are files that applications always use but typically do not modify, and are an important part of the IDE export feature.
In addition to this hardware-centric functionality, PSoC Creator includes the usual software features developers have come to expect: source editing, project management, integrated compilers, device programming, and on-chip debugging. This is all very normal fare in a modern tool but the problem with this approach is simple; many people like using PSoC but not all of them want to use the Cypress software tool for application development.