compile error in studio 7 but not using toolchain make

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

I have an at90usb1287 application (based on the usbkey hid), which i am taking over form a collegue, the code compiles using an external makefile with no errors (which is how he developed it), but when imported into studio using an the original makefile in the project setitngs i get the following error:

 

Severity    Code    Description    Project    File    Line
Error        section .rodata.str1.1 loaded at [0000f51e,0000f5e6] overlaps section .data loaded at [0000f51e,0000f51f]    USBKEY_STK525-series6-hidkbd        1

 

when compiled from the console using 'make' the compile completes with no errors:

Building file: ../dvalp.c

..

Linking
Create hex file
AVR Memory Usage
----------------
Device: at90usb1287

Program:   67754 bytes (51.7% Full)
(.text + .data + .bootloader)

Data:        963 bytes (11.8% Full)
(.data + .bss + .noinit)

 

My question is is the make command different in studio 7 to just using the toolchain, I also tried compiling in studio 6.2 with the same error.

 

Regards

Rob Carter

Attachment(s): 

Last Edited: Thu. Feb 25, 2016 - 02:53 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

That doesn't include the config.mk ?

 

Anyway the error is obvious isn't it? It's telling you that two sections overlap. Presumably the base address of (at least) one is being set manually?

robcarter wrote:
the make command different in studio 7 to just using the toolchain, I also tried compiling in studio 6.2 with the same error.

Unless you have set "use external makefile" then both AS6 and AS7 dynamically create a Makefile from the list of files given and the other information in the project configuration. This is almost bound to be different to any manually created Makefile. The "trick" is to ensure the project configuration is set to auto-generate a Makefile that achieves the same.

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

I agree the error is obvious, I can't see any changes to the sections in the source, my question is why is the error only occuring in studio, they both use the same make file:

 

I have the makefile selected under project properties: use external makefile is tcked and the file selected.

 

config.mk is included from the main Makefile:

 

MAKECFG   = config.mk

and

# Include Source files list and part informations
include $(MAKECFG)

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

robcarter wrote:
I agree the error is obvious, I can't see any changes to the sections in the source, my question is why is the error only occuring in studio, they both use the same make file:

Post the raw build output (that is every command line option being passed to the compiler and linker) in each case. Clearly something is different.

robcarter wrote:
I have the makefile selected under project properties: use external makefile is tcked and the file selected.
Oh sorry I misunderstood. Well given that the way AS7 builds is either:

make -f makefile_autogenerated_by_AS7.mk

or

make -f external_makefiles_provided_by_user.mk

then if it's the same make, the same gcc, the same ld and the second option here is used I would expect a binary identical result.

 

Are you 100% certain the "toolchain" you have tried to use is the exact same one as in AS7 (that is 4.9.2) ?

 

In fact from As7 if you start a command prompt from the Tools menu then the PATH arranges for the gcc/ld being used to be the very ones in the AS7 installation so try launching that but then doing a command line "make" from there.

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

Hi

Your comment about versions got me thinking, I have an old winavr gcc installed the command console was using that to compile, which explains the difference, adding the new gcc in yielded loads of errors about missing files, so I need to go back and find out whats going on - may be easier to start fresh I think