Does anybody use Component Wizard?

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Does anybody use Component Wizard?

Jump to solution
1,743 Views
jgirard1
Contributor III

I don't see anything in these forums about Component Wizard.  Does anyone actually use the thing?  It is not the most intuitive thing to understand and there is not much written about it on the Internet.

 

The help files are sort of limited and not very practical for someone who doesn't already know how to use it.  The demos in the help files are very basic and do not show the more advanced features.

 

You cannot get access to the existing components to see how they are created.  This would be the best thing for me.

 

Is there something somewhere that details everything about Component Wizard?

0 Kudos
1 Solution
1,361 Views
jimtrudeau
Senior Contributor I

Here's a place to check out some components. http://www.steinerberg.com/embeddedcomponents/

 

These were created by a colleague. It will at least give you access to some of what you'd like to see. These are wide open. In the meantime, I'll see what I can dig up from the team relative to the macro language, tst and chg files and usage. This is a very deep/technical area. I am actually rather tickled you're playing with it. Hope you don't mind if I contact you directly.

 

 

View solution in original post

0 Kudos
6 Replies
1,361 Views
jimtrudeau
Senior Contributor I

There is no doubt this is less used. It is for creating components, and most people use components, not create them. I'll pass the comments about documentation shortcomings into the team. This matters A LOT to me, because we're putting a lot of emphasis on component creation in the future. This is in fact an undersold capability of the tool. You can package up software libraries quite neatly using this feature.

 

I can address one thing. You can access existing components quite nicely. In the Wizard, File->Open->Component. In the list, pick one. For example, I'm looking at  the SynchroMaster component. It's read only (don't want you messing with the stuff we provide), but you can see everything about how it's put together. For example, if I click the Documentation tab, I can see for information around Properties, Methods, Events, and Constants. This is the information of context sensitive help in the Component Inspector. There's one thing you can't see about the provided components, which is the "Driver" tab - thats where you creat and edit code generated for the methods handled by a component.

 

Let me see if I can come up with some components I can share here that you can pick apart and play with.

0 Kudos
1,361 Views
jgirard1
Contributor III

I understand the basics of Component Wizard and I have been trying to create both new components and inherit from others.  My knowledge is limited with the tool and I find myself up against a wall because I don't know the advanced capabilities, primarily it is with the macro language.  The help file is written as a reference and not as a teacher.

 

I also found a Freescale Power Point presentation about using Component Wizard, but again, it is very basic and without the moderator presenting it, not everything will be easily understood.

 

I realize the potential with Component Wizard and I think Processor Expert is fantastic.  I am desperately trying to learn Component Wizard and apply it to build up my libraries.  I primarily work on higher-level software modeling using Matlab, Simulink and Stateflow.  Using autocoding tools, I can develop software so much more quickly.  I like Processor Expert because everything is high level and abstracted from the hardware.  I can develop the hardware so much more quickly with this tool.   Now I want to bring everything together and Component Wizard needs to play a pivotal role in that.

 

The parts of the existing components that I would like to see are related to the driver code, the TST and CHG files.  I need to see how the macro language is applied in a real application.  The best way for me to do that is to look into the driver code and see and understand it that way.  It puts everything into context.

0 Kudos
1,361 Views
BlackNight
NXP Employee
NXP Employee

You might have a look at the components published at http://www.steinerberg.com/EmbeddedComponents/

Some components are very basic and pure software (e.g. Utility), others more complex using inheritance and as well the CHG and TST features (e.g. the one for FreeRTOS).

 

The tutorial in the help file is a useful start to learn things. But I can tell that I have learned things from just doing it and trying things out

 

BK

0 Kudos
1,361 Views
jgirard1
Contributor III

The link is helpful overall for general software component creation.  It helped understand the TST and CHG files.  However, it is not very low-level and didn't help me understand how to interface and determine user selected registers through inherited processor components.

 

If I inherent from an existing processor component and a user selects a certain peripheral by name, e.g. TPM1 or TPM2, etc., there is usually a whole bank of registers associated specifically with that peripheral.  The actual driver code will need to know specifically which registers to generate code for.  Within the driver code, I can determine which peripheral the user has selected in the property sheet, but what I don't understand is how does this translate into the specific bank of registers? 

 

Do I need to use a ton of %if statements within the driver code to switch-case the selected peripheral to direct the macro processor to the specific register group code?  That seems like a really cumbersome and error prone way of doing things.

 

The only other thing I can think of is to examine the user selected peripheral and then try to literally build the register names using local macros.  I can then use these local macros within the actual driver code.  The only problem is I'm not sure if the macro language is powerful enough to look at certain characters of a string.

 

0 Kudos
1,361 Views
BlackNight
NXP Employee
NXP Employee

Hello,

Accessing properties from inherited stock components is not so easy: at least you need to know the symbol name to access it. You get the symbol name if you load the component into the component wizard and look at the properties. I think I never tried to get the name of the selected peripheral or pin, that's something an expert from the Processor Expert team needs to answer.

 

To see how you can access the properties in another component (as an example), have a look at the Timeout component, which accesses the FreeRTOS component (both from http://www.steinerberg.com/EmbeddedComponents/).

If you enable the RTOS in the Timeout, then it gets the tick period from the RTOS component.

The symbol for the counter tick period is %CounterTickPeriod in the Timeout component.

Here is how it is used in theTimeout component:

 

#define %'ModuleName'_TICK_PERIOD_MS  \
%if defined(RTOS)
  (1000/%@RTOS@TickRateHz)                                       %>40 /* Tick period in milliseconds as defined in RTOS component properties, at which %'ModuleName'.%.AddTick() is called */
%else
  %CounterTickPeriod                                             %>40 /* Tick period of timeout counter in milliseconds, as specified in component properties */
%endif

 

The Timeout component inherits the RTOS component, and it can access the RTOS property with

%@RTOS@TickRateHz

which is this one:

Which is defined as this:

 

Hope that helps.

 

BK

0 Kudos
1,362 Views
jimtrudeau
Senior Contributor I

Here's a place to check out some components. http://www.steinerberg.com/embeddedcomponents/

 

These were created by a colleague. It will at least give you access to some of what you'd like to see. These are wide open. In the meantime, I'll see what I can dig up from the team relative to the macro language, tst and chg files and usage. This is a very deep/technical area. I am actually rather tickled you're playing with it. Hope you don't mind if I contact you directly.

 

 

0 Kudos