Uploading sketch without bootloaders

How can i upload the Arduino Sketch into Atmega 328p-AU chip without Bootloaders(I mean into a new chip) Is there any possibility.

Please Help

Thanks.

Ask Nick Gammon!

Yes, there is possibility, e.g. via ISP - it is the simplest way. ISP programmer is needed, of course.

@Budvar10
Correct me if i'm wrong, ISP programmers first upload bootloaders then the sketch. isn't.?

ISP programmer can program anything in flash. The purpose of bootloader is to program MCU via serial line but it is spending part of flash memory. If you want to not use a bootloader then solution is to use ISP.

EDIT: Just to be clear, the ATmega has several ways for programming. The most used are ISP and serial line. Serial is Arduino native and the bootloader is needed for serial programming. ISP is used just to upload the bootloader into raw chip.

Then i'll be not be able to check Serial Monitor when i used ISP Method isn't.? and if i want to work on a completely new chips from Atmel, which is not on any Arduinos, then ISP can also help me in this scenario .?

Then i'll be not be able to check Serial Monitor when i used ISP Method isn't.?

Are you asking about the serial line use in your program? No worries, it has nothing with the bootloader.

and if i want to work on a completely new chips from Atmel, which is not on any Arduinos, then ISP can also help me in this scenario .?

Completly new chips (raw in my terminology :slight_smile: ), they have no program in a memory, no bootloader, so ISP is the way for bootloader programming.

Ahhh! I got it, Thanks for that, I've another question. Arduino IDE is showing many programmers like : USBasp,AVR ISP,AVRISP MKII,USB tiny ISP etc, everybody here do the same job.?

In principle yes, but specifically. E.g. USBasp is specific programmer (developed by Thomas Fischl) only for ISP., AVRISP MKII is Atmel protocol used by Arduino as default option for programming via serial port...
Yo have to use appropriate tool or circuit with chosen option.

Take a Scenario, I build a sketch on "Arduino IDE" (Not in Atmel Studio or other IDE) and now wants to flash it to Empty and non-bootloaded Atmega328p chip.

How do i do it.?

and do please tell me that : Do Atmel Studio supports Arduino Libraries.?

Sorry for my n00bidity
Thanks

  1. Obtain a Programmer, such as
    http://www.hobbyking.com/hobbyking/store/__27990__USBasp_AVR_Programming_Device_for_ATMEL_proccessors.html
    Connect it to SCK, MISO, MOSI, Reset, +5, GND
  2. Select Uno as board type and Burn the Bootloader. That will setup the fuses for 16 MHz operation from an external crystal/caps or a resonator, and the other fuses as needed.
  3. Select File:Upload Using Programmer. The .hex file is uploaded over the bootloader so your sketch starts immediately after a reset.

Atmel Studio/Arduino Libraries - I don't know personally, I don't use Atmel Studio. Recent posts in the forum suggest AS7 does support libraries.

Atmel Studio supports Arduino libraries. It uses the same tools for compilation and make process as Arduino IDE, just version can differ.

Hello guys!

Thanks for writing about this, I am trying to upload bootloader on at tiny45 via the usbasp and avrdude.

The problem is that I am not sure, if it works :slight_smile:

Actually, if I export the sketch from Arduino into hex file and upload this then the application works, etc. However, should I upload the hex file version with bootloader? Is bootloader uploaded via original file? Howe

I would like to use the bootloader for the BOD...

Any comment, explanation is more than welcome!

Best.

I

mu234:
Hello guys!

Thanks for writing about this, I am trying to upload bootloader on at tiny45 via the usbasp and avrdude.

The problem is that I am not sure, if it works :slight_smile:

Actually, if I export the sketch from Arduino into hex file and upload this then the application works, etc. However, should I upload the hex file version with bootloader? Is bootloader uploaded via original file? Howe

I would like to use the bootloader for the BOD...

Any comment, explanation is more than welcome!

Best.

if you want to be able flash over USB after you flash over SPI, the you should flash the hex with bootloader