Import issue-Makefile?

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

$ Posts split from https://www.avrfreaks.net/index.p... - JS $

Quote:
You need to configure a "Toolchain Flavor",
May need to leave this for later when my hair starts to regrow :-) I need more hair to pull out!

Imported the project into AS6 however it is giving me a strange compile error

Quote:
Error 1 unrecognized command line option "-fshort-enums-Wall" cc1.exe 0 0 Flatness_tester
It works OK with AS4.

John Samperi

Ampertronics Pty. Ltd.

www.ampertronics.com.au

* Electronic Design * Custom Products * Contract Assembly

Last Edited: Sun. Sep 30, 2012 - 03:09 AM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

hmmm now I'm completely lost!! As it happens all imported AS4 project are STILL using winAvr20100110 while the sample project I first tried out is using the Atmel toolchain. :roll:

John Samperi

Ampertronics Pty. Ltd.

www.ampertronics.com.au

* Electronic Design * Custom Products * Contract Assembly

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

js wrote:
it is giving me a strange compile error
Quote:
Error 1 unrecognized command line option "-fshort-enums-Wall" cc1.exe 0 0 Flatness_tester
It works OK with AS4.
Definitely not. Don't glue the two optione together: "-fshort-enums -Wall"

avrfreaks does not support Opera. Profile inactive.

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

Quote:
Don't glue the two optione together: "-fshort-enums -Wall"
I didn't do nuffin :-) did not put the hieroglyphs in as I have no idea what they mean. I simply imported an AS4 project into AS6.

To make sure I recompiled the AS4 project and there was no problem, this code has been running in some equipment for a couple of years and my wife spent all the income from the job already.

I will delete all files and try another import.

John Samperi

Ampertronics Pty. Ltd.

www.ampertronics.com.au

* Electronic Design * Custom Products * Contract Assembly

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

I will be looking closely at the 2 makefiles, it seesm that the AS6 makefile has more stuff than the AS4 makefile.

John Samperi

Ampertronics Pty. Ltd.

www.ampertronics.com.au

* Electronic Design * Custom Products * Contract Assembly

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

I'm attaching the 2 makefile, both generated by their respective Studio versions. Both are using winAvr yet they are quite different.

I can see the lines where -fshort-enums -Wall are together in the bigger (and better??) AS6 makefile but have no idea how to fix.

Maybe a yet undiscovered bug or I did break AS6. :)

Attachment(s): 

John Samperi

Ampertronics Pty. Ltd.

www.ampertronics.com.au

* Electronic Design * Custom Products * Contract Assembly

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

Sorry for the wide screen shot but the AS6 makefile is 3 screens wide (28" screen!!)

Attachment(s): 

John Samperi

Ampertronics Pty. Ltd.

www.ampertronics.com.au

* Electronic Design * Custom Products * Contract Assembly

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

Quote:

but have no idea how to fix.

SprinterSB already told you.
Quote:
Don't glue the two optione together: "-fshort-enums -Wall"

Is it perhaps clearer when written as?:

-fshort-enums        -Wall

EDIT: by the way I looked at the Makefiles and cannot help notice the AS6 one is littered with:

# AVR32/GNU C Compiler

That's just a little bit curious! I sort of assumed it might say:

# AVR8/GNU C Compiler

But I just checked one of my AVR8 Makefiles from AS6 and it too mentions AVR32 so that is just a cock-up on Atmel's part.

But other than that I don't really see anything obviously wrong in the AS6 one and it does not have the -fshort-enums and -Wall options glued together either?

Last Edited: Mon. Oct 1, 2012 - 08:35 AM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Quote:
SprinterSB already told you.
And I already said that I did NOT glue them together :-) that's how studio produced the makefile.

If I change it then it will be modifed by Studio at the next build with the same results I guess.

Unless I can force Studio to use an "external makefile" the it will probably not change it.

John Samperi

Ampertronics Pty. Ltd.

www.ampertronics.com.au

* Electronic Design * Custom Products * Contract Assembly

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

Quote:

that's how studio produced the makefile.


See my edit - it didn't. Where are you seeing this "glued together"?

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

Quote:
Where are you seeing this "glued together"?
In 2 places. I edited the makefile but Studio rebuild it the way it was.

Attachment(s): 

John Samperi

Ampertronics Pty. Ltd.

www.ampertronics.com.au

* Electronic Design * Custom Products * Contract Assembly

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

Rather than pictures can you copy/paste the build output text? (including any reported error on the following line(s))

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

See top post

Quote:
Error 1 unrecognized command line option "-fshort-enums-Wall" cc1.exe 0 0 Flatness_tester
Also the makefile produced by AS6 is posted above and you can see the 2 lines where the parameters are "glued" together just like the picture shows.

