Developement under Linux

Discussion to talk about software related topics only.
stephan
Posts: 10
Joined: Fri Feb 26, 2010 1:58 am
Location: Germany

Developement under Linux

Post by stephan »

Hello,

is there any documentation how to develope netburner applications (for SB70LC) under Linux (Ubuntu) with the GNU toolchain?

Thanks,
Stephan
rsg
Posts: 54
Joined: Thu May 15, 2008 5:36 am

Re: Developement under Linux

Post by rsg »

Good question!

Historically, this has come up a time or two, and the answer usually ends up as yes, it's possible, but not supported for business reasons. That's certainly understandable, but perhaps the community could provide the resources? For example, Netburner has a wiki, though it doesn't seem we can edit there. Perhaps they could set up a page that people could contribute to, specifically a How-To for developing under Linux... Of course, other How-Tos might follow...
stephan
Posts: 10
Joined: Fri Feb 26, 2010 1:58 am
Location: Germany

Re: Developement under Linux

Post by stephan »

I am able to use the codecomp.exe utility under linux within wine as well as the AutoUpdate.exe tool. Both works fine.

My current problem is, to build the cross-compiler. I am also able to extract the g++ compiler configuration of the windows binary:

Code: Select all

me@me:~/.wine/drive_c/nburn/gcc-m68k/bin$ wine m68k-elf-g++.exe -v
Using built-in specs.
Target: m68k-elf
Configured with: /usr/nbmingw/sources/gcc-4.2/configure --build=i686-pc-linux-gnu --host=i686-pc-mingw32 --target=m68k-elf --enable-threads --disable-libmudflap --disable-libssp --disable-libgomp --disable-libstdcxx-pch --with-arch=cf --disable-threads --with-gnu-as --with-gnu-ld --enable-languages=c,c++ --disable-shared --with-newlib --disable-nls --prefix=/usr/nbmingw/i686-pc-linux-gnu --with-headers=yes --with-libiconv-prefix=/usr/nbmingw/build/host-libs-4.2-47-m68k-elf-i686-mingw32/usr --enable-poison-system-directories
Thread model: single
gcc version 4.2.1
There is an --enable-threads option and later it is --disable-threads. Is that right?

What is --with-libiconv-prefix=/usr/nbmingw/build/host-libs-4.2-47-m68k-elf-i686-mingw32/usr used for? Do I need something similar?

After an appropriate ./configure the make call failed:

Code: Select all

