Skip to main content



      Home
Home » Modeling » eTrice » generating code for Keil compiler(error: #268: declaration may not appear after executable statement in block)
generating code for Keil compiler [message #1008588] Wed, 13 February 2013 03:31 Go to next message
Eclipse UserFriend
Hello,

I'm pretty new to eTrice and I just want to find out, if eTrice code-generation would fit in our developement process which uses the Keil toolchain.

Now I've tried the HelloWorld example from eTrice documentation homepage. I set up a Keil project to compile the generated code, so far. Unfortunately, Keil seems to have its own rules, that declaration should be at the beginning of a block, while eTrice generation just puts it, where it first appears. So, when compiling, I get a message:

error: #268: declaration may not appear after executable statement in block

Is there a possibility, to make the generator put declarations at the beginning of a block?

thx,
Stefan Confused
Re: generating code for Keil compiler [message #1008648 is a reply to message #1008588] Wed, 13 February 2013 07:15 Go to previous message
Eclipse UserFriend
Hi Stefan,

we have been aware of this problem.
A strictly ANSI-C compliant compiler requires that variable declarations only occur at the beginning of a block.
But it shouldn't be much work to get that fixed.

Could you please file a bug for this?

Thanks,
Henrik

Am 13.02.2013 12:27, schrieb Stefan St:
> Hello,
>
> I'm pretty new to eTrice and I just want to find out, if eTrice code-generation would fit in our developement process which uses
> the Keil toolchain.
> Now I've tried the HelloWorld example from eTrice documentation homepage. I set up a Keil project to compile the generated code,
> so far. Unfortunately, Keil seems to have its own rules, that declaration should be at the beginning of a block, while eTrice
> generation just puts it, where it first appears. So, when compiling, I get a message:
>
> error: #268: declaration may not appear after executable statement in block
>
> Is there a possibility, to make the generator put declarations at the beginning of a block?
>
> thx,
> Stefan :?
Previous Topic:self transitions
Next Topic:TimingService generation
Goto Forum:
  


Current Time: Tue Apr 29 06:56:05 EDT 2025

Powered by FUDForum. Page generated in 0.25056 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top