queezythegreat / arduino-cmake

Arduino CMake Build system
648 stars 216 forks source link

Added some features to support pure AVR (non-Arduino) usage #56

Closed igormiktor closed 11 years ago

igormiktor commented 11 years ago

Hi Tomasz,

First of all, thank you very much for arduino-cmake. It is wonderful!

I end up doing more and more pure AVR (non-Arduino) coding. Your toolset works great for doing this kind of work, simply using the NO_AUTOLIBS and MANUAL options. It is better than any of the other AVR toolchains, especially as I can use a single toolchain to work in either Arduino or AVR mode.

Still, I've worked it long enough that I wanted to recommend some changes to make this usage even easier and pass them for your consideration. Please look at branch "igor" in my forked version of your repository.

There are 4 distinct, independent commits that do the following:

1 - Fix minor errors in the documentation that appears in the comments section of your code 2 - Changes the size reporting to report on both fimware and eeprom image sizes and provide the more detailed by section information 3 - Change the upload target so that it uploads both firmware and eeprom images 4 - Adds two new functions, generate_avr_firmware() and generate_avr_library() that work just like generate_arduino_XXX() except that you don't pass NO_AUTOLIBS or MANUAL -- these options are implied. I coded these functions to just call the corresponding generate_arduino_XXX() functions appending the NO_AUTOLIBS and MANUAL arguments.

I'm not very experienced with CMake, so pehaps there are better ways to code the functions in patch 4.

Thanks for considering these changes.

Igor

igormt@alumni.caltech.edu

queezythegreat commented 11 years ago

Hi, I'm glad you like my project and thanks for contributing!

I'll have a look at your changes when I have some free time.

Initailly everything looks good, I might change the way you have implemented those generate_XXX functions other than that everything looks great.

igormiktor commented 11 years ago

Hi Tomasz,

Thanks.

I'm not surprised you'll improve on my implementation of the generate_XXX functions -- my knowledge of CMake is limited (as is probably obvious :)

Thanks again for creating arduino-cmake.

Igor

On 01/06/2013 01:18 PM, Tomasz Bogdal wrote:

Hi, I'm glad you like my project and thanks for contributing!

I'll have a look at your changes when I have some free time.

Initailly everything looks good, I might change the way you have implemented those generate_XXX functions other than that everything looks great.

— Reply to this email directly or view it on GitHub https://github.com/queezythegreat/arduino-cmake/pull/56#issuecomment-11931889.

Web Bug from https://github.com/notifications/beacon/Jshd8sI44GVrKZBvymxqKBqhQsqWebnFS1bc4um3Sg9ckFu06ouH7VTOKbldfYJy.gif

queezythegreat commented 11 years ago

Hi,

I haven't been around for the last couple of months (I was very busy with work), and I completely forgot about your patch. I will be doing some integration work on Arduino CMake in a couple of days, and I will try to get your patch integrated.

Sorry for not responding.

igormiktor commented 11 years ago

No worries!

Igor

On 04/09/2013 04:05 PM, Tomasz Bogdal wrote:

Hi,

I haven't been around for the last couple of months (I was very busy with work), and I completely forgot about your patch. I will be doing some integration work on Arduino CMake in a couple of days, and I will try to get your patch integrated.

Sorry for not responding.

— Reply to this email directly or view it on GitHub https://github.com/queezythegreat/arduino-cmake/pull/56#issuecomment-16136689.Web Bug from https://github.com/notifications/beacon/FYVSQp5Fb7MCufDAtpdR4BTFQbLnslxQl8lFnQRdG2SgB_7On3KtV3u1LF7GgKkb.gif

queezythegreat commented 11 years ago

I just integrated your changes into the develop branch, could you please look at it.

I'm not sure if everything merged in correctly. The size reporting script has changed since your changes where made, please confirm it reports the correct values.

Also could you please provide a pure avr example, I still want to cleanup the generateavr* command but I don't have a good example. Thanks for contributing, and sorry for the loooooong delay :)

igormiktor commented 11 years ago

I'm traveling right now, but I can test and get you an example over the weekend. Hope that is okay.

Igor

On 04/09/2013 09:36 PM, Tomasz Bogdal wrote:

I just integrated your changes into the develop branch, could you please look at it.

I'm not sure if everything merged in correctly. The size reporting script has changed since your changes where made, please confirm it reports the correct values.

Also could you please provide a pure avr example, I still want to cleanup the generateavr* command but I don't have a good example. Thanks for contributing, and sorry for the loooooong delay :)

— Reply to this email directly or view it on GitHub https://github.com/queezythegreat/arduino-cmake/pull/56#issuecomment-16150706.Web Bug from https://github.com/notifications/beacon/FYVSQp5Fb7MCufDAtpdR4BTFQbLnslxQl8lFnQRdG2SgB_7On3KtV3u1LF7GgKkb.gif

queezythegreat commented 11 years ago

Great, no worries I can wait :)

igormiktor commented 11 years ago

Sorry! Got wrapped up in a zillion things when I got back from my trip and completely forgot about this.

Attached is a very simple pure avr example that you can use for testing.

Note that you'll need to tweak the setting for CMAKE_TOOLCHAIN_FILE in the CMakeLists.txt file.

I'm buried with work this week, but I really promise to test the new changes you made this weekend.

Igor

On 04/09/2013 09:36 PM, Tomasz Bogdal wrote:

I just integrated your changes into the develop branch, could you please look at it.

I'm not sure if everything merged in correctly. The size reporting script has changed since your changes where made, please confirm it reports the correct values.

Also could you please provide a pure avr example, I still want to cleanup the generateavr* command but I don't have a good example. Thanks for contributing, and sorry for the loooooong delay :)

— Reply to this email directly or view it on GitHub https://github.com/queezythegreat/arduino-cmake/pull/56#issuecomment-16150706.Web Bug from https://github.com/notifications/beacon/FYVSQp5Fb7MCufDAtpdR4BTFQbLnslxQl8lFnQRdG2SgB_7On3KtV3u1LF7GgKkb.gif

queezythegreat commented 11 years ago

Hi, I don't see anything attached.

igormiktor commented 11 years ago

Here it is. Sorry.

Igor

On 05/11/2013 08:47 AM, Tomasz Bogdal wrote:

Hi, I don't see anything attached.

— Reply to this email directly or view it on GitHub https://github.com/queezythegreat/arduino-cmake/pull/56#issuecomment-17759438.Web Bug from https://github.com/notifications/beacon/FYVSQp5Fb7MCufDAtpdR4BTFQbLnslxQl8lFnQRdG2SgB_7On3KtV3u1LF7GgKkb.gif

queezythegreat commented 11 years ago

Hi, are you attaching the code via email? I don't think GitHub allows email attachments, because I still don't see anything.

igormiktor commented 11 years ago

I just reply to the email....

You can grab the file here:

https://dl.dropboxusercontent.com/u/88651249/arduino-plain.tar.gz

Igor

On 05/12/2013 07:51 AM, Tomasz Bogdal wrote:

Hi, are you attaching the code via email? I don't think GitHub allows email attachments, because I still don't see anything.

— Reply to this email directly or view it on GitHub https://github.com/queezythegreat/arduino-cmake/pull/56#issuecomment-17776758.Web Bug from https://github.com/notifications/beacon/FYVSQp5Fb7MCufDAtpdR4BTFQbLnslxQl8lFnQRdG2SgB_7On3KtV3u1LF7GgKkb.gif

queezythegreat commented 11 years ago

Thanks! I will have a look at it when I have some free time.