Upload code without boot-loader questions!!!!

I think I just accidentally did something wrong, that actually turn out right, but I am not sure.

What I did was, I had hooked up my Nano to an USBasp programmer, and opened an example LED blinker stretch, and accidentally pressed the burn boot-loader button. Now my nano’s LED is flashing. Here are few of my question:

1, Did I just erase the boot-loader of my nano, and replaced it with this LED blinker sketch? (My nano still works, meaning I can still upload sketch the same old way. is that meant that the bootloader has not been erased? )

2, is this the correct way to upload my sketch to an IC without the boot-loader, ie using “burn boot-loader”, instead of the normal “upload” button?

3, I am planning to make a new board with the same ic as the nano which runs with its internal 8mhz crystal, but there isn’t a board option in the menu, what do I need to do?

4, I have been playing with a digispark that runs on only one attiny85 ic, and It works with USB, and I want to make this function available for my new board that is going to run on an atmeage328 ic, what do I need to do?

LED code

int led = 13;

// the setup routine runs once when you press reset:
void setup() {                
  // initialize the digital pin as an output.
  pinMode(led, OUTPUT);     
}

// the loop routine runs over and over again forever:
void loop() {
  digitalWrite(led, HIGH);   // turn the LED on (HIGH is the voltage level)
  delay(500);               // wait for a second
  digitalWrite(led, LOW);    // turn the LED off by making the voltage LOW
  delay(1000);               // wait for a second
}

The output txt file is very interesting

output.txt (13.5 KB)

DOnt bother about the bootloader ; u need avr pocket programmer to upload bottloader or additional programmer

You just connect you board upload trial example. If it is working no problem.

If you get error avrdude stk500_getsync() not in syncerror that means you crashed bootloader or you might connected TX & RX line of the board. because of which u get errors

Unless u wont have problem uploading no issue with bootloader

1, Did I just erase the boot-loader of my nano, and replaced it with this LED blinker sketch? (My nano still works, meaning I can still upload sketch the same old way. is that meant that the bootloader has not been erased? )

NO

2, is this the correct way to upload my sketch to an IC without the boot-loader, ie using "burn boot-loader", instead of the normal "upload" button?

No. First you need to choose your programmer from IDE menu : Tools -> Programmer
Then, to upload your sketch using programmer, yon need to use menu : File -> Upload using programmer

3, I am planning to make a new board with the same ic as the nano which runs with its internal 8mhz crystal, but there isn't a board option in the menu, what do I need to do?

You need to create and entry in boards.txt file : http://playground.arduino.cc/Main/CustomizeArduinoIDE
Just google "YourChipName 8Mhz Arduino bare bones" or something like that.

4, I have been playing with a digispark that runs on only one attiny85 ic, and It works with USB, and I want to make this function available for my new board that is going to run on an atmeage328 ic, what do I need to do?

You need to write a USB driver for your chip.

guix:
No, the "burn bootloader" button does not upload the current sketch to your arduino, it will upload the boot loader, which is a small program that allow programming arduinos with a computer, without the need of an external programmer :wink:

Thanks. I see. then how can I erase this bootloader, and upload that LED blinker directly to my nano using the USBasp programmer?

also, I have tested using a program called progisp172 to erase the bootloader and after that the LED won't blink again, but then after using arduino IDE to burn the boot-loader and then it flashes again. but isn't "burn bootloader" just burn the bootloader, why my erased nano with the newly burned bootloader still flashes?

waski:
NO

No. First you need to choose your programmer from IDE menu : Tools -> Programmer
Then, to upload your sketch using programmer, yon need to use menu : File -> Upload using programmer

You need to create and entry in boards.txt file : http://playground.arduino.cc/Main/CustomizeArduinoIDE
Just google "YourChipName 8Mhz Arduino bare bones" or something like that.

You need to write a USB driver for your chip.

thanks a lot for the info.

I did tried upload my sketch using programmer!! and it works
then going back uploading the old way with a mini usb cable, it gave this error, which is good thing. is that mean the bootloader has been erased now?
avrdude: stk500_getsync(): not in sync: resp=0x00

write my own USB driver sounds too hard for me. is there another way around?

Yes, bootloader is erased now.

write my own USB driver sounds too hard for me. is there another way around?

Then use the FT232RL chip ( USB - UART converter ). This is the easiest way.