Developer forums (C::B DEVELOPMENT STRICTLY!) > Plugins development
avr-kit
ratatatata:
hi, i'm an enthusiastic avr-programmer and so i've optimized the gnuavr plugin a bit..
it's not much but usefull in my opinion ;)
i'm new to codeblocks and i would be glad about any feedback, howto do it better, what suckz, what additional features could make avr-programmer's life easier, etc.
it consists of two parts, (1)sourcecode-modifications and (2)a project wizard.
and here's the patch: http://pastebin.ca/564495
just apply it to your code::blocks working copy and after compiling + installing put a logo.png and a wizard.png into the /avr dir of your templates/wizard folder ;)
sourcecode modifications:
-adding some important options like fpack-struct and -fshort-enums
-removes the -mmcu options, instead of this $(MCU) and $(F_CPU) is used now
-makes the gnuavr compiler "WarningsOn", "DebugSymbolsOn" and "OptimizationsOn" compatible
-adds the possibility to define the command that is execute when you "run" a project (thought for using avrdude)
project wizard:
this wizard asks you for your MCU, the CPU-Frequency, the object format (standard: ihex) the port for avrdude and the programm-device for avrdude.
it registers all variables (MCU, F_CPU, FORMAT, AD_PORT, AD_PROGRAMMER) and sets up two after-build commands to create the object files (program+eeprom) that's needed by avrdude.
now you can create and compile you project and with a slight click on the run button the program is transfered to your ยต-c ;)
now the only left thing i dont like is the fact that an avr-project is set up as "console program" but it is not.. i'd like to see something like "Other" or "Foreign" there, just for optical reasons.
hope you enjoy the "run"->program feature as much as i do.
cu, ratatatata
killerbot:
hi thanks for the changes.
However could you make real patches for it on berlios. Things might get most in the forum.
Just to double check, is there any other avr user who can confirm that list of compiler options being removed ?
I ask now, so that when I remove them, the next day nobody starts complaining about the fact they are gone ;-)
@biblap or Martin : in case you read this. I will take care of the source code changes, since you guys are more wizard experts can you take care of that part. I will do the source code changes either tomorrow evening or Thursday evening.
MortenMacFly:
--- Quote from: killerbot on June 12, 2007, 10:34:53 pm ---Just to double check, is there any other avr user who can confirm that list of compiler options being removed ?
--- End quote ---
The trick is that all those option groups are replaced by single options where a string is replaced that has been setup by the wizard (or in the project options as it is a custom variable). So there is not really a reduction of options. But: I'm not sure if this is quite compatible. I understand why it's done (e.g. not to have a million -mmcu flags) but as it is now the compiler options rely on replacing the macros in the command line computation. I wonder what Yiannis thinks about that...?!
--- Quote from: killerbot on June 12, 2007, 10:34:53 pm ---@biblap or Martin : in case you read this. I will take care of the source code changes, since you guys are more wizard experts can you take care of that part.
--- End quote ---
Sure thing. I had spotted this topic already... ;-)
With regards, Morten.
ratatatata:
hey, thanks for answering :)
--- Quote from: killerbot on June 12, 2007, 10:34:53 pm ---However could you make real patches for it on berlios. Things might get most in the forum.
--- End quote ---
ok i've made a "real" patch, i updated my first post, but to correct wrong things i didnt submit it to berlios yet :)
--- Quote from: MortenMacFly on June 12, 2007, 11:16:35 pm ---I understand why it's done (e.g. not to have a million -mmcu flags) but as it is now the compiler options rely on replacing the macros in the command line computation.
--- End quote ---
yes, if i think about it again it's quite unhandy to have it built in in the compiler.
i've changed it, now the project-wizard adds a compileroption with "-mmcu" && "-DF_CPU". but this brings up another problem.. what if the compiler doesnt support -mmcu?
another solution would be to add a static compiler-option called "custom mcu" and "custom frequency" to the gnuavr compiler and just activate it via wizard, but this would ban custom compilers from the wizard as long as they weren't derived from the gnuavr compiler..
what do you think? :)
ps: i replaced the mcu-selection field + the f_cpu-selection field with an combobox for easier selecting the right values :)
mornevdw:
Hi there,
Firstly, thanks for this! It great that you take the time to make life a little easier. ;)
I cant get the actual plug in from the link. :( Do you have a website or alternative download location?
Thanks in advance.
Navigation
[0] Message Index
[#] Next page
Go to full version