Errors in copy of existing project

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

Greets, Freaks -

 

I done this dozens of times with no problem, and now a bunch of errors that I do not recognize.

 

Have made a copy of an existing project. New name, new directory. Created the project with AS7. Got rid of the default main.c as I always do, and copied all of the relevant (.c and .h) files from the existing project as I always do. When I request a build, I get these errors, which I have never gotten before:

Severity
Code
  Description         
                                                         Project
File
Line

Error

 address 0x8008c6 of ALogger_101tst.elf section `.bss' is not within region `data'    
ALogger_101tst   1

Error

 address 0x8008c7 of ALogger_101tst.elf section `.noinit' is not within region `data'
 ALogger_101tst   1

Error 

address 0x8008c6 of ALogger_101tst.elf section `.bss' is not within region `data'    
ALogger_101tst 

  1

Error 

address 0x8008c7 of ALogger_101tst.elf section `.noinit' is not within region `data' 
ALogger_101tst 

  1

variable 'temp' set but not used [-Wunused-but-set-variable]
ALogger_101tst
C:\Users\wagne\Dropbox\ALogger_101A\ALogger_101tst\ALogger_101tst\ALogger_101tst\adc.c
269
Error 

recipe for target 'ALogger_101tst.elf' failed
ALogger_101tst
C:\Users\wagne\Dropbox\ALogger_101A\ALogger_101tst\ALogger_101tst\ALogger_101tst\Debug\Makefile
514

Can someone recognize what might have gone wrong? I have no clue!

 

Thanks

Jim

 

Jim Wagner Oregon Research Electronics, Consulting Div. Tangent, OR, USA http://www.orelectronics.net

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

In that situation I might run a directory compare of original versus copy, possibly re-jigging filenames so that the project files get compared also.

 

My favourite tool for this is actually KDiff3 http://kdiff3.sourceforge.net/ You'll have to excuse the 1990's looking web page but I find it has excellent presentation that beats many Windows diff programs for readability.

 

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

Thanks

 

Jim

Jim Wagner Oregon Research Electronics, Consulting Div. Tangent, OR, USA http://www.orelectronics.net

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

This is getting bizarre -

 

I have tried the copy, now, several times with several different sources. Thinking the problem might be that my dropbox was full, I change the location of the new project to several different locations, including the desktop. Win10 with AS7 = Atmel Studo 7 (Version 7.0 - 1931). Similar problem every time though the list of errors seems to change, and the locations of the errors in the Error List changes. The current Error List, in total, appears as:

 

Severity
Code
Description
Project
File
Line

Message 

#pragma message: FILE ALWAYS OPEN mode in file_functs.h
ALogger_101tst
C:\Users\wagne\OneDrive\Desktop\ALogger_101tst\ALogger_101tst\file_functs.h
39

Message 

#pragma message: FILE ALWAYS OPEN mode in file_functs.h
ALogger_101tst
C:\Users\wagne\OneDrive\Desktop\ALogger_101tst\ALogger_101tst\file_functs.h
39

Message

 #pragma message: FILE ALWAYS OPEN mode in file_functs.h
ALogger_101tst
C:\Users\wagne\OneDrive\Desktop\ALogger_101tst\ALogger_101tst\file_functs.h
39

Message #pragma message: FILE ALWAYS OPEN mode in file_functs.h
ALogger_101tst
C:\Users\wagne\OneDrive\Desktop\ALogger_101tst\ALogger_101tst\file_functs.h
39
Message

 #pragma message: PutLog() enabled in log.c
ALogger_101tst
C:\Users\wagne\OneDrive\Desktop\ALogger_101tst\ALogger_101tst\log.c
82
Message 

#pragma message: STANDARDSTART in masterstate.h
ALogger_101tst
C:\Users\wagne\OneDrive\Desktop\ALogger_101tst\ALogger_101tst\masterstate.h
50

Message #pragma message: STANDARDSTART in masterstate.h
ALogger_101tst
C:\Users\wagne\OneDrive\Desktop\ALogger_101tst\ALogger_101tst\masterstate.h
50

Message 

#pragma message: STANDARDSTART in masterstate.h
ALogger_101tst
C:\Users\wagne\OneDrive\Desktop\ALogger_101tst\ALogger_101tst\masterstate.h
50
Message

 #pragma message: STANDARDSTART in masterstate.h
ALogger_101tst
C:\Users\wagne\OneDrive\Desktop\ALogger_101tst\ALogger_101tst\masterstate.h
50
Message

 #pragma message: STANDARDSTART in masterstate.h
