Code::Blocks Forums

Developer forums (C::B DEVELOPMENT STRICTLY!) => Development => Topic started by: BrianSidebotham on September 24, 2007, 05:39:17 pm

Title: New Wizard for Atmel AVR projects
Post by: BrianSidebotham on September 24, 2007, 05:39:17 pm
Hi guys,

I've attached a wizard for Atmel AVR projects as a zip file. This contains all of the files needed.

I have also attached a patch for current svn which strips the processor choice out of the standard compiler options (This is now done via the wizard). Although this is easier for someone to manage when starting a project, the main benefit is that the processor type now gets passed to the linker as it should really.

I also added a few commonly used code generation compiler options for the AVR.

There are various options provided by the wizard, which cover 95% of AVR projects. Although, I'm sure over time it can be improved a lot.

Let me know your comments and/or suggestions.

Oh, if anyone fancies doing the graphics differently for the wizard, please do! I just put the quickest of quick png's together to get the wizard done!

edit: The patch also modifies the config.script and common_functions.script files to allow c::b to set the debug and optimization options properly.

[attachment deleted by admin]
Title: Re: New Wizard for Atmel AVR projects
Post by: Biplab on September 24, 2007, 05:55:23 pm
Thanks for the wizard. I can't test it's functionality. But I'll just test it (to see how it works ;)) and put it in repo tomorrow. :)
Title: Re: New Wizard for Atmel AVR projects
Post by: BrianSidebotham on September 24, 2007, 06:06:55 pm
No problem.

There is one issue I can think of. I use --no-change-warnings with avr-objdump to prevent avr-objdump resulting in an error when there is no section .eeprom in the .elf output

This happens when the user hasn't initialised any .eeprom variables. This works for the current binutils avr-objdump, but not for the avr-objdump currently supplied with winavr (the option is non-functional).

This is only really a problem if someone chooses to create more than one output type, as you'll see with the wizard.

If there is a way of getting c::b to ignore an error from a command, then it would be good to incorporate it on the avr-objcopy post build commands.
Title: Re: New Wizard for Atmel AVR projects
Post by: Biplab on September 24, 2007, 06:22:47 pm
If there is a way of getting c::b to ignore an error from a command, then it would be good to incorporate it on the avr-objcopy post build commands.

You can mark that error message as an warning message by changing the appropriate regex string. I don't do embedded programming and honestly I can't suggest anything beyond that. :)
Title: Re: New Wizard for Atmel AVR projects
Post by: BrianSidebotham on September 24, 2007, 06:36:51 pm
Okay, I'll look into that approach. Thanks for the pointer.
Title: Re: New Wizard for Atmel AVR projects
Post by: Keyla on September 24, 2007, 08:54:51 pm
Great but I have to wait till I can test it (bigger bandwith in 2 weeks)
Title: Re: New Wizard for Atmel AVR projects
Post by: Biplab on September 25, 2007, 07:32:52 am
I've added it to repo and I've one question.

1) The wizard generates a virtual folder named, Auto-generated, without any files inside it. Is it intentional?

I've applied your patch, too. But excluding the portion which patches the GNUAvr compiler. :)
Title: Re: New Wizard for Atmel AVR projects
Post by: killerbot on September 25, 2007, 08:00:57 am
auto-generated --> is an extension in CB core : rev 4485 I think
Title: Re: New Wizard for Atmel AVR projects
Post by: Biplab on September 25, 2007, 08:27:53 am
auto-generated --> is an extension in CB core : rev 4485 I think

Thanks for pointing that. :)
Title: Re: New Wizard for Atmel AVR projects
Post by: BrianSidebotham on September 25, 2007, 10:57:04 am
Thanks for putting it in. I will check the wizard when it gets rolled into a nightly. If it needs altering / updating because of some recent changes, just let me know.
Title: Re: New Wizard for Atmel AVR projects
Post by: Keyla on September 25, 2007, 09:17:52 pm
*bling* And God said it should be become into the nightly  :lol:
I think I like this speed of development  :shock: