Hello,
I have built bootloader and uartEcho application using CodeSourcery 4.6.1. for BeagleBone rev A3.
After reseting the board all I can see in the terminal window (putty):
"StarterWare AM335x Boot Loader".
Thank you,
Valentin Ivanov
This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
Hello,
I have built bootloader and uartEcho application using CodeSourcery 4.6.1. for BeagleBone rev A3.
After reseting the board all I can see in the terminal window (putty):
"StarterWare AM335x Boot Loader".
Thank you,
Valentin Ivanov
Hi Valentin,
I have a couple of queries to figure out what went wrong..
Which Version of StarterWare you are using ?
Have you compiled the bootloader separately ? or you are using the MLO, which was part of StarterWare package?
Does this MLO work with the uartEcho precompiled binary which came with StarterWare package ?
We are working with codesourcey tool chain, which StarterWare user guide suggests.
Cheers !!
Sujith.
Hi.
I am trying to build the bootloader code using cygwin and the arm toolchain from codesourcery (Sourcery G++ Lite 2009q1-161) but I cannot even get past the compilation stage. I have added variable LIB_PATH to my bash profile so now it is visible on the path. Additionally I have also added variable CYGPATH by pointing it to cygpath utility. I do a make from within the bootloader directory (/cygdrive/c/ti/AM335X_StarterWare_02_00_00_05/build/armv7a/gcc/am335x/beaglebone/bootloader). The logs that I see on the console are:
make[1]: Entering directory `/cygdrive/c/ti/AM335X_StarterWare_02_00_00_05/build/armv7a/gcc/am335x/drivers'
arm-none-eabi-gcc -mcpu=cortex-a8 -c -g -O2 -mlong-calls -fdata-sections -ffunction-sections -Wall -I ../../../../../include -I ../../../../../include/hw -I ../../../../../include/armv7a -I ../../../../../include/armv7a/am335x -I ../../../../../mmcsdlib/include -I ../../../../../nandlib/include -I ../../../../../usblib/include -I ../../../../../grlib/include -I ../../../../../bootloader/include -I ../../../../../third_party/fatfs/src/ -D am335x_15x15 -D MMCSD ../../../../..//drivers/dmtimer.c ../../../../..//drivers/uart_irda_cir.c ../../../../..//drivers/ecap.c ../../../../..//drivers/mcspi.c ../../../../..//drivers/mcasp.c ../../../../..//drivers/mdio.c ../../../../..//drivers/phy.c ../../../../..//drivers/cpsw.c ../../../../..//drivers/hsi2c.c ../../../../..//drivers/gpio_v2.c ../../../../..//drivers/watchdog.c ../../../../..//drivers/edma.c ../../../../..//drivers/rtc.c ../../../../..//drivers/raster.c ../../../../..//drivers/gpmc.c ../../../../..//drivers/elm.c ../../../../..//drivers/tsc_adc.c ../../../../..//drivers/hs_mmcsd.c ../../../../..//drivers/mailbox.c ../../../../..//drivers/usbphyGS70.c ../../../../..//drivers/usb.c ../../../../..//drivers/cppi41dma.c ../../../../..//drivers/dcan.c
arm-none-eabi-ar -c -r ../../../../..//binary/armv7a/gcc/am335x/drivers/libdriver.a *.o
make[1]: Leaving directory `/cygdrive/c/ti/AM335X_StarterWare_02_00_00_05/build/armv7a/gcc/am335x/drivers'
make[1]: Entering directory `/cygdrive/c/ti/AM335X_StarterWare_02_00_00_05/build/armv7a/gcc/am335x/beaglebone/platform'
arm-none-eabi-gcc -D DMA_MODE -mcpu=cortex-a8 -c -g -O2 -mlong-calls -fdata-sections -ffunction-sections -Wall -I ../../../../../../include -I ../../../../../../include/hw -I ../../../../../../include/armv7a -I ../../../../../../include/armv7a/am335x -I ../../../../../../mmcsdlib/include -I ../../../../../../nandlib/include -I ../../../../../../usblib/include -I ../../../../../../grlib/include -I ../../../../../../bootloader/include -I ../../../../../../third_party/fatfs/src/ -D am335x_15x15 -D MMCSD ../../../../../..//platform/beaglebone/*.c
arm-none-eabi-ar -c -r ../../../../../..//binary/armv7a/gcc/am335x/beaglebone/platform/libplatform.a *.o
make[1]: Leaving directory `/cygdrive/c/ti/AM335X_StarterWare_02_00_00_05/build/armv7a/gcc/am335x/beaglebone/platform'
make[1]: Entering directory `/cygdrive/c/ti/AM335X_StarterWare_02_00_00_05/build/armv7a/gcc/utils'
arm-none-eabi-gcc -mcpu=cortex-a8 -c -g -O2 -mlong-calls -fdata-sections -ffunction-sections -Wall -I ../../../../include -I ../../../../include/hw -I ../../../../include/armv7a -I ../../../../include/armv7a/am335x -I ../../../../mmcsdlib/include -I ../../../../nandlib/include -I ../../../../usblib/include -I ../../../../grlib/include -I ../../../../bootloader/include -I ../../../../third_party/fatfs/src/ -D am335x_15x15 -D MMCSD ../../../../utils/*.c
arm-none-eabi-ar -c -r ../../../..//binary/armv7a/gcc/utils/utils.a *.o
make[1]: Leaving directory `/cygdrive/c/ti/AM335X_StarterWare_02_00_00_05/build/armv7a/gcc/utils'
make[1]: Entering directory `/cygdrive/c/ti/AM335X_StarterWare_02_00_00_05/build/armv7a/gcc/mmcsdlib'
arm-none-eabi-gcc -mcpu=cortex-a8 -c -g -O2 -mlong-calls -fdata-sections -ffunction-sections -Wall -I ../../../../include -I ../../../../include/hw -I ../../../../include/armv7a -I ../../../../include/armv7a/am335x -I ../../../../mmcsdlib/include -I ../../../../nandlib/include -I ../../../../usblib/include -I ../../../../grlib/include -I ../../../../bootloader/include -I ../../../../third_party/fatfs/src/ -D am335x_15x15 -D MMCSD -I ../../../../include -I ../../../../include/hw -I ../../../../include/armv7a -I ../../../../include/armv7a/am335x -I ../../../../mmcsdlib/include -I ../../../../nandlib/include -I ../../../../usblib/include -I ../../../../grlib/include -I ../../../../bootloader/include -I ../../../../third_party/fatfs/src/ ../../../..//mmcsdlib/*.c
arm-none-eabi-ar -c -r ../../../..//binary/armv7a/gcc/mmcsdlib/libmmcsd.a *.o
make[1]: Leaving directory `/cygdrive/c/ti/AM335X_StarterWare_02_00_00_05/build/armv7a/gcc/mmcsdlib'
make[1]: Entering directory `/cygdrive/c/ti/AM335X_StarterWare_02_00_00_05/build/armv7a/gcc/nandlib'
arm-none-eabi-gcc -mcpu=cortex-a8 -c -g -O2 -mlong-calls -fdata-sections -ffunction-sections -Wall -I ../../../../include -I ../../../../include/hw -I ../../../../include/armv7a -I ../../../../include/armv7a/am335x -I ../../../../mmcsdlib/include -I ../../../../nandlib/include -I ../../../../usblib/include -I ../../../../grlib/include -I ../../../../bootloader/include -I ../../../../third_party/fatfs/src/ -D am335x_15x15 -D MMCSD -I ../../../../include -I ../../../../include/hw -I ../../../../include/armv7a -I ../../../../include/armv7a/am335x -I ../../../../mmcsdlib/include -I ../../../../nandlib/include -I ../../../../usblib/include -I ../../../../grlib/include -I ../../../../bootloader/include -I ../../../../third_party/fatfs/src/ ../../../..//nandlib/*.c
arm-none-eabi-ar -c -r ../../../..//binary/armv7a/gcc/nandlib/libnand.a *.o
make[1]: Leaving directory `/cygdrive/c/ti/AM335X_StarterWare_02_00_00_05/build/armv7a/gcc/nandlib'
arm-none-eabi-gcc -mcpu=cortex-a8 -c -g -O2 -mlong-calls -fdata-sections -ffunction-sections -Wall -I ../../../../../../include -I ../../../../../../include/hw -I ../../../../../../include/armv7a -I ../../../../../../include/armv7a/am335x -I ../../../../../../mmcsdlib/include -I ../../../../../../nandlib/include -I ../../../../../../usblib/include -I ../../../../../../grlib/include -I ../../../../../../bootloader/include -I ../../../../../../third_party/fatfs/src/ -D am335x_15x15 -D MMCSD -Dgcc -Dbeaglebone ../../../../../..//bootloader/src/bl_main.c ../../../../../..//bootloader/src/bl_am335x.c ../../../../../..//bootloader/src/bl_copy.c ../../../../../..//bootloader/src/bl_pmI2c.c ../../../../../..//bootloader/src/bl_pmic.c ../../../../../..//bootloader/src/armv7a/gcc/*.S ../../../../../..//bootloader/src/bl_hsmmcsd.c ../../../../../../third_party/fatfs/src/ff.c ../../../../../../third_party/fatfs/port/fat_mmcsd.c
arm-none-eabi-ld -e Entry --gc-sections -L/cygdrive/c/CodeSourcery/SourceryG++Lite/arm-none-eabi/lib/ -L/cygdrive/c/CodeSourcery/SourceryG++Lite/lib/gcc/arm-none-eabi/4.3.3/ --defsym BOOT_START_ADDR=0x402F0400 -T boot.lds -o \
../../../../../..//binary/armv7a/gcc/am335x/beaglebone/bootloader/boot.out \
../../../../../../build/armv7a/gcc/am335x/drivers/*.o ../../../../../../build/armv7a/gcc/am335x/beaglebone/platform/*.o ../../../../../../build/armv7a/gcc/utils/*.o ../../../../../../build/armv7a/gcc/mmcsdlib/*.o ../../../../../../build/armv7a/gcc/nandlib/*.o *.o -lc -lgcc
arm-none-eabi-objcopy -O binary ../../../../../..//binary/armv7a/gcc/am335x/beaglebone/bootloader/boot.out \
../../../../../..//binary/armv7a/gcc/am335x/beaglebone/bootloader/boot.bin
cd ../../../../../..//tools/ti_image/; gcc tiimage.c; ls; cd -
a.exe tiimage tiimage.c tiimage.exe
/cygdrive/c/ti/AM335X_StarterWare_02_00_00_05/build/armv7a/gcc/am335x/beaglebone/bootloader
../../../../../..//tools/ti_image/a.out 0x402F0400 MMCSD \
../../../../../..//binary/armv7a/gcc/am335x/beaglebone/bootloader/boot.bin \
../../../../../..//binary/armv7a/gcc/am335x/beaglebone/bootloader/boot_ti.bin;
/bin/sh: ../../../../../..//tools/ti_image/a.out: No such file or directory
makefile:87: recipe for target `bin' failed
make: *** [bin] Error 127
I installed the 2009 version of the none-eabi compiler from codesourcery since the newer version had changed somewhat. I additionally also added the gcc compiler suite as earlier it had complained of 'not being able to find out the gcc library aka -lgcc' .
I cannot seem to find out whats wrong. Its interesting that someone got it compiled but is now facing an issue with it. Would like to get the bone to boot with this bootloader.
Regards,
Aijaz Baig.
Hello Aijaz,
I had this problem. The issues is in the makefile for the bootloader. It is trying to invoke "a.out" to convert the bin image. You can fix this by changing a.out in the makefile to a.exe or tiimage.exe.
Regards,
Valentin
Hello Sujith,
Thank you for looking at this. Here is a little bit more information about my environment:
StarterWire AM335X 02.00.00.05
Windows 7 64 bit
Sourcery CodeBench Lite 2011.09-69
Cygwin
I am building both bootloader and uart example using the above compiler from Cygwin command line. Here is more info about the issue. I have put a lot of tracing (great that UARTPuts works). I receive all my tracing up to a line:
strcat(g_cTmpBuf, "app");
this line is from bl_hsmmcsd.c file inside HSMMCSDImageCopy function. Interesting detail is that if I comment out that line and put the following:
g_cTmpBuf[0] = '/';
g_cTmpBuf[1] = 'a';
g_cTmpBuf[2] = 'p';
g_cTmpBuf[3] = 'p';
g_cTmpBuf[4] = '\0';
The execution proceeds further (I receive my trace output down the line). So it looks like it some sort of aligning or null termination in const strings issue.
I don't have a lot of experience with gcc compiler, but it feels that it should be something simple.
Regards,
Valentin Ivanov
Hi Valentin,
Thanks a lot for giving suggestion to Aijaz. We appreciate your effort for solving that issue.
w.r.t the issue you are facing, from your explanation, I understand fopen() is not working as expected, otherwise
UARTprintf("\r\n Unable to open application file\r\n");
or
UARTPuts("Copying application image from MMC/SD card to RAM\r\n", -1);
would have executed. At the first look, I am not finding any issue elsewhere :(
Since our environment is a bit different here and we got it working, could you please try with the code sourcery tool chain I suggested ?
Regards,
Sujith.
Hi Sujith,
No problem.
Actually, it doesn't even reach the fopen line it chokes on strcat as I have described above. I was hoping to get it to work with the latest (free) from Sourcery. The version that is suggested in the getting started guide works fine.
Regards,
Valentin Ivanov
Hi,
I had the same problem and independently solved using the same method that Valentin mentioned. Instead of strcat line, I manually entered the app\0 into the buffer.
I'm using Ubuntu + Codesourcery Lite (the most recent version) as my programming environment. Interestingly, the same code was compiled and run without problem if I used CCSv5 (which uses TMS480 I believe.) So, somehow, strcat in the starterware combined with codesourcery might have a collision. I think you should check what is going on there.
Best,
From the looks of it (DFAR and DFSR registers, and R14_ABT), the problem is due to a strh (store half-word) to an unaligned address. This should be fine as long as the A bit (strict alignment check) in the system control register is 0, and it is.
After calling MMUConfigAndEnable the same code works fine.