ALogger_101tst
C:\Users\wagne\OneDrive\Desktop\ALogger_101tst\ALogger_101tst\masterstate.h
50

Message 

#pragma message: STANDARDSTART in masterstate.h
ALogger_101tst
C:\Users\wagne\OneDrive\Desktop\ALogger_101tst\ALogger_101tst\masterstate.h
50

Message

 #pragma message: STANDARDSTART in masterstate.h
ALogger_101tst
C:\Users\wagne\OneDrive\Desktop\ALogger_101tst\ALogger_101tst\masterstate.h
50
Message 

#pragma message: STANDARDSTART in masterstate.h
ALogger_101tst
C:\Users\wagne\OneDrive\Desktop\ALogger_101tst\ALogger_101tst\masterstate.h
50

Message 

#pragma message: STANDARDSTART in masterstate.h
ALogger_101tst
C:\Users\wagne\OneDrive\Desktop\ALogger_101tst\ALogger_101tst\masterstate.h
50
Message

 #pragma message: STANDARDSTART in masterstate.h
ALogger_101tst
C:\Users\wagne\OneDrive\Desktop\ALogger_101tst\ALogger_101tst\masterstate.h
50
Message

 #pragma message: STANDARDSTART in masterstate.h
ALogger_101tst
C:\Users\wagne\OneDrive\Desktop\ALogger_101tst\ALogger_101tst\masterstate.h
50
Message

 #pragma message: TESTL1CLKINT makes RTC ISR visible
ALogger_101tst
C:\Users\wagne\OneDrive\Desktop\ALogger_101tst\ALogger_101tst\test.h
86
Message

 #pragma message: TESTL1CLKINT makes RTC ISR visible
ALogger_101tst
C:\Users\wagne\OneDrive\Desktop\ALogger_101tst\ALogger_101tst\test.h
86
Message

 #pragma message: TESTL1CLKINT makes RTC ISR visible
ALogger_101tst
C:\Users\wagne\OneDrive\Desktop\ALogger_101tst\ALogger_101tst\test.h
86
Message 

#pragma message: TESTL1CLKINT makes RTC ISR visible
ALogger_101tst
C:\Users\wagne\OneDrive\Desktop\ALogger_101tst\ALogger_101tst\test.h
86
Message #pragma message: TESTL1CLKINT makes RTC ISR visible
ALogger_101tst
C:\Users\wagne\OneDrive\Desktop\ALogger_101tst\ALogger_101tst\test.h
86
Message

 #pragma message: TESTL1CLKINT makes RTC ISR visible
ALogger_101tst
C:\Users\wagne\OneDrive\Desktop\ALogger_101tst\ALogger_101tst\test.h
86

Message

 #pragma message: TESTL1TMR makes 10ms timer ISR visible
ALogger_101tst
C:\Users\wagne\OneDrive\Desktop\ALogger_101tst\ALogger_101tst\test.h
98
Message 

#pragma message: TESTL1TMR makes 10ms timer ISR visible
ALogger_101tst
C:\Users\wagne\OneDrive\Desktop\ALogger_101tst\ALogger_101tst\test.h
98
Message 

#pragma message: TESTL1TMR makes 10ms timer ISR visible
ALogger_101tst
C:\Users\wagne\OneDrive\Desktop\ALogger_101tst\ALogger_101tst\test.h
98
Message

 #pragma message: TESTL1TMR makes 10ms timer ISR visible
ALogger_101tst
C:\Users\wagne\OneDrive\Desktop\ALogger_101tst\ALogger_101tst\test.h
98
Message

 #pragma message: TESTL1TMR makes 10ms timer ISR visible
ALogger_101tst
C:\Users\wagne\OneDrive\Desktop\ALogger_101tst\ALogger_101tst\test.h
98

Message

 #pragma message: TESTL1TMR makes 10ms timer ISR visible
ALogger_101tst
C:\Users\wagne\OneDrive\Desktop\ALogger_101tst\ALogger_101tst\test.h
98
Warning

'power_status' defined but not used [-Wunused-function]
ALogger_101tst
C:\Users\wagne\OneDrive\Desktop\ALogger_101tst\ALogger_101tst\mmc_avr.c
91
Error 

address 0x8008c6 of ALogger_101tst.elf section `.bss' is not within region `data'
ALogger_101tst

1

Error

 address 0x8008c6 of ALogger_101tst.elf section `.bss' is not within region `data'
ALogger_101tst

1
Error

 address 0x8008c7 of ALogger_101tst.elf section `.noinit' is not within region `data'
