[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4688: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3823)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4690: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3823)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4691: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3823)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4692: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3823)
Parallella Community • View topic - execute the program on eCore twice

execute the program on eCore twice

Discussion about Parallella (and Epiphany) Software Development

Moderators: amylaar, jeremybennett, simoncook

execute the program on eCore twice

Postby howardhh » Tue Sep 23, 2014 3:43 am

Hi all,

In my program, I want to run the program on eCore twice. But it always stop at the second loop.
Do I have to reset the group each loop? Or something is wrong with the local memory at the second loop?
Any suggestion?
Thanks!
howardhh
 
Posts: 28
Joined: Fri Aug 22, 2014 1:50 am

Re: execute the program on eCore twice

Postby timpart » Tue Sep 23, 2014 6:57 am

When the core program returns from main, it executes TRAP and stops. This will be fixed in a future SDK release .

Tim
timpart
 
Posts: 302
Joined: Mon Dec 17, 2012 3:25 am
Location: UK

Re: execute the program on eCore twice

Postby notzed » Tue Sep 23, 2014 8:28 am

You could try just ending your main in "while(1);"; it will use more power when idle but should let e_start() reset the chip and re-call main(). Or just call e_reset_group() or e_resume() before calling e_start(). e_resume() will continue after a trap but it might be in a loop iirc.

Also note that data will not be reset so any static initialisers will appear not to be run. And only bss off-core will be cleared (if the linker script defines any).
notzed
 
Posts: 331
Joined: Mon Dec 17, 2012 12:28 am
Location: Australia

Re: execute the program on eCore twice

Postby howardhh » Tue Sep 23, 2014 1:40 pm

Thanks for your suggestion!

Actually, e_reset can make the program work. But I have just tried e_resume(), which also stops at the second loop.
Does this mean I have to call e_reset_group() in the loop? Is there any other way?
I think my problem is quite similar with stevenc.
howardhh
 
Posts: 28
Joined: Fri Aug 22, 2014 1:50 am

Re: execute the program on eCore twice

Postby aihaike » Wed Sep 24, 2014 12:29 am

I just try to do a e_reset_group before the e_start_group, and it works fine.
I see it as a trick in cause the program executes TRAP and stops as timpart mentioned.
To me we loose time doing so, and hopefully this will be fixed.
User avatar
aihaike
 
Posts: 31
Joined: Wed Aug 06, 2014 5:41 am
Location: Shanghai, China

Re: execute the program on eCore twice

Postby notzed » Wed Sep 24, 2014 2:58 am

notzed
 
Posts: 331
Joined: Mon Dec 17, 2012 12:28 am
Location: Australia

Re: execute the program on eCore twice

Postby howardhh » Wed Sep 24, 2014 6:24 am

Thank you, notzed!

I think e_reset_group() should be fine for the moment~
howardhh
 
Posts: 28
Joined: Fri Aug 22, 2014 1:50 am

Re: execute the program on eCore twice

Postby aihaike » Wed Sep 24, 2014 6:25 am

@notzed you are absolutely right, and it works fine that way anyway.
User avatar
aihaike
 
Posts: 31
Joined: Wed Aug 06, 2014 5:41 am
Location: Shanghai, China


Return to Programming Q & A

Who is online

Users browsing this forum: No registered users and 16 guests

cron