John Samperi

Ampertronics Pty. Ltd.

www.ampertronics.com.au

* Electronic Design * Custom Products * Contract Assembly

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

Ah it appears more than once in the file - one is OK and that's the one I was looking at.

The solution here would be, before importing the AS4 project to edit the configuration and add a space after -fshort-enums where it is specified. In the AS4 Makefile the line where that appears ends with 's' of enums. It appears that when AS6 imports that it does not add a ' ' if there are then more options added after it.

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

Quote:
to edit the configuration and add a space after -fshort-enums
Did it but deleted the line! :?

Fixed up the line and rebuilt in AS4 just to make sure, then imported it into AS6 and it keeps on glueing the parameters together ie the end space is ignored. Seems a bug to me, may need to send the whole project to somebody at Atmel..I wonder who.

I'm ready for bed now..almost.

edit in case it helps I'm attaching the conversion log. Seems to have some errors but it DOES work with AS4.

Attachment(s): 

John Samperi

Ampertronics Pty. Ltd.

www.ampertronics.com.au

* Electronic Design * Custom Products * Contract Assembly

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

Quote:

Seems a bug to me, may need to send the whole project to somebody at Atmel..I wonder who.

Report it at asf.atmel.no/bugzilla/ under the AS6 component.

- Dean :twisted:

Make Atmel Studio better with my free extensions. Open source and feedback welcome!

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

Done.

John Samperi

Ampertronics Pty. Ltd.

www.ampertronics.com.au

* Electronic Design * Custom Products * Contract Assembly

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

Hello John,
Can you attach the AVR studio 4 project?

Prasad Khare
Atmel Corporation

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

Not here, it's a client's code so I can't post it publicly. :-)

Maybe it has been fixed in the latest release, I'll try it out in the next day or so.

John Samperi

Ampertronics Pty. Ltd.

www.ampertronics.com.au

* Electronic Design * Custom Products * Contract Assembly

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

js wrote:
Not here, it's a client's code so I can't post it publicly. :-)

Maybe it has been fixed in the latest release, I'll try it out in the next day or so.

Ok..May be you can alternatively share the sample project(if not the actual one) which has issue through a private message here or to the asf bugzilla where you have already logged the bug :)

Regards,
Deena

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

Yes, I am trying to reproduce the issue, but its working fine in my case.
So, I need a project (any project) where this issue is reproduced, with steps to reproduce.

Prasad Khare
Atmel Corporation

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

I have not been able to attach anything to PMs for YEARS! So I will need an email address.

Quote:
with steps to reproduce.
Import project into AS6 and try to compile, that's it!. :-)

John Samperi

Ampertronics Pty. Ltd.

www.ampertronics.com.au

* Electronic Design * Custom Products * Contract Assembly

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

I have sent you the private message about my email.
BTW, you are checking it in SP2 right?

Prasad Khare
Atmel Corporation

Last Edited: Thu. Jan 10, 2013 - 06:51 AM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Quote:
you are checking it in SP2 right?
I don't know which version I had when the issue arose, that's why I said "Maybe it has been fixed in the latest release, I'll try it out in the next day or so." :)

The thread is over 3 months old so anything is possible and as I use AS4 as much as I can I haven't played much more with that project.

John Samperi

Ampertronics Pty. Ltd.

www.ampertronics.com.au

* Electronic Design * Custom Products * Contract Assembly

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

Project email today. As I mentioned in the email the problem is still there with the current AS6 version.

John Samperi

Ampertronics Pty. Ltd.

www.ampertronics.com.au

* Electronic Design * Custom Products * Contract Assembly

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

This project is already converted to AS6. Can I get original project? So, that I can have a look at what is exactly happening while conversion.

Prasad Khare
Atmel Corporation

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

Sent it today.

John Samperi

Ampertronics Pty. Ltd.

www.ampertronics.com.au

* Electronic Design * Custom Products * Contract Assembly

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

The issue is fixed now. :) It will be available in next release. Make note of internal issue tracker id AVRSV-4040, Fixed.

Prasad Khare
Atmel Corporation

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

Great, I'm not too stooooopid after all, it was a real bug. :-)

Did it have anything to do with the assembler file as part of the C project?

John Samperi

Ampertronics Pty. Ltd.

www.ampertronics.com.au

* Electronic Design * Custom Products * Contract Assembly

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

js wrote:
Did it have anything to do with the assembler file as part of the C project?

Yes. Exactly. Generation of assembler flags was wrong. 8)

Prasad Khare
Atmel Corporation