ATMega 328 Bootloader

Discussion in 'Embedded Systems and Microcontrollers' started by kohlrak, Jul 9, 2013.

  1. kohlrak

    Thread Starter New Member

    Apr 7, 2010
    14
    0
    I"m looking for a bare minimal bootloader in assembly for this chip with not much luck. Assuming the simplest possible setup (nothing fancier than regulated power, as i'm using internal clock and all), what would the simplest bootloader be that can "blink" one of the digital pins? My objective here is to build a bootloader from scratch in assembly, but I need a simple "hello world" to work with. Once provided with a "hello world" example (a blinker), I can proceed to read the manuals.

    I've done a small OS Kernel in x86 assembly before, so this atmega seems like it would be a piece of cake, once i have an entry point into atmega development. Thanks in advance to those who can help.
     
  2. MrChips

    Moderator

    Oct 2, 2009
    12,449
    3,364
    A bootloader does not "blink" nor prints "hello world".
    The purpose of the bootloader is to program the flash memory of your ATmega328.
    The bootloader is already in the ATmega328. You access it using the SPI interface, that is, MISO, MOSI and SCK pins.
     
  3. kohlrak

    Thread Starter New Member

    Apr 7, 2010
    14
    0
    I'm aware of this. However, to learn everything about the chip, I need to write my own bootloader, but i don't know where to start. On other machines, bootloaders often do alot more than simply flash memory. For example, grub on x86 sets up certain drivers (VESA graphics, PMODE, etc).

    EDIT: problem solved, bad terminology. A bootloader is a program that loads a program from ROM to RAM and sometimes provide other functions like drivers and so forth. The ATmega "bootloaders," however don't do anything of the sort. What is interesting is that both programs have interrupt vector tables.
     
    Last edited: Jul 10, 2013
Loading...