What means, "in convert_debug_memory_address, at cfgexp

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

in convert_debug_memory_address, at cfgexpand.c:2492

The compiler is giving me an error, so likely, it is smarter than I. Google leads me to a bug report that's marked "duplicate." I'm not in a position to diagnose the compiler, I just want to build my program

I added a function to a file and it gives me this error on the top line in the .c file, but not the .h.

void LCDWriteChar(  int x, int y, 
					char c, const uint8_t __memx * font, 
					uint16_t Color, uint16_t Background)
{
	int FontHeight = font[0];

 ... bla bla bla a bunch of c
}

In the .h file:

void LCDDrawGlyph(int x, int y, const uint16_t __memx * img , uint16_t Color, uint16_t Background);
void LCDDrawGlyphBig(int x, int y, const uint16_t __memx * img, uint16_t Color, uint16_t Background);

void LCDWriteChar(	int x, int y, 
					char c, const uint8_t __memx * font, 
					uint16_t Color, uint16_t Background);

One thing I notice, in the .h file, studio colors __memx in blue, except in the LCDWriteChar definition, where __memx is in black.

If you don't know my whole story, keep your mouth shut.

If you know my whole story, you're an accomplice. Keep your mouth shut. 

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

Which of those lines is line 2492 of cfgexpand.c?

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

I don't have a cfgexpand.c It points to

