Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » eTrice » argc/argv on embedded targets (Suppress access to arc/argv (arguments of main) for embedded targets)
argc/argv on embedded targets [message #1695343] Wed, 13 May 2015 14:58 Go to next message
Thomas Jung is currently offline Thomas JungFriend
Messages: 8
Registered: May 2015
Junior Member
Hi all,

the etrice main function will be generated with the signature:
int main(int argc, char** argv)
On most embedded targets the parameters will not be supplied. It would be a good idea to suppress access to the parameters to avoid unwanted behaviour.

Regards
Thomas
Re: argc/argv on embedded targets [message #1695357 is a reply to message #1695343] Wed, 13 May 2015 17:17 Go to previous messageGo to next message
Thomas Schuetz is currently offline Thomas SchuetzFriend
Messages: 31
Registered: January 2010
Member
Hi Thomas,
I was not aware of that problem.
We could create a #define in config/etRuntimeConfig.h and an #ifdef around the code for the arguments. Not beautiful but simple.

I guess we have to rethink the whole Idea of the static runtime configuration in the long run.

Thomas
Re: argc/argv on embedded targets [message #1695359 is a reply to message #1695343] Wed, 13 May 2015 17:21 Go to previous messageGo to next message
Thomas Schuetz is currently offline Thomas SchuetzFriend
Messages: 31
Registered: January 2010
Member
Just saw you already created a ticket:
https://bugs.eclipse.org/bugs/show_bug.cgi?id=466937

Further discussion there if needed.

Thomas
Re: argc/argv on embedded targets [message #1695365 is a reply to message #1695357] Wed, 13 May 2015 17:55 Go to previous messageGo to next message
Henrik Rentz-Reichert is currently offline Henrik Rentz-ReichertFriend
Messages: 261
Registered: July 2009
Senior Member
Hi Thomas,

I guess we should replace the generated main method with a simple
et_runSystem() method which is called by a user defined main method.

Henrik
Re: argc/argv on embedded targets [message #1695388 is a reply to message #1695365] Wed, 13 May 2015 23:16 Go to previous message
Thomas Schuetz is currently offline Thomas SchuetzFriend
Messages: 31
Registered: January 2010
Member
I agree that we should encapsule this one step more, but we should still generate a complete running system for prototyping.
Maybe we could suppress the generation of the main function (or the file with the main function) with a generator flag.

Thomas
Previous Topic:Mac OS X
Next Topic:runtime target support
Goto Forum:
  


Current Time: Fri Apr 19 18:39:08 GMT 2024

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

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

Back to the top