Atmel new toolchain changes?!

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

Hey

 

Just stumbled on a issue after installed new Studio 7 build. 

Apparently the inbuilt include files have changed creating a HUGE list of errors.

I only checked the timer for xmega32A4U at this point but god knows what else has changed in all of the io.h files.

 

So... be ware and stay clear of current build/toolchain

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

What kind of errors are you talking about? Are you saying that if you simply:

#include <avr/io.h>

and then build -mmcu=atxmega32a4u that I will see errors?

 

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

No, it will happen if you get your nice program that you wrote on old toolchain eg:

// Configure Systick timer 1kHz freq
TC_SetPeriod(&SYSTICK_TIMER,32000);
TC0_ConfigWGM(&SYSTICK_TIMER,TC_WGMODE_NORMAL_gc);
TC0_SetOverflowIntLevel(&SYSTICK_TIMER,TC_OVFINTLVL_MED_gc);
TC0_ConfigClockSource(&SYSTICK_TIMER,TC_CLKSEL_DIV1_gc);

And when you compile there is no such thing as TC_WGMODE_NORMAL_gc anymore. if you do a little digging you will find it now to be 

TC0_ConfigWGM(&SYSTICK_TIMER,TC_TC0_WGMODE_NORMAL_gc); // Note the added TC0

 

Do a diff on old and new iox32a4u.h files. The whole darn file lit up like a christmas tree. Mostly because of rearrangement of code but still. 

Last Edited: Mon. Oct 31, 2016 - 08:53 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

bloody-orc wrote:
And when you compile there is no such thing as TC_WGMODE_NORMAL_gc anymore.

C:\SysGCC\avr\avr\include\avr>grep TC_WGMODE_NORMAL_gc iox32a4u.h
    TC_WGMODE_NORMAL_gc = (0x00<<0),  /* Normal Mode */

C:\SysGCC\avr\avr\include\avr>

That is a 5.3 issue of avr-gcc. I see the same with a 4.9.2 I have from Atmel on Linux.

 

So which version of libc is this?

 

In my 4.9.2 the __AVR_LIBC_DATE_ in avr/version.h is 20150208UL. For the 5.3 on this machine it is:

C:\SysGCC\avr\avr\include\avr>grep AVR_LIBC_DATE version.h
#define __AVR_LIBC_DATE_STRING__    "20150208"
#define __AVR_LIBC_DATE_            20150208UL

(so the same in fact)

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

We're already working on fixing this. Hopefully we will have a new device support package out by end of the week.

In the mean time, you could download the older pack from packs.download.atmel.com and replace the one you have, using the Device Pack Manager in Atmel Studio (in the tools menu).

:: Morten

 

(yes, I work for Atmel, yes, I do this in my spare time, now stop sending PMs)

 

The postings on this site are my own and do not represent Microchip’s positions, strategies, or opinions.

Last Edited: Mon. Oct 31, 2016 - 09:01 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Sadly Atmel doesn't version their files so no idea what version of the file it is but toolchains that I used as comparison are: 1.0.39 vs 1.1.63 (installed today)

dir: ...\Atmel\Studio\7.0\packs\atmel\XMEGAA_DFP\versionNr\...

 

And I'm glad Atmel is already working on it :)

 

Rain

Last Edited: Mon. Oct 31, 2016 - 09:04 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

... that's the version.... This has nothing to do with the tool chain btw, just the packs.

If you have both versions installed, you.can change your.project to point to the old pack (project properties, components, and the change version).

:: Morten

 

(yes, I work for Atmel, yes, I do this in my spare time, now stop sending PMs)

 

The postings on this site are my own and do not represent Microchip’s positions, strategies, or opinions.

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

Sorry, I obviously just incorrectly named the issue :) MeBad.

 

I did a full diff on the files and found quite a lot of differences like that. Watchdog, BOD, Timer and mostly influenced. Also a lot of 16-bit registers have now a xxxH and xxxL definition aswell. 

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

Jupp. The header generator had been updated to comply better with the xmega spec, which the previous header was not. Unfortunately we didn't see the API break that was introduced on some xmega.

:: Morten

 

(yes, I work for Atmel, yes, I do this in my spare time, now stop sending PMs)

 

The postings on this site are my own and do not represent Microchip’s positions, strategies, or opinions.

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

I am running with a fresh install of Atmel Studio 7.0.1118, and I have a similar problem trying to build the XMEGA-A3BU Explained demo application.  A bunch of stuff in tc.h won't compile, starting with all values of the tc_wg_mode_t enum.  Inserting "_TC0" into all of the assignments gets past that problem, but breaks later when TC_CLKSEL_DIV1024_gc is used.

 

What's the status of the update?  I tried using Tools -> Device Pack Manager, and installed all available updates, but it didn't fix the problem.

 

How can I get the fix?