ALogger_101tst

1

Error 

address 0x8008c7 of ALogger_101tst.elf section `.noinit' is not within region `data'
ALogger_101tst

1
Error ld returned 1 exit status
ALogger_101tst
collect2.exe
0
Error

 recipe for target 'ALogger_101tst.elf' failed
ALogger_101tst
C:\Users\wagne\OneDrive\Desktop\ALogger_101tst\ALogger_101tst\Debug\Makefile
514

Warning 

variable 'temp' set but not used [-Wunused-but-set-variable]
ALogger_101tst
C:\Users\wagne\OneDrive\Desktop\ALogger_101tst\ALogger_101tst\adc.c
269

Really confused! The only place that I can find where the startup sections are referenced is here:

 

//============================ RESET SOURCE ROUTINE ======================================

uint8_t mcusr_mirror __attribute__ ((section (".noinit")));
void get_mcusr(void) \
  __attribute__((naked)) \
  __attribute__((section(".init3")));
void get_mcusr(void)
{
  mcusr_mirror = MCUSR;
  MCUSR = 0;
  wdt_disable();
}

//============================ MEMORY PAINT ROUTINE ======================================

#define CANARY_SRAM 0x55
//#define CANARY_GPREG 0xAA

// The stack is set up and __zero_reg__ is cleared, but interrupts are disabled
void
__attribute__ ((__section__ (".init3"), __used__, __naked__))
init3_stuff(void) {

#ifdef CANARY_SRAM
  __asm__ __volatile__ (
                        "ldi    ZL,  lo8(%[sta])                \n\t" //
                        "ldi    ZH,  hi8(%[sta])                \n\t" //
                        "ldi    YH,  hi8(%[end])                \n"   //
                        "ldi    YL,  %[can]                     \n\t" //
                      "paint%=:                                 \n\t" //
                        "st     Z+,  YL                         \n\t" //
                        "cpi    ZL,  lo8(%[end])                \n\t" //
                        "cpc    ZH,  YH                         \n\t" //
                        "brlo   paint%=                         \n\t" //
                      :
                      :
                        [sta] "i" (RAMSTART),
                        [end] "i" (RAMEND+1),
                        [can] "M" (CANARY_SRAM)
                       );
#endif

#ifdef CANARY_GPREG
  __asm__ __volatile__ (
                        "eor    ZL, ZL                          \n\t" //
                        "eor    ZH, ZH                          \n\t" //
                        "ldi    YH,  %[can]                     \n\t" //
                      "paint%=:                                 \n\t" //
                        "st     Z+,  YH                         \n\t" //
                        "cpi    ZL,  29                         \n\t" //
                        "brlo   paint%=                         \n\t" //
                        "movw   ZL, YL                          \n\t" //
                      :
                      :
                        [sta] "i" (RAMSTART),
                        [end] "i" (RAMEND+1),
                        [can] "M" (CANARY_GPREG)
                       );
#endif
	}

The errors shift slightly when I comment out these two code blocks, or either one, or none, but fundamentally the  same errors remain.

 

I hope that someone can add some insight because this is critical to debugging a problem with products in the field!

 

Jim

Jim Wagner Oregon Research Electronics, Consulting Div. Tangent, OR, USA http://www.orelectronics.net

Last Edited: Fri. Mar 6, 2020 - 05:21 AM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

You will certainly enjoy meld for determining differences in files & directories. ...it is also kept up very to date

 

http://meldmerge.org/

 

I had some issue with paths & the project setup a good while ago & was getting all kinds of strange errors (they seem path related)....I finally resorted to setting up a completely fresh project with the files names & subdirectories arranged the way I needed.   So then I had a file structure using fresh, empty files.  I took each new "empty" file & copied/pasted the code from the old files (I had set them aside somewhere) into each.  Whatever problem existed went away & all compiled perfectly.  I didn't find out what was going wrong, but at that point I didn't care. 

 

 

 

 

When in the dark remember-the future looks brighter than ever.   I look forward to being able to predict the future!

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

Just found the cause. It was a very large buffer array that I had added to hold raw data from a sensor for analysis.

 

Strange thing, there was space and no errors in the source copy of the project. Maybe it was a difference in optimization? [will check that]. The errors went away when I commented out the code that declared this array and wrote to it.

 

Now, the puzzle is why the difference. BUT, I can proceed.

 

Jim

Jim Wagner Oregon Research Electronics, Consulting Div. Tangent, OR, USA http://www.orelectronics.net