Book a Demo

Author Topic: embedded systems workflow after EA  (Read 8097 times)

OwenInCanada

  • EA User
  • **
  • Posts: 78
  • Karma: +0/-0
  • have the right tool for the job
    • View Profile
embedded systems workflow after EA
« on: January 07, 2008, 08:10:31 am »
Friends,

I really want to buy EA and use it on my current project, but the following is unclear to me.

In broad terms, what is the workflow that takes you from an EA design to an embedded systems code on a target machine?

I have used Rational tools with C++, but I have not used EA. I suppose the workflow might be something like this.

1. make a UML design in EA
2. generate EA model into some target language (e.g. C++)
3. pull the generated code into the IDE of a cross-compiler for your target hardware

The gap is that many cross compilers use C.
EA does not generate C; it generates C++.

What is the nature of the glue that is missing here?
Is it entirely about choosing a C++ cross-compiler?
(What is a good choice for MSP430?)
Should I expect round trip engineering to work in an embedded context, or should I expect to do a "one time only" effort of handcrafting the EA output into the cross-compiler?

Many thanks for answers or pointers where to educate myself on this. I don't need to turn myself into an embedded engineer, others will likely do the development. My main aim to ensure that I'm not taking an irrecoverably incorrect step by choosing EA.

EA marketing materials suggest EA is a "disruptive" force in the emebedded market, and yet google of "Enterprise Architect msp430" is remarkably quiet and uninformative.

Kind regards,

Owen

«Midnight»

  • EA Guru
  • *****
  • Posts: 5651
  • Karma: +0/-0
  • That nice Mister Grey
    • View Profile
Re: embedded systems workflow after EA
« Reply #1 on: January 07, 2008, 08:24:39 am »
Hi Owen,

Good to know I'm not alone here in the Frozen North.

I'm not surprised that you didn't get much on your Google search. EA is a UML tool, but you're asking for references to coding for a specific processor. Not a promising target.

Open a project in EA - any project will do, even a new one, as long as you have one open. Now from the main menu choose Tools | Options | Source Code Engineering. Not very far down the dialog you'll see a Default Language for Code Generation drop-down. I notice that C is on the list. So too is there a set of code generation options for C, which you can reach by clicking the C entry under Source Code Engineering on the left-side tree.

I don't think there are too many people using EA for embedded code. But there are definitely some. Search this forum for other threads dealing with this. Perhaps that will give you some insight that will help make your decision easier.

As for your workflow, you'll need to modify it to use C in step 2, removing the gap.

HTH, David

HTH, David
No, you can't have it!

OwenInCanada

  • EA User
  • **
  • Posts: 78
  • Karma: +0/-0
  • have the right tool for the job
    • View Profile
Re: embedded systems workflow after EA
« Reply #2 on: January 07, 2008, 06:09:19 pm »
Thanks David, that's good news.

Mea culpa, I hadn't checked the EA menu for C (my trial expired). The EA page says "many popular languages, including C++, C#, Java, Delphi, VB.Net, Visual Basic, ActionScript and PHP", and that was my miscue.

Do you think its a bad idea to use EA for embedded code?
I wanted to use SysML to help me develop the requirements of an embedded device. Likely includes statemachines.
And perhaps use EA to understand the API that the hardware must support. And use EA to generate code to target that API.

I will report back if I have any success!

Regards,

Owen


ufechner

  • EA User
  • **
  • Posts: 85
  • Karma: +0/-0
  • I love YaBB 1 Gold!
    • View Profile
