• Join
  • Sign In with my.TI Login
Texas Instruments
  • Products
  • Applications
  • Tools & Software
  • Support & Community
  • Sample & Buy
  • About TI
Sample & Purchase Cart Sample & Purchase Cart
  • Search
  • Advanced
TI E2E™ Community
  • Support Forums
  • Blogs
  • Groups
  • Videos
  • 简体中文
  • More ...
TI Home » TI E2E Community » Support Forums » Embedded Software » StarterWare » StarterWare forum » uartEcho compiled with CodeSourcery 4.6.1
Share
StarterWare
  • Forum
Options
  • Subscribe via RSS

Forums

uartEcho compiled with CodeSourcery 4.6.1

This question is answered
Valentin Ivanov
Posted by Valentin Ivanov
on Mar 24 2012 02:14 AM
Intellectual380 points

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

StarterWare beaglebone CodeSourcery gcc UART Bootloader AM335x
Report Abuse
  • Reply
You have posted to a forum that requires a moderator to approve posts before they are publicly available.
All Replies
  • Sujith KV
    Posted by Sujith KV
    on Mar 25 2012 02:52 AM
    Intellectual2505 points

    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.

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • Aijaz Baig
    Posted by Aijaz Baig
    on Mar 25 2012 05:14 AM
    Prodigy130 points

    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:

    [code]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
    [/code]

    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.

    beaglebone CodeSourcery Bootloader
    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • Valentin Ivanov
    Posted by Valentin Ivanov
    on Mar 25 2012 09:23 AM
    Verified Answer
    Verified by Valentin Ivanov
    Intellectual380 points

    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

    StarterWare AM335x Beaglebon
    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • Valentin Ivanov
    Posted by Valentin Ivanov
    on Mar 25 2012 10:02 AM
    Intellectual380 points

    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

     

    StarterWare gcc AM335x Beaglebon
    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • Sujith KV
    Posted by Sujith KV
    on Mar 25 2012 12:24 PM
    Verified Answer
    Verified by Valentin Ivanov
    Intellectual2505 points

    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.

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • Valentin Ivanov
    Posted by Valentin Ivanov
    on Mar 25 2012 12:51 PM
    Intellectual380 points

    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

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • sang gang
    Posted by sang gang
    on Sep 05 2012 23:30 PM
    Intellectual300 points

    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,

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • Orjan Friberg
    Posted by Orjan Friberg
    on Mar 08 2013 06:34 AM
    Expert1065 points

    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.

     

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
TI E2E™ Community
  • Support Forums
  • Blogs
  • Videos
  • Groups
  • Site Support & Feedback
  • Settings
TI E2E™ Community Groups
  • TI University Program
  • Make the Switch
  • Microcontroller Projects
  • Motor Drive & Control
Other Communities
  • Deyisupport
  • Designsomething.org
  • beagleboard.org
  • TI on Element 14
  • TI on TechXchangeSM
Other Technical & Support Resources
  • WEBENCH® Design Center
  • Product Information Centers
  • Technical Documents
  • TI Design Network
  • TI Technical Articles
  • TI Training

All content and materials on this site are provided "as is". TI and its respective suppliers and providers of content make no representations about the suitability of these materials for any purpose and disclaim all warranties and conditions with regard to these materials, including but not limited to all implied warranties and conditions of merchantability, fitness for a particular purpose, title and non-infringement of any third party intellectual property right. TI and its respective suppliers and providers of content make no representations about the suitability of these materials for any purpose and disclaim all warranties and conditions with respect to these materials. No license, either express or implied, by estoppel or otherwise, is granted by TI. Use of the information on this site may require a license from a third party, or a license from TI.

Content on this site may contain or be subject to specific guidelines or limitations on use. All postings and use of the content on this site are subject to the Terms of Use of the site; third parties using this content agree to abide by any limitations or guidelines and to comply with the Terms of Use of this site. TI, its suppliers and providers of content reserve the right to make corrections, deletions, modifications, enhancements, improvements and other changes to the content and materials, its products, programs and services at any time or to move or discontinue any content, products, programs, or services without notice.

Follow Us Texas Instruments on Facebook Texas Instruments on Twitter Texas Instruments on LinkedIn Texas Instruments on Google+
TI Worldwide | Contact Us | my.TI Login | Site Map | Corporate Citizenship | mobile m.ti.com (Mobile Version)

TI is a global semiconductor design and manufacturing company. Innovate with 100,000+ analog ICs and
embedded processors, along with software, tools and the industry’s largest sales/support staff.

© Copyright 1995-2013 Texas Instruments Incorporated. All rights reserved.
Trademarks | Privacy Policy | Terms of Use