Page 1 of 1

Toolchain for AT91Bootstrap compilation

Posted: Wed Feb 29, 2012 7:15 pm
by vmk
I'm trying to compile AT91Bootstrap (v3.1) using Mentor Graphics Sourcery CodeBench toolchain (GNU v2011.09-70, EABI v2011.09-69). The code compiles without errors but the board (AT91SAM9G45-EKES) doesn't boot. I think the system hangs because it doesn't switch to the next NVM in the bootloader sequence.
I tried both GNUEABI and EABI versions, both DataFlash and SD boot, but no luck.

If I compile AT91Bootstrap using ELDK toolchain it works just fine, and u-boot compiled with Sourcery toolchain works too.

Ideas, anyone?

Thanks,
vmk

Re: Toolchain for AT91Bootstrap compilation

Posted: Wed Feb 29, 2012 8:54 pm
by CptTitanic
arm-none-eabi-gcc v4.5.1 from Yagarto works

Code: Select all

C:\Bootstrap-v1.16>set INCLUDE=c:\tools\yagarto\arm-none-eabi\include

C:\Bootstrap-v1.16>set CROSS_COMPILE=arm-none-eabi-

C:\Bootstrap-v1.16>arm-none-eabi-gcc -v
Using built-in specs.
COLLECT_GCC=arm-none-eabi-gcc
COLLECT_LTO_WRAPPER=c:/tools/yagarto/bin/../libexec/gcc/arm-none-eabi/4.5.1/lto-
wrapper.exe
Target: arm-none-eabi
Configured with: ../gcc-4.5.1/configure --target=arm-none-eabi --prefix=/home/yagarto/install --disable-nls --disable-shared --disable-threads --with-gcc --with -gnu-ld --with-gnu-as --with-dwarf2 --enable-languages=c,c++ --enable-interwork --enable-multilib --with-newlib --with-headers=../newlib-1.18.0/newlib/libc/include --disable-libssp --disable-libstdcxx-pch --disable-libmudflap --disable-libgomp -v
Thread model: single
gcc version 4.5.1 (GCC)
You'd also need to check that the BIN file will pass RomBOOT's sanity checking, ie the $EA or $E5 instuctions in the ARM9 vectors

Re: Toolchain for AT91Bootstrap compilation

Posted: Thu Mar 01, 2012 10:36 am
by vmk
The bootstrapper compiled using ELDK toolchain works just fine, so I compared the binary with the one compiled using Sourcery.
The first 224 bytes are identical except for the size, that in both cases is correct.
So the hang should be more down the road.

Thanks anyway.

Re: Toolchain for AT91Bootstrap compilation

Posted: Thu Mar 01, 2012 2:33 pm
by CptTitanic
Then the NONE-EABI would seem to be important.

Slap a debugger on the board and step into the code if it is important to understand why it doesn't work.