Re: embedded systems workflow after EA
« Reply #3 on: January 08, 2008, 01:06:05 am »
We are using EA for embedded code (8 Bit MCU's).

I wrote a code generator in python, that generates C header files from EA Classes.

Writing a code generator, that generates code from state machines should be possible, too.

If you want to map object orientated constructs like inheritance to C, there are many different possible ways, and you will often need a custom code generator (the EA code generator itselfs maps classes to C modules and does not support inheritance).

There are other tools available on the market like Rhapsody, that give better support for embedded development, but they cost probably more than 5000 $, so this is a different categorie than EA.

Regards:

Uwe Fechner

«Midnight»

  • EA Guru
  • *****
  • Posts: 5651
  • Karma: +0/-0
  • That nice Mister Grey
    • View Profile
Re: embedded systems workflow after EA
« Reply #4 on: January 08, 2008, 04:20:26 am »
Quote
...
my trial expired...
I wanted to use SysML to help me develop the requirements of an embedded device. Likely includes statemachines.
And perhaps use EA to understand the API that the hardware must support. And use EA to generate code to target that API.
...

Owen,

You can write to Sparx Sales to ask for an extension of your trial. You might also want to try the SysML add-in, which is available for an additional (reasonable) price. I have not tried it for embedded systems, but it might help you.

As I said, do a search of the forum - all sections - for hints on what others have done with embedded software. You can do this before you start another trial. Be persistent in your searches, and try different keyword combinations. The forum software can be difficult about searching at times, so keep at it.

HTH, David
No, you can't have it!

OwenInCanada

  • EA User
  • **
  • Posts: 78
  • Karma: +0/-0
  • have the right tool for the job
    • View Profile
Re: embedded systems workflow after EA
« Reply #5 on: January 11, 2008, 10:47:59 am »
I discovered that EA does not (yet) generate code for state machines. It is in the FAQ here:
http://www.sparxsystems.com/support/faq/code_generation.html

Quote
Generation of source code from behavioral diagrams

Currently EA does not generate source code for behavioral diagrams such as activity and state diagrams. We have requests from a number of users to implement this functionality and plan to add this in a future release of Enterprise Architect.


(at EA Version 7.0 build 818 )

This may dampen interest in the embedded community. Though certainly many benefits of UML design process remain.

Regards,

Owen

«Midnight»

  • EA Guru
  • *****
  • Posts: 5651
  • Karma: +0/-0
  • That nice Mister Grey
    • View Profile
Re: embedded systems workflow after EA
« Reply #6 on: January 11, 2008, 12:17:54 pm »
So it seems Owen,

But there might still be a couple of saving graces.

First, there might be a state machine code generator on the EA Wiki - it's been so long I simply don't remember if it was state machines or something else.

Second, you could always write your own via an add-in. Given that you are working with a specific cross-compiler, and sound like you have some kind of corporate standards in place, this might not be as daunting as it first seems. You have likely narrowed down the 'shape' of the code you need, so a generator could be much more straightforward than a general purpose engine.

David
No, you can't have it!

OwenInCanada

  • EA User
  • **
  • Posts: 78
  • Karma: +0/-0
  • have the right tool for the job
    • View Profile
Re: embedded systems workflow after EA
« Reply #7 on: January 11, 2008, 09:25:19 pm »
May I ask where is the EA wiki?

I found a url http://wiki.eausergroup.org but I cannot access it. Do I need to be a registered user?

(I am in Ottawa too and waiting for more snow :) )

Thanks,

-Owen

«Midnight»

  • EA Guru
  • *****
  • Posts: 5651
  • Karma: +0/-0
  • That nice Mister Grey
    • View Profile
Re: embedded systems workflow after EA
« Reply #8 on: January 12, 2008, 03:24:08 am »
No problem Owen,

Open the 'sticky' thread at the top of the Automation section of the forum. Read the signature line at the bottom of the first post. The user group is getting rather aged, and the Wiki has been taking up the slack.

David

PS: Be patient; it looks like we'll get more on Monday. In the meantime you're welcome to my portion of the ice and slush.

[EDIT: Sorry Owen - you had the correct address all right. I'll see if I can figure it out.]
« Last Edit: January 12, 2008, 06:13:23 am by Midnight »
No, you can't have it!

Bokkie

  • EA User
  • **
  • Posts: 80
  • Karma: +0/-0
  • Lima Bravo!
    • View Profile
Re: embedded systems workflow after EA
« Reply #9 on: January 14, 2008, 03:59:52 am »
Quote
I discovered that EA does not (yet) generate code for state machines. It is in the FAQ here:
http://www.sparxsystems.com/support/faq/code_generation.html


(at EA Version 7.0 build 818 )

This may dampen interest in the embedded community. Though certainly many benefits of UML design process remain.

Regards,

Owen

Use the search Luke. Search the forum: the answer is there. You will find hints on how to create a statemachine transformation. But I would suggest that you build a plug-in that does the job - much easier & maintainable.
Lima Bravo!

OwenInCanada

  • EA User
  • **
  • Posts: 78
  • Karma: +0/-0
  • have the right tool for the job
    • View Profile
Re: embedded systems workflow after EA
« Reply #10 on: January 14, 2008, 07:06:43 am »
Thank you, yes, search is my friend.

I have found some suggestions in the Forum, but I have not yet been able to access the EA wiki (http://wiki.eausergroup.org)

There is a nice Dr. Dobbs article by Miro Samek on using C to implement HSMs in embedded systems
http://www.ddj.com/embedded/188101799.
Also http://www.ddj.com/cpp/184402040 for the C++ minded.

At this point I need to choose my tools and work an example. Suggestions are still welcome. Thanks.

Regards,

Owen

revdev

  • EA User
  • **
  • Posts: 27
  • Karma: +0/-0
  • Love this stuff.
    • View Profile
Re: embedded systems workflow after EA
« Reply #11 on: January 15, 2008, 08:49:19 am »
I am using EA on an embedded C project.  We do not generate code, but have modeled the whole system, including multiple cooperating state machines.

According to the Executable UML book and MDA, etc., I have developed a software architecture to support the models.  The architecture runs on 8-bit and 16-bit processors and there is no inherent reason why it shouldn't run on an MSP430.

What is your toolchain?  Rowley supports C++ on the MSP430.

I would be happy to discuss it.  If you're interested, email me at [email protected].

re-Vision Development