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.

Beaglebone Black Bare Metal Booting

Can a starterware project developed using CCSv6 and the TI tool chain be used to boot a beaglebone black from a host computer over ethernet?

My objective is to be able to easily do field updates of the bare metal software without having to load SD cards and boot with the reset button pressed.

I initially tried the methods outlined in

  www.cs.sfu.ca/.../BareMetalGuide.pdf

but the ti images (e.g. for the gpioLEDBlink example)  do not run (See output below).

Further searching suggests that using uboot requires linux images produced using a gcc tool chain.

Is that correct? Do I need to recompile my project using the gcc tool chain? Any other suggestions?

Bryan

------------------------------------------

The following attempt to use uboot with gpioLEDBlink.bin turned the LED on but then hung until a timeout when Linux was booted.

U-Boot SPL 2014.04-00014-g47880f5 (Apr 22 2014 - 13:23:54)
reading args
spl_load_image_fat_os: error reading image args, err - -1
reading u-boot.img
reading u-boot.img


U-Boot 2014.04-00014-g47880f5 (Apr 22 2014 - 13:23:54)

I2C:   ready
DRAM:  512 MiB
NAND:  0 MiB
MMC:   OMAP SD/MMC: 0, OMAP SD/MMC: 1
*** Warning - readenv() failed, using default environment

Net:   <ethaddr> not set. Validating first E-fuse MAC
cpsw, usb_ether
Hit any key to stop autoboot:  0
U-Boot#       setenv bootenv uEnvBareMetalDHCP.txt
U-Boot# boot
gpio: pin 53 (gpio 53) value is 1
Card did not respond to voltage select!
mmc0(part 0) is current device
Card did not respond to voltage select!
gpio: pin 56 (gpio 56) value is 0
gpio: pin 55 (gpio 55) value is 0
gpio: pin 54 (gpio 54) value is 0
mmc1(part 0) is current device
gpio: pin 54 (gpio 54) value is 1
SD/MMC found on device 1
reading uEnvBareMetalDHCP.txt
228 bytes read in 5 ms (43.9 KiB/s)
gpio: pin 55 (gpio 55) value is 1
Loaded environment from uEnvBareMetalDHCP.txt
Importing environment from mmc ...
Checking if uenvcmd is set ...
gpio: pin 56 (gpio 56) value is 1
Running uenvcmd ...
link up on port 0, speed 100, full duplex
BOOTP broadcast 1
DHCP client bound to address 192.168.0.11
link up on port 0, speed 100, full duplex
Using cpsw device
TFTP from server 192.168.0.10; our IP address is 192.168.0.11
Filename 'gpioLEDBlink.bin'.
Load address: 0x80000000
Loading: #
         196.3 KiB/s
done
Bytes transferred = 6636 (19ec hex)
*** Booting to BareMetal ***
## Starting application at 0x80000000 ...

  • user4213168,

    Just to clarify and a few questions:
    From observing your log, when the console stops are "## Starting application at 0x80000000 ..." do you see the LED 2 on the BBB turn on, hold steady and the board reboot automatically after about 30 seconds?

    From what I have observed and referring to the .pdf that you had mentioned, the examples in the Starterware package can be rebuilt using GCC and doing a "make". If your Starterware examples are built on a Windows machine using CCS, typically there are some .bin files for the example that are generated along with the .out (post build step) located at (C:\ti\AM335X_StarterWare_02_00_01_01\binary\armv7a\cgt_ccs\am335x\beaglebone\gpio\Release\gpioLEDBlink.bin).

    Did you try to place the CCS generated .bin in your TFTP directory and try to boot?

    Regards,
    Lali
  • Thanks for your response Lali.

    Lalindra Jayatilleke said:
    From observing your log, when the console stops are "## Starting application at 0x80000000 ..." do you see the LED 2 on the BBB turn on, hold steady and the board reboot automatically after about 30 seconds?

    Yes, that is exactly what happens.

    I am indeed running CCSv6 on a Windows machine and using the TI toolchain. I loaded the filename 'gpioLEDBlink.bin' (as shown in the log) generated by the TI tool chain via TFTP (not the _ti.bin file generated by the post build step).

    GCC:

    I thought that it may be useful to compare the TI tool chain with the gcc tool chain so today I have rebuilt the gpioLEDBlink example using the gcc tool chain within CCSv6 (Debug_GNU and GNU v4.7.4 (Linaro) compiler). This has as output gpioLEDBlink.out. I can successfully debug this using the Blackhawk XDS100v2, which is a good start.

    However, I am not familiar with the various output formats. How do I convert this gcc linked .out into a .bin for loading via TFTP?

    Do I need to use tiobj2bin (as in the TI tool chain post-build) or are there gcc specific conversion tools?

    Bryan

  • Hi Bryan,

    Please take a look at this post which could possibly offer some hints on the .bin formatting. You may need to play around with C:\ti\AM335X_StarterWare_02_00_01_01\tools\ti_image\tiimage.exe... to see if that helps.

    e2e.ti.com/.../326940 (~4th post down)

    Another thing I tried is to compile the example on an Ubuntu machine using GCC (using $make, i.e AM335X_StarterWare_02_00_01_01/build/armv7a/gcc/am335x/beaglebone$ make) as outlined in your pdf reference. Did you see if a Ubuntu machine generated .bin TFTP'd would work?

    Lali