Difference between revisions of "Documents/Fedora 3"

From Nutwiki
Jump to: navigation, search
(Created page with "<div id="content"> = Nut/OS Development on Fedora 3 = == GCC Toolchain == Install the GNU binutils <pre class="coding"># rpm -Uvh http://ftp.gnu.org/savannah/files/avr-lib...")
 
(No difference)

Latest revision as of 08:29, 13 July 2017

Nut/OS Development on Fedora 3

GCC Toolchain

Install the GNU binutils

# rpm -Uvh http://ftp.gnu.org/savannah/files/avr-libc/released/RPMS/i386/avr-binutils-2.14-1.i386.rpm
Retrieving http://ftp.gnu.org/savannah/files/avr-libc/released/RPMS/i386/avr-binutils-2.14-1.i386.rpm
Preparing...                ########################################### [100%]
   1:avr-binutils           ########################################### [100%]

Install GCC C++

# rpm -Uvh http://ftp.gnu.org/savannah/files/avr-libc/released/RPMS/i386/avr-gcc-c++-3.3.2-1.i386.rpm
Retrieving http://ftp.gnu.org/savannah/files/avr-libc/released/RPMS/i386/avr-gcc-c++-3.3.2-1.i386.rpm
Preparing...                ########################################### [100%]
   1:avr-gcc                ########################################### [100%]

If you have a previous version installed, this may fail with

Retrieving http://ftp.gnu.org/savannah/files/avr-libc/released/RPMS/i386/avr-gcc-c++-3.3.2-1.i386.rpm
error: Failed dependencies:
        avr-gcc = 3.3.2-1 is needed by avr-gcc-c++-3.3.2-1.i386

That's because the C++ compiler from the previous installation requires the C compiler from the same installation. Thus, upgrading the C compiler fails. We can add the --nodeps option to solve this.

# rpm -Uvh --nodeps http://ftp.gnu.org/savannah/files/avr-libc/released/RPMS/i386/avr-gcc-3.3.2-1.i386.rpm
Retrieving http://ftp.gnu.org/savannah/files/avr-libc/released/RPMS/i386/avr-gcc-3.3.2-1.i386.rpm
Preparing...                ########################################### [100%]
   1:avr-gcc                ########################################### [100%]


Install GCC

# rpm -Uvh http://ftp.gnu.org/savannah/files/avr-libc/released/RPMS/i386/avr-gcc-3.3.2-1.i386.rpm
Retrieving http://ftp.gnu.org/savannah/files/avr-libc/released/RPMS/i386/avr-gcc-3.3.2-1.i386.rpm
Preparing...                ########################################### [100%]
   1:avr-gcc                ########################################### [100%]

Install avr-libc

# rpm -Uvh http://ftp.gnu.org/savannah/files/avr-libc/released/RPMS/i386/avr-libc-1.0.2-1.i386.rpm
Retrieving http://ftp.gnu.org/savannah/files/avr-libc/released/RPMS/i386/avr-libc-1.0.2-1.i386.rpm
Preparing...                ########################################### [100%]
   1:avr-libc               ########################################### [100%]

Install avr-libc documents

# rpm -Uvh http://ftp.gnu.org/savannah/files/avr-libc/released/RPMS/i386/avr-libc-docs-1.0.2-1.i386.rpm
Retrieving http://ftp.gnu.org/savannah/files/avr-libc/released/RPMS/i386/avr-libc-docs-1.0.2-1.i386.rpm
Preparing...                ########################################### [100%]
   1:avr-libc-docs          ########################################### [100%]

We can finally check that everything is in place.

# rpm -qa | grep avr
avr-gcc-3.3.2-1
avr-binutils-2.14-1
avr-libc-1.0.2-1
avr-libc-docs-1.0.2-1
avr-gcc-c++-3.3.2-1


UISP

www.nongnu.org

# tar -xjvf uisp-20040311.tar.bz2

crurom

# cd nut/tools/crurom/
# make
gcc    -c -o crurom.o crurom.c
gcc -o crurom crurom.o  -L/usr/lib  -lm
cp crurom ../linux/crurom

Compiling Basemon

# export PATH=/opt/ethernut/nut/tools/linux:$PATH 
# make
crurom -r -ourom.c html 
avr-gcc -c -mmcu=atmega128 -Os -Wall -Wstrict-prototypes -Wa,-ahlms=urom.lst -D__HARVARD_ARCH__
 -DETHERNUT2 -I/opt/ethernut/nut-bld/include -I/opt/ethernut/nut/include urom.c -o urom.o 
avr-gcc basemon.o xmemtest.o dataflash.o realtek.o smsc.o uart.o webdemo.o utils.o urom.o
 -mmcu=atmega128 -Wl,--defsym=main=0,-Map=basemon.map,--cref -L/opt/ethernut/nut-bld/lib -lnutnet
 -lnutpro -lnutfs -lnutos -lnutdev -lnutnet -lnutcrt -o basemon.elf 
avr-objcopy -O ihex basemon.elf basemon.hex
rm basemon.elf

Start minicom without modem initialization

$ minicom -o

Exit minicom without modem reset by pressing Ctrl-a and q.