void LCDWriteChar(  int x, int y,

If you don't know my whole story, keep your mouth shut.

If you know my whole story, you're an accomplice. Keep your mouth shut. 

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

If I take __memx out of the definition it compiles. Of course, it doesn't work then, but I guess I can put in pgm_read_byte.

Other functions with __memx parameters compile fine.

If you don't know my whole story, keep your mouth shut.

If you know my whole story, you're an accomplice. Keep your mouth shut. 

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

Quote:

I don't have a cfgexpand.c

But you said:
Quote:

in convert_debug_memory_address, at cfgexpand.c:2492

So is that the exact error message you got or just some vaguely remembered retyping of it? If the latter then what was the exact message. The joy of GCC warnings and errors is they tell you the filename and the line number that the compiler is complaining about.

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

Quote:

in convert_debug_memory_address, at cfgexpand.c:2492

That is just part of the message, there is more either on the line before or after.

Quote:
I don't have a cfgexpand.c

Really? The compiler just made that filename up and placed it in the error message it gives to you? :wink: Trust me, you "have it", or the consequences of it. It is likely a part of the avr-gcc toolchain.

Might it be that you also have something saying "duplicate definition" or some such?

Give us the complete error message.

As of January 15, 2018, Site fix-up work has begun! Now do your part and report any bugs or deficiencies here

No guarantees, but if we don't report problems they won't get much of  a chance to be fixed! Details/discussions at link given just above.

 

"Some questions have no answers."[C Baird] "There comes a point where the spoon-feeding has to stop and the independent thinking has to start." [C Lawson] "There are always ways to disagree, without being disagreeable."[E Weddington] "Words represent concepts. Use the wrong words, communicate the wrong concept." [J Morin] "Persistence only goes so far if you set yourself up for failure." [Kartman]

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

clawson wrote:
So is that the exact error message you got or just some vaguely remembered retyping of it?
I bet he omitted some kind of "internal error".
cfgexpand.c is part of the gcc sources, and the error is generated there by an assert.

Stefan Ernst

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

This perhaps: http://gcc.gnu.org/bugzilla/show...

A duplicate of that (http://gcc.gnu.org/bugzilla/show...) includes an error message looking like this:

../../../../libc/time/strftime.c: In function 'pgm_copystring':
../../../../libc/time/strftime.c:61:1: internal compiler error: in convert_debug_memory_address, at cfgexpand.c:2528
 pgm_copystring(const char __memx * p, unsigned char i,char *b,unsigned char l)

Did you also have those prepended lines of error message? Especially "internal compiler error"?
Why not post the complete error message?
Where you just trying to make things harder for the fellow 'freaks? :roll:

As of January 15, 2018, Site fix-up work has begun! Now do your part and report any bugs or deficiencies here

No guarantees, but if we don't report problems they won't get much of  a chance to be fixed! Details/discussions at link given just above.

 

"Some questions have no answers."[C Baird] "There comes a point where the spoon-feeding has to stop and the independent thinking has to start." [C Lawson] "There are always ways to disagree, without being disagreeable."[E Weddington] "Words represent concepts. Use the wrong words, communicate the wrong concept." [J Morin] "Persistence only goes so far if you set yourself up for failure." [Kartman]

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

Quote:

Google leads me to a bug report that's marked "duplicate."

Assuming that you refer to 56792, then what stopped you from following the link to the other one (the 52472 that I linked to above)? There you will see that this is still not assigned to anyone so the case is open:

Quote:
Status: NEW

Product: gcc
Classification: Unclassified
Component: debug
Version: 4.7.0

Importance: P3 normal
Target Milestone: ---
Assigned To: Not yet assigned to anyone

This seems to be coupled to compiling with generation of debug info. What happens if you compile your source file without generating debug info (i.e. without any -g)?

As of January 15, 2018, Site fix-up work has begun! Now do your part and report any bugs or deficiencies here

No guarantees, but if we don't report problems they won't get much of  a chance to be fixed! Details/discussions at link given just above.

 

"Some questions have no answers."[C Baird] "There comes a point where the spoon-feeding has to stop and the independent thinking has to start." [C Lawson] "There are always ways to disagree, without being disagreeable."[E Weddington] "Words represent concepts. Use the wrong words, communicate the wrong concept." [J Morin] "Persistence only goes so far if you set yourself up for failure." [Kartman]

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

Torby wrote:
in convert_debug_memory_address, at cfgexpand.c:2492
You could have posted the *complete* error message if you do not want to confuse the guys that try to help you here. It's from an *internal* compiler error and cfgexpand.c:2492 points to the place in the GCC sources that recognized a problem, most likely an assertion in the GCC sources.

You can

  • Report the bug as already indicated in the error message -- there is even the web page given there -- and hope someone fixes it so the bug will be away in some future compiler version.

    Not very likely because the problem is for __memx which is avr-specific and generic GCC developers don't care much for avr.

    Moreover, a very similar bug has already been reported (namely problem report PR52472) but nobody cares for it, or understands enough of GCC to fix the artifact, or deems it important enough to work on it.

  • Try to find options to get your module through the compiler, AFAIR for this issue it helps to turn debugging off. You can, deoending on your Makefile, try
    module.c: CFLAGS += -g0

  • Try to work around in the sources. Is the __memx thing used as operand in an inline assembler?
In general, if you run into such a problem, it's advisable to provide as much as information as is helful, not as few as possible information ...

avrfreaks does not support Opera. Profile inactive.

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

That's what it says!

That's all the error message it gives me. If I was to supply more information, I'd have to make it up.

That's all folks!

Attachment(s): 

If you don't know my whole story, keep your mouth shut.

If you know my whole story, you're an accomplice. Keep your mouth shut. 

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

hmm, then it's from a dumb user interface that does not know these kind of errors, really confusing then...

For internal compiler errors, the reported location is typically the start of a function or the last line of a function so that this does not help much in identifying the source construct.

avrfreaks does not support Opera. Profile inactive.

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

But you seem to have guessed right. Setting it to "Release" instead of "Debug" makes the message go away.

If you don't know my whole story, keep your mouth shut.

If you know my whole story, you're an accomplice. Keep your mouth shut. 

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

Torby wrote:
That's what it says!

That's all the error message it gives me. If I was to supply more information, I'd have to make it up.

That's all folks!

Dumb question: what shows up in the 'output' tab?

"Experience is what enables you to recognise a mistake the second time you make it."

"Good judgement comes from experience.  Experience comes from bad judgement."

"Wisdom is always wont to arrive late, and to be a little approximate on first possession."

"When you hear hoofbeats, think horses, not unicorns."

"Fast.  Cheap.  Good.  Pick two."

"We see a lot of arses on handlebars around here." - [J Ekdahl]

 

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

Quote:
Dumb question: what shows up in the 'output' tab?

+1.
The error tab is only the parsed (txt) interpretation of the output console of "make LCD.o"

No RSTDISBL, no fun!

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

Dumb answer:

------ Build started: Project: Remote131216, Configuration: Debug AVR ------
Build started.
Project "Remote131216.cproj" (default targets):
Target "PreBuildEvent" skipped, due to false condition; ('$(PreBuildEvent)'!='') was evaluated as (''!='').
Target "CoreBuild" in file "C:\Program Files\Atmel\Atmel Studio 6.1\Vs\Compiler.targets" from project "C:\Users\Tom\Documents\Atmel Studio\6.1\Remote131216\Remote131216.cproj" (target "Build" depends on it):
	Task "RunCompilerTask"
		C:\Program Files\Atmel\Atmel Studio 6.1\shellUtils\make.exe all 
		Building file: ../../LibB/LCD.c
		Invoking: AVR/GNU C Compiler : 3.4.2
		"C:\Program Files\Atmel\Atmel Toolchain\AVR8 GCC\Native\3.4.2.1002\avr8-gnu-toolchain\bin\avr-gcc.exe"  -funsigned-char -funsigned-bitfields -DDEBUG  -I"../../LibB"  -O1 -ffunction-sections -fdata-sections -fpack-struct -fshort-enums -mrelax -g2 -Wall -mmcu=atxmega192d3 -c -std=gnu99 -MD -MP -MF "LCD.d" -MT"LCD.d" -MT"LCD.o"  -I"C:\Users\Tom\Documents\Atmel Studio\6.1\Remote131216" -o "LCD.o" "../../LibB/LCD.c"
		../../LibB/LCD.c: In function 'LCDWriteChar':
C:\Users\Tom\Documents\Atmel Studio\6.1\LibB\LCD.c(530,6): in convert_debug_memory_address, at cfgexpand.c:2492
		Please submit a full bug report,
		with preprocessed source if appropriate.
		See  for instructions.
		make: *** [LCD.o] Error 1
	Done executing task "RunCompilerTask" -- FAILED.
Done building target "CoreBuild" in project "Remote131216.cproj" -- FAILED.
Done building project "Remote131216.cproj" -- FAILED.

Build FAILED.
========== Build: 0 succeeded or up-to-date, 1 failed, 0 skipped ==========

Oh, and right in the middle it says to submit a bug report. I guess I never waded through all that text before. Off to pester Atmel!

If you don't know my whole story, keep your mouth shut.

If you know my whole story, you're an accomplice. Keep your mouth shut. 

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

That message is still incomplete. Seems like Makefile still snipps some parts away.

avrfreaks does not support Opera. Profile inactive.

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

It's Lars' problem now

But then, I hope it's really generating right code and I don't spend a few days wondering what's wrong with...

If you don't know my whole story, keep your mouth shut.

If you know my whole story, you're an accomplice. Keep your mouth shut. 

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

Nice to mention this thread as well in the bug :D

I'll add it internally anyways.

:: 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'm zipping up the source to attach to the bug. I already sent the contents of the debug folder, but I guess they need to know how those got that way.

If you don't know my whole story, keep your mouth shut.

If you know my whole story, you're an accomplice. Keep your mouth shut. 

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

Poop. Now I can't reproduce the error.

If you don't know my whole story, keep your mouth shut.

If you know my whole story, you're an accomplice. Keep your mouth shut. 

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

Torby wrote:
There are usually 2 or more mistakes.
So Torby was right. There were 2 mistakes. An internal error that caused it to not report there was an internal error.