Writing text to Component Inspector 'Status' column from within CHG file.

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

Writing text to Component Inspector 'Status' column from within CHG file.

Jump to solution
939 Views
jgirard1
Contributor III

I am creating beans using Component Wizard.  In the CHUG file, I want to write text to the third 'status' column of the Component Inspector.

 

For example, an integer property has a value of 1 to 100.  In the status column I want to print out the integer value plus 'ms' appended to indicate the timing units.  So when the user enters 5 in the box, the 'Status' column will show '5 ms'.  Processor Expert already does this for many built-in beans. 

 

I cannot find the command, feature name or property to do this.

 

How do I do this?

0 Kudos
1 Solution
742 Views
BlackNight
NXP Employee
NXP Employee

I wanted to do this for a long time too, but now I have found out how to do this:

Assuming you have a property named 'MyPropertyName', and you want to show 'MyTextToShow', then it is:

 

%set MyPropertyName ExtraText MyTextToShow

 

The 'magic' word is 'ExtraText' (instead of 'Value' which is one of the other keywords).

 

Hope that helps,

BK

View solution in original post

0 Kudos
6 Replies
743 Views
BlackNight
NXP Employee
NXP Employee

I wanted to do this for a long time too, but now I have found out how to do this:

Assuming you have a property named 'MyPropertyName', and you want to show 'MyTextToShow', then it is:

 

%set MyPropertyName ExtraText MyTextToShow

 

The 'magic' word is 'ExtraText' (instead of 'Value' which is one of the other keywords).

 

Hope that helps,

BK

0 Kudos
742 Views
jgirard1
Contributor III

Thanks!  That worked.

 

It is really sad that the documentation for Component Wizard is so very poor.  It is a fantastic feature.  I have been using it to import old ANSI C code to make new beans and build up a library of reusable components.  I am also using it to import new auto generated ANSI C code from Matlab/Simulink models.  With Processor Expert, it allows me to easily configure and sew all the pieces together in a graphical and visual way.  By using Component Wizard it allows me to easily and quickly get a project up and running by leveraging standard software that I have already created.

 

The problem with this fantastic feature is that it is almost impossible to figure out how to fully utilize all the features, primarily because the documentation in the help file is very limited, missing a bunch of features and has tons of spelling and grammar errors.  There is also next to nothing on the internet about it.  The only things that I find are very basic and do not go into the more advanced features.

 

In my opinion, if Component Wizard was easier to understand and use, if it was promoted more as a prominent feature of Processor Expert and if it wasn't buried within the Professional Suite that you have to pay $1000 to enable the use of; then everyone would be using this product for everything, which in turn means that everyone would be using Freescale micros.

 

I don't understand why this feature is only enabled within the expensive Professional Suite.  That almost seems counter productive at getting people to use these software tools.  It is a hinderance in the user's software development process to not have this feature enabled as a base feature.

 

That is the thing, if you give away great free software tools for your products, then everyone will buy your hardware products.  You can't make much money on a one-time purchase of a software suite, but you can keep making money on sales of hardware micros over and over.

 

If this product were easier to understand and more accessible, then more professionals and hobbyists would be using it instead of the competing Microchip and Atmel products.

 

I have used Motorola/Freescale and Microchip products for almost 25 years in the automotive industry and I’d have to say that this Component Wizard is on of the most difficult tools I have ever struggled with primarily because of the poor and lack of documentation.  However, since I see great potential with it, I persevered and have slowly figured it out and learned more about it.  Now I truly enjoy it immensely.  At this point I have been won over and now I am about ready to completely abandon Microchip altogether.

 

This is the point that I am trying to make.  I am an experienced developer for almost 25 years and have seen many other products come and go.  Since I have slowly figure it out I have been won over by this product.  Now, if it were just easier for everyone else, then everyone else could be easily won over as well.

0 Kudos
742 Views
carxander
Contributor II

I completely agree with Jerry. The information about CDE is very poor :smileysad:.

I need to know how to set a calculated value in a property from CHG file, something like:


%set Property Value (propA/propB)

but it doesn't work.

0 Kudos
742 Views
BlackNight
NXP Employee
NXP Employee

I use a tmp variable, like this:

%:tmp=%aPropertyVal

%:tmp*=%bPropertyVal

%set cPropertyVal Value %tmp

I had not set anything like this in my .chg files. But in any case, it might help if you look at my examples on ErichStyger/mcuoneclipse · GitHub

In the help file I had this:

Expressions

Evaluation of expressions is done in real numbers. For integer operations the value is rounded to 32-bit signed integer.

  • %:{def_name}{operator}{number}[;{text}] text is ignored. Expression is evaluated and the result is assigned to macro def_name
  • %:{def_name}?={number},{number1}:{number_1},{number2}:{number_2}, .. ; converts value number using table: if number is equal to number1 then the result is number_1, if number is equal to number2 then result is number_2 etc. The result is assigned to macro def_name. Error is reported to Processor Expert Error window if the value is not found in the table.

Example

   %:a=0
   %:a+=1
   %:b?=%a,0:3.1415,1:6.2830

0 Kudos
742 Views
carxander
Contributor II

It works nice! Thanks Erich!

I'm following your blog for almost 1 year. It will be awesome that you post tutorials about basics of CDE. The help files are not as extensive and explicit as I would like, at least for me.

0 Kudos
742 Views
jimtrudeau
Senior Contributor I

In many ways you are my ideal user, and it saddens me that we have disappointed you.

 

HOWEVER, take heart. Your message about documentation and ease of use is falling on fertile ground. This message is going straight to the engineering lead building the replacement for the Component Wizard. It won't happen soon enough to help you, and I want to thank you for seeing the value and persevering through the challenges to get to the gold at the end of the rainbow. My job is to make it less of a challenge to see it, and reach it. I'm going to use you as an object lesson. :smileyhappy:  Let's NOT do this! Let's do WAY better with the new Component Development Environment.

 

 

0 Kudos