Author Topic: Codeblock will not recognize AVR32 Compiler  (Read 2823 times)

Offline minou

  • Single posting newcomer
  • *
  • Posts: 6
Codeblock will not recognize AVR32 Compiler
« on: December 30, 2014, 03:47:27 am »
I have some problems with codeblocks which makes it unusable for me.

It cannot recognize my installation of the AVR32 C,C++ compiler. It lists a lot of compilers that are not even present on the system,
it does have an option to add another compiler but it is not possible to change the debugger to be the correct one.
It is impossible to choose another debugger beside gdb, my debugger is avr32-gdb

If I call avr32-gdb from the command line it works fine but I cannot call it from codeblock as it wants to use gdb which is the Linux debugger and not the one that works with avr32gdbproxy from Atmel


My system is arch linux on an 64 bits 6 core AMD processor

Michel

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 11931
    • Travis build status
Re: Codeblock will not recognize AVR32 Compiler
« Reply #1 on: December 30, 2014, 10:55:27 am »
1. Goto Settings->Debugger
2. Create new configuration name if avr32-gdb for example
3. Setup the path to the proper executable
4. Goto Settings->Compiler->AVR GCC->Toolchain executable
5. Choose the proper configuration for the debugger
6. Select Debug->Active debuggers->Target's default

You can skip steps 4-6 and directly set the debugger you want to use in Debug->Active debuggers.
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline minou

  • Single posting newcomer
  • *
  • Posts: 6
Re: Codeblock will not recognize AVR32 Compiler
« Reply #2 on: January 01, 2015, 11:38:22 pm »
Thank you for the information. It was not enough though but I did figured things out.
I did find a bug that I could overcome with changing the codeworks configuration.
When sniffing for the compiler it adds some bogus include on /usr/local even though I stipulate that the include is on /usr/avr32/include, I have no mention anywhere of /usr/local, I have no clue where it is getting that bogus information but it is easy to fix when you are setting up codeworks.

I had to create two files and put them on /usr/share/codeblocks/compilers which I included as attachment.
I tested with an EVK1101 board since my arduino boards with AVR32 UC3C1512 aren't here yet.
If you have some engineering parts you can make the new atmel binaries accept them with a little patch.
If your devices are some other engineering parts just look into an older framework for the proper lines to add.


inside
/usr/avr32/include/avr32/io.h

add

#elif (defined __AVR32_UC3B0256ES__)
#include <avr32/uc3b0256es.h>
#elif (defined __AVR32_UC3C1512CREVC__)
#include <avr32/uc3c1512crevc.h>
#elif (defined __AVR32_UC3C0512CREVC__)
#include <avr32/uc3c0512crevc.h>



The avr32program, avr32-gdb and avr32gdbproxy from eclipse marketplace work beautifully on a recent archlinux.
I could not get them to work on gentoo without importing certain old libraries. It works fine on scientific linux with the Fedora 12 stuff.

If anyone is interested in my script for archlinux feel free to ask.
My scripts take care of copying the binaries to the right place as well as the xml part information needed for avr32program.
avr32program doesn't like the new ones but the ones with eclipse work.
I use jtagice mkII , there is no linux support for jtagice 3

Please note that if you need to use my patch with windows, you will need to add the proper directories.
I do not use windows at home and at work I only use IAR for the AVR32 so I have no idea where the avr32-gcc files are on windows.
Look into another compiler file to know the syntax needed for windows.

Michel



[attachment deleted by admin]
« Last Edit: January 01, 2015, 11:40:48 pm by minou »

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 11931
    • Travis build status
Re: Codeblock will not recognize AVR32 Compiler
« Reply #3 on: January 02, 2015, 12:59:25 am »
Changing stuff in usr is no always a good idea.
This is a bug in codeblocks that could be fixed by removing /usr/include and /usr/lib from Settings -> Compiler -> your compiler -> Search paths.
For some unknown reason C::B adds this path in there.
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]