unknown register name 'r0' building LUFA extension examples

Last post
3 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I installed the LUFA extension for Atmel Studio 6.1 but I'm running into a problem building the examples:

Error	1	1643 : unknown register name 'r0' in asm	

It happens in the wdt_enable() and wdt_disable() asm macro's in wdt.h:

for some reason PHPBB doesn't like me pasting the source code of those macro's here. Probably because of all the backslashes...

My target is atmega32U4. For some reason I suspect this hasn't got much to do with LUFA, rather my build environment, but I have no clue what to do about it..

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

There's a bug in the forum software that prevents % signs being posted. Convert any to the sequence % (yes all of that!).

Which model of AVR are you actually building for? (there are some that only have r16..r31 - but then again you wouldn't be using LUFA with those). I'd start by checking that the build target is 32U4 and not set to something else. Maybe check the actual build output and check that you see "-mmcu=atmega32U4" amongst the build commands.

 

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

Hmm. the compiler output windows was telling me this:

LUFA_MS_32KB_4KB_1(0,0): Invalid external Makefile. Value cannot be null

For some reason the "use external Makefile" box was ticked, I probably ticked it myself trying to resolve the issue earlier. It does compile succesfully now, yet still it reports those errors after build...