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.

Bootloader for AM3358

Other Parts Discussed in Thread: AM3358

Hello.

I've started reading the user manual (4000 long pages, which I haven't finished ... barely even started) and I'd like to know if this processor comes with a bootloader already burned in the memory, and if it comes with one, how do I burn it with my code? If it doesn't, which TI tool should I use to burn it? Is there any bootloader codes available to burn an external flash, or some other device?

I know these questions are rather basic and I have no idea where to strat, but previously I've only worked with ARM7TDMI and one Cortex-M3. This cortex A-8 is far more advanced than any processor I've worked with, and the reference manual is very long.

  • yep,  a small one, look at the section describing the boot select pins (shared  with the LCD pins), these tell the internal bootloader from what peripheral to load initial firmware (which is external).   U-boot starts DDR memory, system clocks etc..., and boots your application code or OS kernel.  This is already thought out in an EVM.  I'd get an EVM of some sort and start playing with an SDK; that'll get your feet wet pretty quick.  

    might be a good place to start:

    http://www.ti.com/tool/tmdssk3358?DCMP=dsp-arm-starterkit-120725&HQS=dsp-arm-starterkit-pr-sw1

    or look at the beaglebone, depending on what you want to do....

  • I see .. that clarifies a lot

    But if I want to burn my own code to the microcontroller can I use that internal boot loader to burn my code to an external flash .. or internal ... or any other kind of memory device??

    Should I use a jtag programmer? Can I use an FT232H and emulate a jtag via usb to burn my code to the processor's memory?

    Sorry for all those questions ... it's just that from ARM7(LPC2378) I remember that I only needed to put a high level on one pin right after reset that I could urn my code to the internal flash. I think I could use that same bootloader to burn an external memory by altering the linker script, but I didn't have the chance to do that.

    If I could get an answer for that question it'd be really helpfull, and I'd have a better starting point. 

    I'll take a look into that starter kit. 

  • not the same kind of processor as you are used to. As far as I know, you can't access the internal flash at all, you need to connect an external memory for it to boot your code. You can avoid using JTAG altogether depending on what you want your code to be stored in.  You can boot from SD cards or other various flash devices.   If you look at the bootsel section, you can see the options available.  You can put nand, emmc, or stick with SD cards on your target board and initially program them with some other boot option --such as a serial port.  There are a lot of options, but it comes at the cost of added complexity (compared to a self contained embedded processor with all the flash and ram on die)

  • thank you .... I'll mark it as answered. but I still have many doubts.

    When I understand what you're saying I'll probably need to ask more questionst, but right now it's late in my country and I need to get some sleep. I'll try to start reading on what you told me as soon as possible and come back with ... probably ... many questions

  • Hi Pablo!

    To answer your first question, the AM335x does have internal ROM that it uses to initialize the processor on boot or POR. This ROM is hardcoded and cannot be changed.

    The AM3358 microprocessor is a much different beast than your typical microcontroller. Microprocessors and microcontrollers are different in that microcontrollers have on-board non-volatile memory (such as flash), while microprocessors do not.

    So where do you put your code? Well this is actually a pretty complicated question... depending on whether or not you wish to run an OS on the device (i.e. Linux), you could boot from external flash, an SD card, UART, or even boot remotely over ethernet, to name a few.

    Like Dal said, getting your hands dirty with a starter kit EVM or a beaglebone would be the easiest way to get up to speed. In the meantime I'd recommend taking a look at our wiki's and sitara boot-camp.

    - Starter Kit (wiki): http://processors.wiki.ti.com/index.php/AM335x_Starter_Kit

    - Beaglebone: http://beagleboard.org/bone

    - Boot Camp: http://focus.ti.com/docs/training/catalog/events/event.jhtml?sku=OLT312000. Specifically, I'd look at "Giving Linux the Boot"

    Hope that helps, let me know if you have any other questions/concerns.

    Best,

    Keegan

     

  • Now things are getting clearer ...

    sou you're telling me that first I need to burn my code into a memory (SD card for example) and then tell my bootloader to boot from it. I think I understood that. But how do I burn my code to the SD card. I know how to do it using an OS .. well I don't know since I haven't done it ... but there are many tutorials online. But what if I want to work baremetal?? Just compiling with a compiler tool and literally copying it to the SD card is sufficiente? Or should I use a programmer? A jtag programmer or something like that. As you've told me it's a completely different world between microcontrollers and microprocessors, but this is my first step and I need to start with a processor as strong as AM3358. 

    PS: I was planning on buying that kit as soon as possible. I intend to study it and understand how it works so that I can build my own "product" that can run Linux. 

  • From my experience with beaglebone...

    Maybe StarterWare_02_00_00_07/tools/sd_format and /bootloader will help.

    Some of us find that this tool doesn't always set the active partition so you might also need:
    The "Active Partition Manager" utility so that the board will boot the sd card.

  • This will all depend on what type of OS you are looking to program on the device. Your options are:

    1) Linux - through our EZSDK, has the advantage of built-in thread and memory management. If you want to program "close to the metal" functionality here you'll need to write drivers that act as hardware interfaces between the kernel and the silicon.

    2) Starterware - not really an OS, this may be the 'closer to the metal' way of programming (similar to a microcontroller) that you're looking for, but keep in mind you make a lot of sacrificies by not going with an OS.

    3) Android

    As Jon mentioned, starterware does have tools for flashing simple compiled binaries to an SD card. You can also use a debugger/emulator and CCS. TI provides instruction for flashing images directly to external flash (http://processors.wiki.ti.com/index.php/AM335X_StarterWare_Booting_And_Flashing#Flashing_bootloader_and_application_to_NAND_Flash)

     

  • I've read what you sent me and it has clarified a lot for me. Sorry for bothering so much, but I want to be able to create my own hardware and program it with whatever code I see fit (be it bare metal or using Linux)

    Plsase keep in mind that buying things from my country can get expensive really fast so I'd like to use free tools

    So if I want to use a gcc compiler and other non-TI tools for compiling and burning my code I'd have to do something like this: (??)

    Write the code .

    Compile it with gcc, for example.

    Use application to load binary (Do i have to write it, or how does it work? .... is the bootloader in the starterware required to load the code to the flash?)

  • It's understandable that you want to keep things cheap!

    Take a look at the EZSDK and the Starterware SDK, it includes all software tools and toolchains necessary to build and develop (and it's free!). This includes software to flash images to SD, NAND flash, etc.

    The only tool I'd suggest that TI does not explicitly supply is a JTAG debugger/emulator. You don't necessarily need one for development, but it can certainly help with hardware debug later on down the line.

    Both the Starter Kit and Beaglebone hardware include an on-board XDS100 JTAG debugger/emulator.