Author Topic: Can't find attiny441 in linux Code::Blocks avr toolchain  (Read 5131 times)

Offline moricef

  • Single posting newcomer
  • *
  • Posts: 6
Can't find attiny441 in linux Code::Blocks avr toolchain
« on: June 26, 2022, 09:58:20 pm »
Hi,
I use Code::Blocks v 20.03 for Linux and GNU GCC Compiler for AVR. I can't find the ATtiny441 (neither ATTiny841) in the list of MCU. I add it in /usr/share/codeblocks/compilers/options_avr-gcc.xml and ~/.local/share/codeblocks/compilers/options_avr-gcc.xml but it never appears in the list when I make an avr project.
Yet ATtiny441 is in /usr/lib/avr/lib/ in fact in the linux avr toolchain.
In the compiler settings I add /usr/lib/avr/lib/ in toolchain executables additionnal paths
But nothing anywhere...
How I can add these mcu ?
« Last Edit: June 26, 2022, 10:18:19 pm by moricef »

Offline BlueHazzard

  • Developer
  • Lives here!
  • *****
  • Posts: 3353
Re: Can't find attiny441 in linux Code::Blocks avr toolchain
« Reply #1 on: June 27, 2022, 09:44:14 pm »
can you share the modified xml files?

Offline Miguel Gimenez

  • Developer
  • Lives here!
  • *****
  • Posts: 1553
Re: Can't find attiny441 in linux Code::Blocks avr toolchain
« Reply #2 on: June 28, 2022, 04:32:03 pm »
Do not edit the files directly, just press right mouse button on the Compiler Flags pane (inside Global Compiler Settings) and add it.

Offline BlueHazzard

  • Developer
  • Lives here!
  • *****
  • Posts: 3353
Re: Can't find attiny441 in linux Code::Blocks avr toolchain
« Reply #3 on: June 28, 2022, 09:43:03 pm »
Also if you are talking about the new project wizard, you have to right click on the AVR symbol and edit script to add new controllers

Offline moricef

  • Single posting newcomer
  • *
  • Posts: 6
Re: Can't find attiny441 in linux Code::Blocks avr toolchain
« Reply #4 on: June 29, 2022, 12:26:51 am »
can you share the modified xml files?
Thanks for your reply. Yes, in attachment.

I can't editing the wizard script. It's in read only mode.
« Last Edit: June 29, 2022, 12:31:59 am by moricef »

Offline moricef

  • Single posting newcomer
  • *
  • Posts: 6
Re: Can't find attiny441 in linux Code::Blocks avr toolchain
« Reply #5 on: July 01, 2022, 04:19:43 pm »
Why does Code::Blocks ignore my settings for the toolchain and why is the toolchain offered by Code::Blocks outdated compared to the one installed on Debian 11?
 
Why is the wizard script in readonly mode?
Why do I have to copy the file /usr/share/codeblocks/templates/wizard/avr/wizard.script to ~/.local/share/codeblocks/templates/wizard/avr/ so that right clicking on avr wizard does open  a read-write file?
Why does the CPU list not contain the ATtiny441 though I changed /usr/share/codeblocks/templates/wizard/avr/wizard.script AND ~/.local/share/codeblocks/templates/wizard/avr/wizard.script
« Last Edit: July 01, 2022, 05:11:09 pm by moricef »

Offline Miguel Gimenez

  • Developer
  • Lives here!
  • *****
  • Posts: 1553
Re: Can't find attiny441 in linux Code::Blocks avr toolchain
« Reply #6 on: July 01, 2022, 04:40:11 pm »
C::B does not supply a toolchain, just allows using whatever you have.

Offline moricef

  • Single posting newcomer
  • *
  • Posts: 6
Re: Can't find attiny441 in linux Code::Blocks avr toolchain
« Reply #7 on: July 01, 2022, 05:22:06 pm »
@Miguel Gimenez

In the compiler settings I add /usr/lib/avr/lib/ in toolchain executables additionnal paths

So why is there attiny441 and attiny841 in

ls /usr/lib/avr/lib/avr25/
(...) crtattiny441.o crtattiny461a.o crtattiny841.o (...)

and why compiling avr-gcc -g -mmcu=attiny441 -Wall -Os -c main.c does not return an error?

