Unexplained Compile Errors between Debug and Release

1 post / 0 new
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I've been chasing the following bug for about 3 weeks in AVR32 Studio Ver 2.5, and just stumbled upon the solution. I created an "AVR32 C project from Template". Then I used the Framework menu to select some modules like INTC, USART, PM, and GPIO. Then I modified main.c to configure the USART and register the interrupt. I built the Debug configuration no problem. Then I changed the build configuration to release and kaboom -- undefined symbols. Turns out that when you initialize the "Release" configuration the "-mpart=AP7000" instead of "-mpart=uc3a0512es" like it was in the Debug configuration.

The fix is to go to:
Project > Properties > Settings > Tool Settings and check under "All Options" for gcc to make sure that "-mpart=" is what it is supposed to be, and not some screwey default like "AP7000"

To change it you need to click "MCU Settings" verify that the dropbox contains the processor you want (it is very likely to be correct) then click "Apply"

Seems obvious to me that "-mpart=" should be coerced to be the same thing in both build configurations for the same project, but what the hell do I know, I'm just a grunt programmer.

We never have time to do it right,
but we always have time to do it over