[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/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/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 - Compiling Objective-C code for the Epiphany

Compiling Objective-C code for the Epiphany

Discussion about Parallella (and Epiphany) Software Development

Moderators: amylaar, jeremybennett, simoncook

Re: Compiling Objective-C code for the Epiphany

Postby GreggChandler » Wed May 10, 2017 1:59 am

Attachments
legacyesx.txt
Modified legacyesx.ldf (txt) file to create programs that run out of external memory
(16.13 KiB) Downloaded 1620 times
Makefile.txt
Makefile to work with legacyesx.ldf (txt) file
(2.11 KiB) Downloaded 1580 times
GreggChandler
 
Posts: 66
Joined: Sun Feb 12, 2017 1:56 am

Re: Compiling Objective-C code for the Epiphany

Postby CocoaGeek » Wed May 10, 2017 4:00 am

CocoaGeek
 
Posts: 29
Joined: Thu Apr 13, 2017 3:56 am

Re: Compiling Objective-C code for the Epiphany

Postby CocoaGeek » Wed May 10, 2017 5:16 am

... and here's the linker map output.
Attachments
output.map.txt
(49.12 KiB) Downloaded 1500 times
CocoaGeek
 
Posts: 29
Joined: Thu Apr 13, 2017 3:56 am

Re: Compiling Objective-C code for the Epiphany

Postby GreggChandler » Wed May 10, 2017 5:23 am

Thanks for the update. The "-Wl,--defsym=..." commands are only necessary if you want to build code for multiple cores--so you could try leaving them out for now. Legacy.ldf appears to default to the first core if they are not specified. However, you appear to have them correct so that probably is not really an issue. I am just trying to simplify the argument list.

The next step appears to be tracking down the assertion failure. I am wondering if the partitioned address space is still too small. I did not edit or revise any of the calculations. I did change the stack. It would also be worth tracking down -Os. I don't know which specific optimizations it executes. If it generates short calls, and the program is too big, that might be a problem. However, I don't know which specific optimizations it uses. Again, just an uninformed guess.

I forgot that --specs=nosys.specs was in my Makefile. It may not be necessary in your case. I don't use malloc() and friends, but I suspect Objective C will. But again, that should not affect linking, only execution.

According to Google, the error does occur on other architectures. At times it appears related to PIC, which you aren't specifying. Other times PIC appears to be the fix. I hope that I have not taken you too far afield. I need to reproduce the error somehow. I'll try and look up the assertion. I was hoping 796 was a line number within the source file--but not according to source I can currently find.
GreggChandler
 
Posts: 66
Joined: Sun Feb 12, 2017 1:56 am

Re: Compiling Objective-C code for the Epiphany

Postby CocoaGeek » Wed May 10, 2017 6:11 am

Same error when my library is compiled with -fPIC than without.
CocoaGeek
 
Posts: 29
Joined: Thu Apr 13, 2017 3:56 am

Re: Compiling Objective-C code for the Epiphany

Postby GreggChandler » Wed May 10, 2017 9:37 pm

Here is another interesting link regarding this message:

Have you tried a simple hello world type application?
GreggChandler
 
Posts: 66
Joined: Sun Feb 12, 2017 1:56 am

Re: Compiling Objective-C code for the Epiphany

Postby CocoaGeek » Thu May 11, 2017 4:20 am

You are correct, I have an external library which .o files I include in my library and I had forgotten to remove -fPIC from their compilation. Now it's linking without error :roll: ... however, the code isn't running on the core. If I use e-run on the device with the Epiphany executable I get an "illegal instruction at 0x108, program stopped with signal 4 (Illegal instruction)" error. Haven's tried to debug that yet.

Update #1: I have to use --e-external-fetch with e-run to get it to run (the illegal instruction was caused by that)
Update #2: A simple C based test runs just fine (even with your legacy.ldf), but linking my lib cause it to not run
CocoaGeek
 
Posts: 29
Joined: Thu Apr 13, 2017 3:56 am

Re: Compiling Objective-C code for the Epiphany

Postby GreggChandler » Thu May 11, 2017 11:01 am

It sounds like you are making progress. I wouldn't have expected any code at 0x108. I didn't try running with e-run. I could possibly try putting the stack back in external memory with legacy.ldf?

If it links but doesn't run, I would start to look at how malloc() and friends work. The specs stuff can impact this. I don't know what the "new lib" does here, as I do my own memory allocation. Obviously heap is important. I believe legacy puts the heap in external memory. Perhaps I broke that?
GreggChandler
 
Posts: 66
Joined: Sun Feb 12, 2017 1:56 am

Re: Compiling Objective-C code for the Epiphany

Postby GreggChandler » Thu May 11, 2017 6:01 pm

GreggChandler
 
Posts: 66
Joined: Sun Feb 12, 2017 1:56 am

Re: Compiling Objective-C code for the Epiphany

Postby GreggChandler » Fri May 12, 2017 2:14 am

Isn't e-run the simulator? Have you tried e-loader?
GreggChandler
 
Posts: 66
Joined: Sun Feb 12, 2017 1:56 am

PreviousNext

Return to Programming Q & A

Who is online

Users browsing this forum: No registered users and 5 guests

cron