Where are Brian Sidebotham and H. Metin OZER  ?
« Last Edit: July 01, 2022, 05:28:55 pm by moricef »

Offline moricef

  • Single posting newcomer
  • *
  • Posts: 6
Re: Can't find attiny441 in linux Code::Blocks avr toolchain
« Reply #8 on: July 01, 2022, 06:16:10 pm »
The same on Windows10.
Installed avr-gcc-12.1.0-x64-windows from https://blog.zakkemble.net/avr-gcc-builds/
Compiler settings on C:\Program Files (x86)\avr-gcc-12.1.0-x64-windows
additional paths C:\Program Files (x86)\avr-gcc-12.1.0-x64-windows\utils\bin
wizard script modified  and added attiny441
BUT NOTHING in the processors list
Wtf ???
« Last Edit: July 01, 2022, 06:19:16 pm by moricef »

Offline BlueHazzard

  • Developer
  • Lives here!
  • *****
  • Posts: 3353
Re: Can't find attiny441 in linux Code::Blocks avr toolchain
« Reply #9 on: July 03, 2022, 02:03:06 am »
The list is onyl for convenience, you always can add the mcu flag by hand in the compiler options of the project....

About your problem in linux, how do you have installed codeblocks? Some kind of installations can lead to codeblocks being installed as sudo so you can not modify the file by non sudo user

BUT NOTHING in the processors list
What list are you talking about? The list in the new project wizard, or the list in the compiler settings?
How do you install codeblocks on windows? The different installation methods lead to different search paths for the files...

PS. i till try to update the list

Offline moricef

  • Single posting newcomer
  • *
  • Posts: 6
Re: Can't find attiny441 in linux Code::Blocks avr toolchain
« Reply #10 on: July 03, 2022, 01:15:07 pm »
The list is onyl for convenience, you always can add the mcu flag by hand in the compiler options of the project....

About your problem in linux, how do you have installed codeblocks? Some kind of installations can lead to codeblocks being installed as sudo so you can not modify the file by non sudo user

BUT NOTHING in the processors list
What list are you talking about? The list in the new project wizard, or the list in the compiler settings?
How do you install codeblocks on windows? The different installation methods lead to different search paths for the files...

PS. i till try to update the list

Ok and thanks for your reply.
I've insalled Code::Blocks from Debian repositery with apt. So yes the permissions must be set to the user. Now it's ok with the copy of the wizard script under the user space.

I talk about the new project wizard but with your simple reply, now I understand : I must change the flag compiler in the compiler options of my project.

Many thanks for update the wizard list
« Last Edit: July 07, 2022, 03:35:56 pm by moricef »

Offline BlueHazzard

  • Developer
  • Lives here!
  • *****
  • Posts: 3353
Re: Can't find attiny441 in linux Code::Blocks avr toolchain
« Reply #11 on: July 03, 2022, 10:37:15 pm »
So i found out, that the wizard list is not stored in the script but in the dialogue itself.

I was wondering, is someone is using the fuse bits, because i think i will remove them... I think they make more confusion and complicate things rater than helping

Offline Miguel Gimenez

  • Developer
  • Lives here!
  • *****
  • Posts: 1553
Re: Can't find attiny441 in linux Code::Blocks avr toolchain
« Reply #12 on: July 04, 2022, 08:56:52 pm »
In options_avr-gcc.xml the ATtiny40 has two entries, the first with uppercase and the second with lowercase, is this correct?

Both generate the same flag,
Code
-mmcu=attiny40

Offline BlueHazzard

  • Developer
  • Lives here!
  • *****
  • Posts: 3353
Re: Can't find attiny441 in linux Code::Blocks avr toolchain
« Reply #13 on: July 05, 2022, 09:08:13 am »
In options_avr-gcc.xml the ATtiny40 has two entries, the first with uppercase and the second with lowercase, is this correct?

Both generate the same flag,
Code
-mmcu=attiny40


Yea, this is wrong. There should only be one attiny40 entry

Offline Miguel Gimenez

  • Developer
  • Lives here!
  • *****
  • Posts: 1553
Re: Can't find attiny441 in linux Code::Blocks avr toolchain
« Reply #14 on: July 05, 2022, 01:50:06 pm »
Fixed in r12846.

There are some ATTiny in the XMega group.