Skip to main content



      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 10:58 Go to next message
Eclipse UserFriend
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 13:17 Go to previous messageGo to next message
Eclipse UserFriend
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 13:21 Go to previous messageGo to next message
Eclipse UserFriend
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 13:55 Go to previous messageGo to next message
Eclipse UserFriend
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 19:16 Go to previous message
Eclipse UserFriend
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: Tue Jul 15 08:06:37 EDT 2025

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

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

Back to the top