Page 7 of 11
Re: EV3 BCC / C software problem(s)
Posted: 25 Oct 2013, 08:41
by HaWe
so if I understand correctly, as C2011 Multitasking is not supportet, then
Code: Select all
#include <signal.h>
//Compile and link with -pthread.
pthread_create()
pthread_join()
pthread_kill()
is the only way to have Multi Tasking by BCC/C.
As I haven't used neither gpp nor Linux ever before:
1) what files have to be copied to the EV3 flash into which directory?
2) where can I find signal.h and in which dir has it to be copied?
3) what different files have to be copied to the current dir on the PC or into the include dir on the PC ?
4) where and how can I induce BCC to compile and link with -pthread ?
Re: EV3 BCC / C software problem(s)
Posted: 25 Oct 2013, 14:08
by holler
You should not try to use pthread until you've understood why killing a thread/process is a really, really bad idea.
Besides that it's a bad idea in general (so in nbc/nxc too), it's much worse to do so in plain C or C++.
You will be unable to clean up the mess which might have happend by killing a thread at whatever thing he just did.
Alexander Holler
Re: EV3 BCC / C software problem(s)
Posted: 25 Oct 2013, 14:37
by mightor
It's like shooting a horse while you're still riding it.
= Xander
Re: EV3 BCC / C software problem(s)
Posted: 25 Oct 2013, 14:40
by HaWe
I know it and I'm used to do it. To talk with Xander: I have acrobatic skills.
So replies just to my question would be appreciated, pls no lectures about the sense, just about the facts:
Code: Select all
#include <signal.h>
//Compile and link with -pthread.
pthread_create()
pthread_join()
pthread_kill()
...
1) what files have to be copied to the EV3 flash into which directory?
2) where can I find signal.h and in which dir has it to be copied?
3) what different files have to be copied to the current dir on the PC or into the include dir on the PC ?
4) where and how can I induce BCC to compile and link with -pthread ?
Re: EV3 BCC / C software problem(s)
Posted: 25 Oct 2013, 15:24
by totokan
doc-helmut wrote:I know it and I'm used to do it. To talk with Xander: I have acrobatic skills.
So replies just to my question would be appreciated, pls no lectures about the sense, just about the facts:
Code: Select all
#include <signal.h>
//Compile and link with -pthread.
pthread_create()
pthread_join()
pthread_kill()
...
1) what files have to be copied to the EV3 flash into which directory?
2) where can I find signal.h and in which dir has it to be copied?
3) what different files have to be copied to the current dir on the PC or into the include dir on the PC ?
4) where and how can I induce BCC to compile and link with -pthread ?
What the heck are you planning on doing that you need threads for?
Re: EV3 BCC / C software problem(s)
Posted: 25 Oct 2013, 15:33
by HaWe
that's not important, that's not the topic, just how to implement pthread to BCC.
As I meanwhile was told by Xander in a very intensive private lecture quite a bit shortened):
1) what files have to be copied to the EV3 flash into which directory?
- no -
2) where can I find signal.h and in which dir has it to be copied?
-already there -
3) what different files have to be copied to the current dir on the PC or into the include dir on the PC ?
- nothing -
4) where and how can I induce BCC to compile and link with -pthread ?
so 4) is left...
Re: EV3 BCC / C software problem(s)
Posted: 25 Oct 2013, 15:45
by holler
doc-helmut wrote:I know it and I'm used to do it. To talk with Xander: I have acrobatic skills.
So replies just to my question would be appreciated, pls no lectures about the sense, just about the facts:
That sounds like you've written the EV3 firmware.
Re: EV3 BCC / C software problem(s)
Posted: 25 Oct 2013, 15:48
by HaWe
please no clever comments, but I'd appreciate if you replied to the topic
Re: EV3 BCC / C software problem(s)
Posted: 25 Oct 2013, 15:50
by totokan
At this point, I'd eschew using BCC entirely and just write the makefiles and compile directly with the codesourcery ARM GCC compiler.
Re: EV3 BCC / C software problem(s)
Posted: 25 Oct 2013, 15:51
by HaWe
I have no idea how to do it, I just use BCC. That's what the topic is about.