Go Down

Topic: Custom bootloader compiling - no idea what I'm doing (Read 103 times) previous topic - next topic

aalvarado028

Hello!

I am fairly unfamiliar with how code is complied and how it is manipulated, so just about all my projects are a single .c file that I upload to my microcontrollers. Linkers, .hex files and such are all quite foreign so please bare with me.

For my current project I am developing a device that has in-the-field update capabilities using a bootloader and the device's serial port. I am using the ATmega328p microcontroller.

I have a custom bootloader that I am developing that needs to be uploaded to the ATmega along with an application block of software. This device is going to be sent out to be manufactured and when the manufacturers program the device, they need a single file. Preferably a .hex file.

My question is how on earth do you consolidate the boot block and the application block into one file? I am using Atmel Studio 7.0 and have done some digging and it looks like you can assign memory addresses to where files will write to in the linker settings but I have no idea how to actually do this.

I have a Sketch.cpp file that contains all necessary software with includes and everything that is my application block, and I have a file boot.c that contains all my bootloading software. How do I assign these to be programmed to the right memory locations and how do I get Atmel Studio to generate a .hex file with these two files in it?

Thank you in advance!

spycatcher2k

More an Atmel Studio support question. This is the Arduino forum!

It's easy in the Arduino IDE - Just export the compiled hex, and 2 versions are created, with and without the bootloader.
Mrs Drew
-=-
http://www.uk-pcb.co.uk - UK PCB Fab Company
I will design & code for you, but I will also charge you (PM me)
If you don't like my answers, realize : I'm not being cheeky, I'm Just trying to prompt you to use your own brain/google etc.

Go Up