In file included from ../../../../gcc-4.4.3/libgcc/../gcc/libgcc2.c:29:
../../../../gcc-4.4.3/libgcc/../gcc/tsystem.h:87:19: error: stdio.h: No such file or directory
../../../../gcc-4.4.3/libgcc/../gcc/tsystem.h:90:23: error: sys/types.h: No such file or directory
../../../../gcc-4.4.3/libgcc/../gcc/tsystem.h:93:19: error: errno.h: No such file or directory
../../../../gcc-4.4.3/libgcc/../gcc/tsystem.h:100:20: error: string.h: No such file or directory
../../../../gcc-4.4.3/libgcc/../gcc/tsystem.h:101:20: error: stdlib.h: No such file or directory
../../../../gcc-4.4.3/libgcc/../gcc/tsystem.h:102:20: error: unistd.h: No such file or directory
../../../../gcc-4.4.3/libgcc/../gcc/tsystem.h:108:18: error: time.h: No such file or directory
make[4]: *** [_muldi3.o] Error 1
make[4]: Leaving directory `/media/sda6/p/web-services/netburner/tmp/build_gcc/m68k-elf/m51qe/libgcc'
Does anyone have an idea what went wrong?

Thanks, Stephan
User avatar
tod
Posts: 587
Joined: Sat Apr 26, 2008 8:27 am
Location: Southern California
Contact:

Re: Developement under Linux

Post by tod »

When you tried to edit the Wiki Pages were you logged in? I just logged in there (with the same credentials I use here) and I was able to modify a page. I was even able to create a page Developing Under Linux in case the contributors here want to move their content and ideas to the wiki.
rsg
Posts: 54
Joined: Thu May 15, 2008 5:36 am

Re: Developement under Linux

Post by rsg »

Yeah, I was. I didn't try to just create a page, though, as it wouldn't have any links to it. My mindset was this:

1. Create a link on an existing page
2. Follow that to create the new page.

I'm hoping Netburner will create a page such as "How-To" that we can edit to create a list of how-to pages, etc.

Otherwise, people won't necessarily find your new page... ;)
User avatar
tod
Posts: 587
Joined: Sat Apr 26, 2008 8:27 am
Location: Southern California
Contact:

Re: Developement under Linux

Post by tod »

I posted a reply of sorts in a new thread in the Off Topic section of the board.
thomastaranowski
Posts: 82
Joined: Sun May 11, 2008 2:17 pm
Location: Los Angeles, CA
Contact:

Re: Developement under Linux

Post by thomastaranowski »

I would take this approach:
1) Rebuild all of the netburner tools (codecomp, etc.) under linux. They provide the source and make structure, so it should be simple.
2) With the newer netburner eclipse stuff, I can just pull the netburner addons into a linux eclipse install
3) Build the linux ppc cross compiler ( don't run the windows one in wine )
http://www.pages.drexel.edu/~sg64/stuff ... ompile.htm

I really should write a howto on this.
User avatar
tod
Posts: 587
Joined: Sat Apr 26, 2008 8:27 am
Location: Southern California
Contact:

Re: Developement under Linux

Post by tod »

To encourage you to write that How To, I modified the Featured Content Page with a link to the HowTo Page which has a link to the mostly blank Developing Under Linux page. It's ready and waiting for you. :ugeek:
stephan
Posts: 10
Joined: Fri Feb 26, 2010 1:58 am
Location: Germany

Re: Developement under Linux

Post by stephan »

Hello Thomas,
thomastaranowski wrote: 3) Build the linux ppc cross compiler ( don't run the windows one in wine )
On my NetBurner board (SB70LC) there is a Motorola 68k processor on it. So I must build the cross compiler for the m68k-elf target, similar to the cross compiler NerBurner ships for Windows. My main problem is, that I am not able to build the cross compiler (see my second posting in this thread). Before I fix that, I can not develop under Linux.

Does anyone has build the linux m68k-elf cross compiler under Linux?
If so, what are the configure options?
blondguy
Posts: 9
Joined: Tue Sep 01, 2009 6:47 pm
Location: San Jose, CA

Re: Developement under Linux

Post by blondguy »

I have recently built a Netburner tool set for MacOSX. For all practical purposes, I would expect that the process would be the same, or close enough, to work on Linux.

So far I have a working gcc-m68k-elf tool set, have ported both compcode and autoupdate to osx, and a makefile to build it all and upload the app via autoupdate mechanism. Mac's built in terminal app can be used as serial terminal via the usb interface (requires the SiLabs driver and a little magic in the kext setup). The serial terminal doesn't do file uploads, I am considering writing my own app to do this, but in all honesty, the few times I need it I figure I can still fire up vmware. I still have to work out the debugging.

At this point I have only built trivial apps to test everything but it does work.

The problem is not so much in building the compiler (thought its not trivial), the real problem is getting newlib and Netburner libs/code to play nicely. Newlib requires certain low level 'system' call functions to be provided and as far as I can tell, netburner libs don't provide them (at least I can't find the symbols). There is also a problem in that netburner libs are built with a uArchitecture of isa-a:mac so you have to compile with -mcpu=5206e otherwise you end up with isa-A+:emac and ld balks at this. So my solution so far has been to rebuild the netburner libs from source. This allowed me to add in the required newlib functions. However, the source distributed by netburner is not all inclusive. Most notably, the source for the debug version of ethernet.cpp is not provided (this contains some of the necc. gbd stuff) and the file system stuff has no source, though I suspect the file system is licensed and they can't provide the source.

Anyway, through all my rambling, what I am trying to say is that there are a lot of small pieces to put together and I haven't quite got them together. If anyone out there wants to discuss the details, you can email me directly. If anybody from netburner is listening, I would love to pick your brain a bit if your willing.

I am going to try and setup a 'Developing on MacOSX' page on the wiki and start putting information there. I will start with building gcc, binutils, and newlib and add as I can.

Just out of curiosity, how much of an interest in this is out there? Anyone have a feel for that.
Post Reply