Adding Microchips Support Responses. Case Comments Comment *Created By: Brian Holaday <https://microchipsupport.force.com/0051N000005UerV> (12/28/2018 12:12 PM)* Created Attachment: Shot2.png *Created By: Brian Holaday <https://microchipsupport.force.com/0051N000005UerV> (12/28/2018 12:11 PM)* Hi Amit,
Looking at your screenshots I see that the GCC-AVR compiler is installed on Windows automatically. On Linux this is packaged as (gcc-avr) or downloading the toolkit manually for each project. I have created a debian bug request: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=917390 and reached the developer to see if we can get the versioning fixed in gcc-avr on build. If you look at the screenshot I attached their is a version mismatch between the downloaded version and packaged version in debian. The project is also here: https://salsa.debian.org/debian/gcc-avr/branches ** Again if we can wait for Hakan (developer) for packing gcc-avr to fix this then it would be much easier using one tool for install than providing a backup install to /opt/ like I suggested. It almost might be easier also to reach out to the debian packaging team to see if MP LAB X and the other toolkits could be complied into a package. ** Link #1: https://wiki.debian.org/HowToPackageForDebian (Packaging) Link #2: https://www.debian.org/doc/manuals/maint-guide/ (Guidance) Link #3: You could email ha...@debian.org if you have questions : at least I came to him for reporting. I just would hate to see MP LAB X be complied from their own tool base but rather use what has been set up. *Created By: Amit Shali <https://microchipsupport.force.com/005o0000002d1LV> (12/28/2018 5:34 AM)* Hi Brian, Thanks for reporting this. I was able to replicate the AVR and AVRASM 2 toolchain selection issue under Ubuntu 16.04. Steps to replicate: a. Create a new standalone project under MPLAB X IDE b. Select ATMEGA328P and Atmel-ICE c. AVR or AVRASM 2 isn’t selectable However, this issue didn't occur on my Windows machine. I have attached screenshots from my Windows machine. We will investigate this in depth. I will keep you posted on the updates on this. Regards, Amit *Created By: Brian Holaday <https://microchipsupport.force.com/0051N000005UerV> (12/27/2018 1:12 AM)* I figured out the issue with my Debian install and MPLab X. I will share the results below after looking at patching: Please correct: http://microchipdeveloper.com/install:mplabx-lin64 Debian: Ubuntu and Mint: (dpkg) #sudo dpkg --add-architecture i386 #sudo apt-get install libc6:i386 libx11-6:i386 libxext6:i386 libstdc++6:i386 libexpat1:i386 #sudo apt-get install gcc-avr avr-libc Attempt #1: Fail on GCC-AVR MPLAB X requires gcc-avr to be installed if using an ATMEGA* however I found out that for now this package on Debian needs re-worked with versioning for this to work on MPLAB X. I did install this package and a toolchain became available however the packaging was off with versioning on Debian and the developer pushing this package. (https://packages.debian.org/stretch/gcc-avr) Manual Package: GCC-AVR Official I then tried to download the AVR Toolchain Proper Link: ( http://ww1.microchip.com/downloads/en/DeviceDoc/avr8-gnu-toolchain-3.6.2.1759-linux.any.x86_64.tar.gz ) Command: #wget http://ww1.microchip.com/downloads/en/DeviceDoc/avr8-gnu-toolchain-3.6.2.1759-linux.any.x86_64.tar.gz #gunzip -k avr8-gnu-toolchain-3.6.2.1759-linux.any.x86_64.tar.gz #mkdir /opt/avr-gcc #mv avr8-gnu-toolchain-3.6.2.1759-linux.any.x86_64.tar.gz /opt/avr-gcc I then added the New Toolchain to MPLAB X : Project Selection works: All is good. Final: What was wrong was I had thought the package avr-gcc used by Debian was current. It appears that on build it is missing several items and I have filed a bug with the developer to see if we can get this fixed and/or move the toolchain to /opt/ or you could even include this on install as you did another toolchain. Ideally I would use /opt to export your toolchains and configure MPLAB to pick them up rather than depend on a second package. I personally use avrdude for programming and am building a tool for the AVR ICE on a breadboard - I would almost like to see MP LAB X use GCC rather than use Java as more open source projects come to live. *Created By: Brian Holaday <https://microchipsupport.force.com/0051N000005UerV> (12/26/2018 12:05 AM)* Created Attachment: A1.png On Fri, Dec 28, 2018 at 2:40 PM Brian Holaday <br...@codemonkeyrawks.net> wrote: > FYI: > > On Fri, Dec 28, 2018 at 12:16 PM Brian Holaday <br...@codemonkeyrawks.net> > wrote: > >> >> FYI: >> >> ---------- Forwarded message --------- >> From: Brian Holaday <br...@codemonkeyrawks.net> >> Date: Fri, Dec 28, 2018 at 11:47 AM >> Subject: Re: avr-gcc version mismatch >> To: Hakan Ardo <ha...@debian.org> >> >> >> Hi Hakan, >> >> #1. I have attached a screenshot below just in case you need to see where >> I am seeing the error after installing MP Lab X. I also included some >> directions I followed for the install if you wanted to test MP LAB X. >> >> #2. I will check out the git package to see if I can provide any help: I >> very new to packaging but thought I would at least explore the project. I >> do write some C but aim to try and help with troubleshooting. >> >> #3. I have filled a bug with Microchip for MP LAB X (00367883) and am >> working with them to see what they want to do and am providing updates from >> here. I just want to make sure their document is corrected. I much rather >> try and have them use what is working than go explore to fix this using my >> 2nd backup fix. I am not sure either but I almost would think MP LAB X at >> some point could be packaged in the same way. >> >> Thanks! >> >> ---- >> >> Directions: >> >> Please correct: http://microchipdeveloper.com/install:mplabx-lin64 >> >> Debian: Ubuntu and Mint: (dpkg) >> #sudo dpkg --add-architecture i386 >> #sudo apt-get install libc6:i386 libx11-6:i386 libxext6:i386 >> libstdc++6:i386 libexpat1:i386 >> #sudo apt-get install gcc-avr avr-libc >> >> Attempt #1: Fail on GCC-AVR >> MPLAB X requires gcc-avr to be installed if using an ATMEGA* however I >> found out that for now this package on Debian needs re-worked with >> versioning for this to work on MPLAB X. I did install this package and a >> toolchain became available however the packaging was off with versioning on >> Debian and the developer pushing this package. >> >> (https://packages.debian.org/stretch/gcc-avr) >> >> Manual Package: GCC-AVR Official >> I then tried to download the AVR Toolchain Proper Link: ( >> http://ww1.microchip.com/downloads/en/DeviceDoc/avr8-gnu-toolchain-3.6.2.1759-linux.any.x86_64.tar.gz >> ) >> >> Command: >> #wget >> http://ww1.microchip.com/downloads/en/DeviceDoc/avr8-gnu-toolchain-3.6.2.1759-linux.any.x86_64.tar.gz >> >> #gunzip -k avr8-gnu-toolchain-3.6.2.1759-linux.any.x86_64.tar.gz >> #mkdir /opt/avr-gcc >> #mv avr8-gnu-toolchain-3.6.2.1759-linux.any.x86_64.tar.gz /opt/avr-gcc >> >> I then added the New Toolchain to MPLAB X : Project Selection works: All >> is good. >> >> Picture of Compiler UI >> >> [image: Shot2.png] >> >> On Thu, Dec 27, 2018 at 1:04 PM Hakan Ardo <ha...@debian.org> wrote: >> >>> Hi, >>> for details, please check out the package repo: >>> >>> https://salsa.debian.org/debian/gcc-avr.git >>> >>> There is an upstream branch and an debian branch, so it should be easy >>> to compare. There are also a few patches, listed in debian/patchlist, >>> applied during the build. >>> >>> The main difference is that the build script >>> build-avr8-gnu-toolchain-git.sh is replaced with debian/rules. They should >>> do more or less the same thing. Or atleast they did once, but we have not >>> tracked changes to this script, so they migh have diverged resulting in >>> differences in the build environment and configuration parameters where for >>> example the version string can be defined. >>> >>> We also remove the docs due to license issues and we've applied some >>> patches to allow avr-gcc to be compiled with a modern host gcc and for >>> non-x86 hosts. >>> >>> On Thu, Dec 27, 2018 at 7:20 PM Brian Holaday <br...@codemonkeyrawks.net> >>> wrote: >>> >>>> Are you able to summarize the changes or am I best to look at the >>>> debian build. I am just determining what changes are made. >>>> >>>> On Thu, Dec 27, 2018, 9:14 AM Hakan Ardo <ha...@debian.org wrote: >>>> >>>>> Yes, latest version is built from 3.6.1 of that tree: >>>>> >>>>> >>>>> http://distribute.atmel.no/tools/opensource/Atmel-AVR-GNU-Toolchain/3.6.1 >>>>> >>>>> On Thu, Dec 27, 2018 at 4:33 PM Brian Holaday < >>>>> br...@codemonkeyrawks.net> wrote: >>>>> >>>>>> No problem, >>>>>> >>>>>> I just know using MP LAB X this is reported as 1.0 instead of 5.4. If >>>>>> you get this fixed I may use it depending on the change. >>>>>> >>>>>> Are you building the package from: >>>>>> http://distribute.atmel.no/tools/opensource/Atmel-AVR-GNU-Toolchain/3.5.4/SOURCES.README >>>>>> >>>>>> I am just curious what changes are different. I have noted: >>>>>> https://github.com/strongly-typed/build-atmel-avr-gnu-toolchain also >>>>>> which adds version to packages. >>>>>> >>>>>> Thank you again. >>>>>> >>>>>> On Thu, Dec 27, 2018, 3:28 AM Hakan Ardo <ha...@debian.org wrote: >>>>>> >>>>>>> Hi again, >>>>>>> I created bug 917390 to track this issue. I don't think we should >>>>>>> use identical version strings as the debian package might differ >>>>>>> slightly >>>>>>> to the atmel binary version, but we should reflect which athmel version >>>>>>> it >>>>>>> is based on. >>>>>>> >>>>>>> On Thu, Dec 27, 2018 at 10:03 AM Hakan Ardo <ha...@debian.org> >>>>>>> wrote: >>>>>>> >>>>>>>> Hi, >>>>>>>> thanx for your reprt. We can't use a binary distribution in Debian >>>>>>>> (the gnu license requires us to provide sources and we need to support >>>>>>>> all >>>>>>>> debian architectures) so we need to build gcc from source. Version >>>>>>>> 5.4.0 of >>>>>>>> avr-gcc is availible in testing. It will be part of the next stable >>>>>>>> debian >>>>>>>> release. The version string is not identical to yours though: >>>>>>>> >>>>>>>> $ avr-gcc --version >>>>>>>> avr-gcc (GCC) 5.4.0 >>>>>>>> >>>>>>>> which I suppose would be a good idea to fix. >>>>>>>> >>>>>>>> On Thu, Dec 27, 2018 at 9:17 AM Brian Holaday < >>>>>>>> br...@codemonkeyrawks.net> wrote: >>>>>>>> >>>>>>>>> Hi Hakan, >>>>>>>>> >>>>>>>>> FYI when you get a chance: I had some issues submitting a bug >>>>>>>>> request so passing this to you via email. There is no hurry on this >>>>>>>>> but >>>>>>>>> offered a fix: >>>>>>>>> >>>>>>>>> Fix Proposed: >>>>>>>>> >>>>>>>>> Manual Package: GCC-AVR Official >>>>>>>>> AVR Toolchain Proper Link: ( >>>>>>>>> http://ww1.microchip.com/downloads/en/DeviceDoc/avr8-gnu-toolchain-3.6.2.1759-linux.any.x86_64.tar.gz >>>>>>>>> ) >>>>>>>>> >>>>>>>>> Command: >>>>>>>>> #wget >>>>>>>>> http://ww1.microchip.com/downloads/en/DeviceDoc/avr8-gnu-toolchain-3.6.2.1759-linux.any.x86_64.tar.gz >>>>>>>>> >>>>>>>>> #gunzip -k avr8-gnu-toolchain-3.6.2.1759-linux.any.x86_64.tar.gz >>>>>>>>> #mkdir /opt/avr-gcc >>>>>>>>> #mv avr8-gnu-toolchain-3.6.2.1759-linux.any.x86_64.tar.gz >>>>>>>>> /opt/avr-gcc >>>>>>>>> >>>>>>>>> I then added the New Toolchain to MPLAB X : Project Selection >>>>>>>>> works: All is good. >>>>>>>>> >>>>>>>>> ---------- Forwarded message --------- >>>>>>>>> From: Brian Holaday <br...@codemonkeyrawks.net> >>>>>>>>> Date: Thu, Dec 27, 2018 at 12:45 AM >>>>>>>>> Subject: avr-gcc version mismatch >>>>>>>>> To: <sub...@bugs.debian.org> >>>>>>>>> >>>>>>>>> >>>>>>>>> Package: gcc-avr >>>>>>>>> Version: 1:4.9.2+Atmel3.5.3-1 >>>>>>>>> Severity: important >>>>>>>>> >>>>>>>>> Issue: When trying to use MPLAB X the compiler fails to pick up >>>>>>>>> versioning flags. It be helpful if the package could be updated to use >>>>>>>>> proper version output standing. >>>>>>>>> >>>>>>>>> Files that work: >>>>>>>>> URL #1: >>>>>>>>> https://www.microchip.com/mymicrochip/filehandler.aspx?ddocname=en607660 >>>>>>>>> URL #2: https://www.microchip.com/mplabx-ide-linux-installer >>>>>>>>> >>>>>>>>> #1A: Version Mismatch causes MPLab to not build any projects. >>>>>>>>> MPLab reports said default as Version 1 and the URL below as 5.4.0 >>>>>>>>> >>>>>>>>> #1. Default Install (/usr/bin) >>>>>>>>> >> #avr-gcc --version >>>>>>>>> >>> avr-gcc (GCC) 4.9.2 >>>>>>>>> >>>>>>>>> #2. URL #1 Install (/opt/gcc-1/) >>>>>>>>> >> #./avr-gcc --version >>>>>>>>> >> #avr-gcc (AVR_8_bit_GNU_Toolchain_3.6.2_1759) 5.4.0 >>>>>>>>> >>>>>>>>> Upon further investigation it appears you only need URL #1 : this >>>>>>>>> looks like a built package that just works when extracted to /opt. >>>>>>>>> This >>>>>>>>> might allow different versions to be installed and things to be more >>>>>>>>> proper >>>>>>>>> in MPLAB and other tools as the tool allows different path chains. It >>>>>>>>> will >>>>>>>>> be up to you if you fix this or not but submitting a patch on my >>>>>>>>> input/idea >>>>>>>>> on how I got MPLab finally working and avr-gcc working proper. >>>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> -- >>>>>>>> Håkan Ardö >>>>>>>> >>>>>>> >>>>>>> >>>>>>> -- >>>>>>> Håkan Ardö >>>>>>> >>>>>> >>>>> >>>>> -- >>>>> Håkan Ardö >>>>> >>>> >>> >>> -- >>> Håkan Ardö >>> >>