Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob

Software Development Models for PSoC 6

Software Development Models for PSoC 6

JamesT_21
Moderator
Moderator
Moderator
10 solutions authored 5 solutions authored First solution authored

In Software Enablement for PSoC 6 – What to Expect I talked about what the Peripheral Driver Library (PDL) is. In PDL 3.0 – Designed for Flexibility I described the high-level design that supports multiple peripherals working on either core and operating on multiple data streams. You can use the PDL to take advantage of the power inherent in the PSoC 6 family, while simplifying software development.

 

There is an entirely different level of flexibility, and that's your choice of development tools. Until you get your hands on the PDL 3.0, this remains theoretical. But you’ll have some choices.

 

First, a tiny bit of background on the Cypress development tools. Then we’ll get back to PSoC 6.

 

Cypress provides PSoC Creator, an integrated design environment. If you aren’t familiar with PSoC Creator, let me describe it briefly. It enables the concurrent design of both the hardware system and the associated firmware. You drag components into a design, configure them and (when necessary) wire them together. You use a friendly UI to manage component configuration, pin assignments, system clocks, and interrupts. PSoC Creator is an expert system, and analyzes your design for conflicts or potential problems. Based on your design, PSoC Creator generates configuration and initialization code that you can use when writing the firmware. It supports iterative development – change the design, the generated code changes to match. PSoC Creator is free. It runs on the Windows OS.

 

PSoC Creator is a really good tool, and I thought that long before I joined the Cypress team. I have worked with code generators in one form or another for years, and I really like them. However, a fundamental principle that I subscribe to is, “your mileage may vary.” As much as I like PSoC Creator, you may not. We’re all about enablement, not about limits, and that includes your choice of IDE. This flexibility is designed into the PDL. We won’t make you change IDEs.

 

At a high level there are three paths you can take when you develop code using the PDL for PSoC 6.

 

Use PSoC Creator from beginning to end.

Use it for the system design, and as a development environment for your software. It includes a compiler and linker, a programmer to download the executable to the platform, and a debugger. It has all the features you would expect to find in a good IDE, like code browsing.

 

Use PSoC Creator generated code in your preferred IDE.

There are a couple of ways to do this. For supported IDEs (IAR Embedded Workbench and Keil µVision tools are on the list), PSoC Creator has defined an export/import process for project files. For any IDE, even if not “officially” supported, you can add PSoC Creator generated source files to the project file in your preferred IDE.

 

Use your preferred IDE from beginning to end.

While PSoC Creator can handle a lot of the system configuration for you (like clocks, setting up interrupts, and so forth), you absolutely can do this yourself. The PDL is, after all, a source code library. Just use the files you need. For example, the PDL includes code to manage the system and peripheral clocks. When PSoC Creator generates code to do this, it uses the PDL function API to get the work done. You can use the PDL source code directly, rather than the generated code.

 

When you use a third-party IDE from beginning to end, you lose access to only one PSoC feature. PSoC 6 devices have universal digital blocks (UDBs). A UDB contains programmable logic devices that enable you to build logic at the hardware level that links other hardware in your design, or to create a stand-alone block that performs a new function. If you want to develop a UDB, you must use PSoC Creator.

 

Of course, in the “real” world things can be a lot fuzzier. These three paths are real, but you can also find your personal sweet spot among these choices. For example perhaps you prefer to use snippets of code from the generated source files rather than complete files (a complex configuration structure perhaps). Or you like the PDL driver for one peripheral, but intend to create your own for another peripheral because of your unique requirements.

 

All of this is possible. The PDL is an enablement tool. You get all the source code. You can use it as you see fit.

 

Finally, you should be aware that choosing to use PSoC Creator components in your design presents some interesting benefits, and tradeoffs. I talk about that in a separate post, PSoC 6 Components and PDL Drivers.

1337 Views
Comments
Anonymous
Not applicable

Hello,jett

     Will there be a related tutorial?

JamesT_21
Moderator
Moderator
Moderator
10 solutions authored 5 solutions authored First solution authored

What would you like a tutorial to cover? How to use PSoC Creator should be OK, we have lots of collateral on that.

How to use a 3rd-party IDE.... well, that's not something we should do, not our product.

How to use PSoC Creator configuration code in your own IDE.... that's something I think we should do. Can't promise, but I'm proposing that internally. At the moment, I'm planning an app note on this topic, not really a tutorial, but something that covers all the choices, and how to do it.

BUT.... you may have something else in mind. Let me know, I'm all ears. Makes me look funny, but l Iisten well.

Anonymous
Not applicable

1. I mean what you mentioned above,whether there are corresponding guides to achieve these three methods.

2.Will PSoC Creator support JLink?

3.When I use PSoC Creator 4.0.1 programming, often pop-up "Assertion failed"! dialog box, especially  the macro definition.

pastedImage_0.png

JamesT_21
Moderator
Moderator
Moderator
10 solutions authored 5 solutions authored First solution authored

The PDL 3.0 User Guide will cover how to develop code using the PDL, using a third party IDE or using PSoC Creator (which has some advantages). And as noted I hope to create an app note on the details of integrating PSoC Creator generated code into a 3rd party IDE.

As far as I know PSoC Creator does not support the JLink probe.

I'd recommend you pursue item 3 in the Creator forums... as that's not related (at least right now) to PSoC 6.

http://www.cypress.com/forum/psoc-creator-software

Anonymous
Not applicable

Hello jett,

     1.Thank you for your reminder.I will pursue item3 in the Creator forums.

     2.This is a good news, expect appnotes to post it soon.

HaoW_21
Employee
Employee
First like received Welcome!

Hi Jett,

So if customer needs to use UDB and prefer to use IAR or Keil, he only has the 2nd choice, right?

Hao

JamesT_21
Moderator
Moderator
Moderator
10 solutions authored 5 solutions authored First solution authored

Yes. You have to design the implementation of the UDB in PSoC Creator. I'm expecting to dig into this in some detail in the next couple of weeks. If I learn anything different, I'll certainly post info here in the community.