user25690: I've been asked to do a small project using an Ada BlueFruit board. It has a ATMega32U4. The 32U4 comes from the factory with a bootloader pre-installed. I've never used an Arduino before, but I have used AVR a bit in the past. Is the Arduino bootloader actually the one that came pre flashed from the factory? Does it even matter if it's the same bootloader as far as Flip is concerned?
Can I use the Flip batchisp utility to load my application code? We don't have a programmer handy and I don't want to muck up the bootloader on the board. 
It's my understanding that the Arduino IDE tool chain does a bit of preprocessing "behind your back". I'd much rather continue writing straight AVR code in Atmel Studio. Is there anything I need to take into account when writing my application code? For example, do I need to do anything when compiling my app code, or when uploading it, to ensure it doesn't try to write to the memory addresses in the bootloader's range?

user10794: 
Is the Arduino bootloader actually the one that came pre flashed from the factory?

You would have to ask Adafruit that.

It's my understanding that the Arduino IDE tool chain does a bit of preprocessing "behind your back". Is there anything I need to take into account when writing my application code?

The things you are talking about is generation of function prototypes, that sort of thing. It's nothing you really need to worry about.

For example, do I need to do anything when compiling my app code, or when uploading it, to ensure it doesn't try to write to the memory addresses in the bootloader's range?

No, it would be crazy for the IDE to overwrite the bootloader. Then you wouldn't be able to use it again. In fact, to change the bootloader needs special hardware. You need to connect a programmer to the ICSP pins.


I just want to know if I need to do anything special during linking to ensure there's no memory address conflicts

I doubt you need to worry about that, as long as you ensure that whatever tool you are using knows to allow room for the bootloader.

and if I can use the Flip tool to upload

I don't see why not. Or you could use the dfu-programmer as I describe in my post How to flash the USB chip on the Arduino Uno.

user2881: Arduino uses a different (second) bootloader, next to the DFU one that build into the 32u4.

user313: 
I'd much rather continue writing straight AVR code in Atmel Studio.

The Arduino IDE allows you be lazy about #includes and forward references to functions, but it won't get in your way if you choose to write correct code. 
I write standard C/C++ and switch back and forth between Eclipse (no over-helpful pre-processing) and the Arduino IDE. The Arduino IDE knows better; it just CYA (covers your assumptions :) in case you don't.

25690: <p>I've been asked to do a small project using an Ada BlueFruit board. It has a <a href="http://www.atmel.com/devices/ATMEGA32U4.aspx" rel="nofollow">ATMega32U4</a>. The 32U4 <a href="http://www.atmel.com/Images/doc7618.pdf" rel="nofollow">comes from the factory with a bootloader pre-installed</a>. I've never used an Arduino before, but I have used AVR a bit in the past. Is the Arduino bootloader actually the one that came pre flashed from the factory? Does it even matter if it's the same bootloader as far as Flip is concerned?</p>

<p>Can I use the Flip batchisp utility to load my application code? We don't have a programmer handy and I don't want to muck up the bootloader on the board. </p>

<p>It's my understanding that the Arduino IDE tool chain does a bit of preprocessing "behind your back". I'd much rather continue writing straight AVR code in Atmel Studio. Is there anything I need to take into account when writing my application code? For example, do I need to do anything when compiling my app code, or when uploading it, to ensure it doesn't try to write to the memory addresses in the bootloader's range?</p>
 10794: <blockquote>
  <p>Is the Arduino bootloader actually the one that came pre flashed from the factory?</p>
</blockquote>

<p>You would have to ask Adafruit that.</p>

<blockquote>
  <p>It's my understanding that the Arduino IDE tool chain does a bit of preprocessing "behind your back". Is there anything I need to take into account when writing my application code?</p>
</blockquote>

<p>The things you are talking about is generation of function prototypes, that sort of thing. It's nothing you really need to worry about.</p>

<blockquote>
  <p>For example, do I need to do anything when compiling my app code, or when uploading it, to ensure it doesn't try to write to the memory addresses in the bootloader's range?</p>
</blockquote>

<p>No, it would be crazy for the IDE to overwrite the bootloader. Then you wouldn't be able to use it again. In fact, to change the bootloader needs special hardware. You need to connect a programmer to the ICSP pins.</p>

<hr>

<blockquote>
  <p>I just want to know if I need to do anything special during linking to ensure there's no memory address conflicts</p>
</blockquote>

<p>I doubt you need to worry about that, as long as you ensure that whatever tool you are using knows to allow room for the bootloader.</p>

<blockquote>
  <p>and if I can use the Flip tool to upload</p>
</blockquote>

<p>I don't see why not. Or you could use the dfu-programmer as I describe in my post <a href="http://www.gammon.com.au/forum/?id=11635&amp;reply=2#reply2" rel="nofollow">How to flash the USB chip on the Arduino Uno</a>.</p>
 2881: <p>Arduino uses a different (second) bootloader, next to the DFU one that build into the 32u4.</p>
 313: <blockquote>
  <p>I'd much rather continue writing straight AVR code in Atmel Studio.</p>
</blockquote>

<p>The Arduino IDE allows you be lazy about #includes and forward references to functions, but it won't get in your way if you choose to write correct code. </p>

<p>I write standard C/C++ and switch back and forth between Eclipse (no over-helpful pre-processing) and the Arduino IDE. The Arduino IDE knows better; it just CYA (covers your assumptions :) in case you don't.</p>
