
As a developer working in different systems is sometimes really painful. What I've encountered as a problem so far is compiler installation on NGW100. Well, if you're a beginner you might not see this as an easy job to do. First of all it's not sufficient to have programming background but you have to know a bit of UNIX operating systems in other words today's so called Linux distros.
NGW100 is one of those systems, since it has different processor you cannot use your regular compiler. Furthermore, those compiler designers probably are not supporting NGW100. So you need to know two things before you get yourself on the road:
1. What cross-compiling is
2. How to handle NGW100's configuration.
Cross compiling is a compiling process where your target machine, that your executable program work on, and your developer machine is different. What you have to do is, you need to compile your source code with a given or self-generated compiler. In Atmel's NGW100 it's called
avr32-linux-gcc. Atmel actually does not provide that compiler directly but you need to do some UNIX operations under a Linux distro. In our situation that compiler is kinda cross compiler.I've tried to overcome this problem using different distros. Unfortunately there's only one distro that I used and succeeded which is Ubuntu 9.04. I've also tried newer versions of Ubuntu without a luck. So I recommend to use Ubuntu 9.04 for developing purposes under Linux. Again I've to confess that I've no knowledge about how to handle these problems under Windows or Mac. Anyway, you can install Ubuntu 9.04 or you can use Ubuntu 9.04 as a Live CD which you can use Ubuntu without installing on your hard-drive.
First thing to do is to install toolchain and buildroot which is provided by Atmel. You can find those packages in Atmel's web-site for Ubuntu 9.04.
At this point start installing toolchain and make yourself sure that you've installed these packages:
avr32program avr32gdbproxy avr32trace avrfwupgrade libavr32ocd libavrtools libelfdwarfparserAfter that download buildroot extract it to some directory before installing it you need to make some configurations.
1. First configure menuconfig under buildroot extraction folder using this compilation will open a window that you need to pick some properties of your NGW100, choose correct values for your system and save.
make menuconfig2. Similar to that you need to prepare source by
make source3. And final step is compiling the whole by
makeAfter the compilation process is completed most probably your PATH variables are not set to point avr32-linux-gcc compiler. So you need to add
avr32-linux-gcc 's path to PATH variable in UNIX system by: export PATH=$PATH:(avr32-linux-gcc's path) without paranteses.*Your avr32-linux-gcc program is placed under (buildroot's path)/build_avr32/staging_dir/usr/bin. So you need to give your actual path to the export command above.
So, if you've done all successfully then you should be able to use your
avr32-linux-gcc everywhere in your terminal.Last thing is try some C code on your machine. Just write some hello world code in your developing machine which might be:
#include
int main(){
printf("SUCCEEDED!!");
return 0;
}
You'll compile this hello.c source code with:
avr32-linux-gcc hello.c -o helloAnd you need to transfer your hello file which is executable in your NGW100 system.
Now you can execute and see your success on your screen :)
Well my purpose actually is developing Java on my NGW100 I'll also explain how to do it soon. But if you can't wait to do so I suggest you to check JamVM virtual machine that can work on Atmel's NGW100. It's just a quick hint for Java developers from me. It's somehow a bit more trickier but hopefully you'll enjoy what you're doing while using JAVA on NGW100.
You need to have "#include " without the quotes.
ReplyDeleteOh that was funny !
ReplyDeleteThe page takes greater than less than brackets as markup ! You need to use :
#include less_than_bracket stdio.h greater_than_bracket
This comment has been removed by the author.
ReplyDeleteIt was indeed. I tried to use greater or less than signs but couldn't accomplish. I think blogger identifies it as a comment or a code.
ReplyDelete