codeblocks, gcc-avr, linux mint... need advice on getting these working on my computer!

Go To Last Post
12 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

hello, its been almost 10 years since I've written any C code for AVR processors. 

I am running the Linux Mint operating system. It has CodeBlocks installed, along with

avr-gcc. I opened an old program I wrote years ago, and got an error message saying that

io.h could not be found. In the past, I used a static build for a compiler I downloaded from a l

ink on this site, with a makefile and compiled using the "make" command. this worked well,

but my eyes aren't so good anymore and I want to set uo a gui based toolchain to write code with.

P.S..... my dog stole my wife, shot up my trailer with an AK-47, and set me on fire :>)

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 1

Welcome back.

 

Might I suggest you look at Microchips MPLAB as it runs on Linux, and it now supports AVRs!!

 

Microchip bought Atmel and integrated the AVR line into MPLAB.

 

Might be easier than trying to roll you own GUI.

 

AND MPLAB supports Atmels Debugging tools like the ICE, and other tools

 

 

Jim

I would rather attempt something great and fail, than attempt nothing and succeed - Fortune Cookie

 

"The critical shortage here is not stuff, but time." - Johan Ekdahl

 

"Step N is required before you can do step N+1!" - ka7ehk

 

"If you want a career with a known path - become an undertaker. Dead people don't sue!" - Kartman

"Why is there a "Highway to Hell" and only a "Stairway to Heaven"? A prediction of the expected traffic load?"  - Lee "theusch"

 

Speak sweetly. It makes your words easier to digest when at a later date you have to eat them ;-)  - Source Unknown

Please Read: Code-of-Conduct

Atmel Studio6.2/AS7, DipTrace, Quartus, MPLAB, RSLogix user

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Thanxx, will check it out!

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

at a command line try

 

sudo apt-get install make git gcc-avr binutils-avr gdb-avr avr-libc avrdude

 

that should get a toolchain, but who knows what Mint will have (is it from Ubuntu or Debian now?).

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Or there's platformIO

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Amplifying Ron's comment: io.h is considered part of "avr-libc", and you won't have it if you ONLY installed avr-gcc.

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

ron_sutherland wrote:
that should get a toolchain, but who knows what Mint will have (is it from Ubuntu or Debian now?).
Perhaps more "stable" way to get a Linux toolchain is:

 

https://www.microchip.com/mplab/...

 

But either Arduino or MPLABX should deliver something "solid".

 

(the problem with apt-get's from a repo is that you don't know the provenance of the build - it could have been done well by someone who really knows what they are doing or it might be something cobbled togethr).

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 1

ron_sutherland wrote:

at a command line try

 

sudo apt-get install make git gcc-avr binutils-avr gdb-avr avr-libc avrdude

 

that should get a toolchain, but who knows what Mint will have (is it from Ubuntu or Debian now?).

 

thanks, Ron. this got me going again. 10 minutes from download to a successful flash of a 90S2313.

Thanks to everyone else who replied, Going to explore all suggestions, looking foreward to becoming

proficient with MCUs again!

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

"Dare to be naïve." - Buckminster Fuller

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

AVR debugging has been restored to PlatformIO via a FOSS AVR simulator (simavr)

Microchip's AVR simulator has a form in Linux.

 

Tools & Debug Probes | Debugging — PlatformIO 5.0.2b2 documentation

Debugging | Atmel AVR — PlatformIO 5.0.2b2 documentation

http://packs.download.atmel.com/#collapse-Atmel-ATtiny-DFP-pdsc

<DFP>/simulator/linux64

in .pdsc :

                  <at:property name="com.atmel.avrdbg.tool.simulator.key" value="ATtiny2313A"/>
                  <at:property name="com.atmel.avrdbg.tool.simulator.model.win32" value="simulator/win32/libattiny4313.dll"/>
                  <at:property name="com.atmel.avrdbg.tool.simulator.model.linux64" value="simulator/linux64/libattiny4313.so"/>

 

"Dare to be naïve." - Buckminster Fuller

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

clawson wrote:
the problem with apt-get's from a repo is that you don't know the provenance of the build

 

On Debain the packages can be checked, for example

 

https://packages.debian.org/sid/avr-libc

 

takes us to

 

https://qa.debian.org/developer.php?login=hakan%40debian.org

 

https://qa.debian.org/cgi-bin/vcswatch?package=avr-libc

 

https://salsa.debian.org/debian/avr-libc

 

I have no idea what Mint is doing, but I know it is based on Debian (once or twice removed); Ubuntu packages use to be from Debian, but some are snaps now, and those are a matter of trusting the packager. For example, I trust that "sudo apt-get install code" is OK, it is done by Microsoft and installs VSCode, but other than that and the snaps Ubuntu does, I avoid them. I can audit the Debian packages much better, and their packages have a history that I can look over.

 

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

A point I note using code:blocks on mint 19.3 Cinnamon (64-bit x86) - it's about as stable as a very very wobbly thing. Interesting effects I've noticed recently include

 

  • randomly shutting down without warning (and without saving edited files)
  • opening existing files showing a blank page
  • trying to open files showing an empty file select box rather than the expected directory
  • debug working if it feels like it, but sometimes just claiming that the debug window has been closed before it's even opened

 

That said, I do prefer CB to anything with eclipse in it which while it has a much better debug interface (apart from anything else, CB's interface defaults to decimal values for variables requires each variable to be configured as hex, which is promptly forgotten next time you need it) it's an absolute octopus in that bits of it seem to get stuck all over the OS, and it ends up not working with itself for various reasons - at the moment I have a System Workbench for STM32 which works fine, but an x86 dev configuration won't even start...

 

Neil