A new way to do firmware development on programmable devices

Mark Saunders, Cypress

February 7, 2012

Mark Saunders, Cypress

Modifying an Existing Design
Imagine now that you wish to extend the design to detect minima on the input signal at the same time as you track peaks. This is a straightforward modification to the PSoC Creator design. Inverting the output of the comparator (i.e. make it high when the input voltage is below the reference) and routing that as the clock input to another mixer, which has a high voltage reference (Vdda) instead of ground, provides a trough-detecting circuit.

With a multiplexer in front of the comparator, the software is able to switch between detecting minimum and maximum voltages with the two mixers. The Start API for the new mixer, and the software to switch channels, needs to be called and this could create a problem if the integration was not sophisticated.

However, building the design automatically re-generates the library project (but not the workspace or application project files) and so, when uVision is launched again, the Trough_Mixer API files are immediately available to the software developer. Even though two separate tools are used to make edits, changes in both the hardware and software can be completed, built, and verified in just a few minutes.


Click on image to enlarge.

Figure 7: Modified Schematic Showing Simultaneous Peak and Trough Detection

One of the reasons why this approach to software development has not been seriously tried before is the inherent issue with two environments sharing files.

This is not so much a problem of two tools editing the same source file simultaneously – there are many approaches to this issue ranging from simple “sandbox” development to powerful source control systems – but actually managing the ownership of the project file for the software tool.

The uVision tool keeps a lot of information about a project in its uvproj file and does not expect to have another tool modifying it. The challenge becomes how you can reliably make changes to the project in one tool and maintain coherence with the other.

The short answer is that, for uVision, you don’t. Splitting the design into a library and an application means that the software developers can change whatever they like in the application without impacting the PSoC initialization and component API code. Similarly, PSoC Creator can update the hardware design in complete isolation from the application code.

About the only time after the generation of the original project files that PSoC Creator needs to change the application project is if the design team makes a dramatic change, such as switching to a new processor. PSoC Creator supports both the PSoC 3, an 8051-based device, and PSoC 5, which boasts an ARM Cortex-M3. You can switch platforms in a few minutes, just by choosing a new part number and re-building.

The tool switches compilers automatically and targets the new architecture. Understandably, this would create problems with an ARM-based application trying to link with an 8051 PSoC design. To avoid this problem, PSoC Creator watches for such changes when you are working with the IDE and notifies you to update the application project file.

This is achieved from the “Update device settings on an existing uVision application project” option in the usual Export dialog. The path through the dialog is very short; provide the application project file name and the tool updates that file with the new device type, compiler selection, and settings. It retains all your previous source code and so, after re-exporting, your project is ready to be migrated to the new device architecture.

Clearly, the integration of PSoC Creator with uVision is only a first step. There are several other high-quality IDEs available to software developers these days, and the strategy of enabling designers to use the tools of their choice hinges upon support for them all.

Stay tuned for announcements about new IDE support throughout 2012 and, perhaps more tellingly, look out for similar approaches from other programmable platform vendors. If you believe, like we do, that one tool cannot fit everyone’s needs, then surely the time is right for truly integrated approaches to software development on today’s sophisticated devices.

Mark Saunders is a Senior Product Marketing Manager at Cypress Semiconductor. He has a First Class degree from the University of Leeds, England, and over 20 years of experience in embedded software and intellectual property (soft IP). He specializes in the development, support and marketing of embedded software tools, real-time operating systems, protocol stacks and middleware.

< Previous
Page 3 of 3
Next >

Loading comments...

Most Commented

  • Currently no items

Parts Search Datasheets.com

KNOWLEDGE CENTER