No hex file (newbie)

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

Hello, this is for ATtiny45 / AVRStudio4 / gnugcc / AVRISP.

1. When I do a Build > Compile, it compiles with no errors.
2. When I click "Clean current configuration" it reports a build with no errors.
3. When I do a Build > Build, the build fails with one error (see below).
4. When I try to program (AVRISP) it cannot find the hex file.
5. When I look in the Project\Default folder there is no hex file.

Here is the Build error message...

foo_01_jw.o:C:\ (filepath) foo_01:25: first defined here

make: *** [foo_01.elf] Error 1

Build failed with 1 errors and 0 warnings...  

Any help?

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

Since the build (a complete build, not only a compile) fails there will be no hex file produced. You m must solve the problem during build in order to get a hex to program to the AVR.

[EDIT: Things written here assuming Atmel Studio 6 removed.]

Please copy the complete error message verbatim and paste it in a post here.

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

I created a new project with the same source and the message I get is...

make: `zap_01.o' is up to date.
Build succeeded with 0 Warnings...

However I cannot find a hex file - looked in the project folder, default , etc. Do I need to specify a path for the hex file in the project somewhere?

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

Are you doing "build" or just "compile"?

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

Hi buddy!

I had the same problem before and here is how I fixed it (using avr studio 5.1 but had this issue with Atmel studio 6):

1) With your project open click on the 'Project' drop down menu and then Properties.
2) On the left hand side click on build.
3) Set the following:

Configuration: All configurations
Build Artifact: Artifact type should be 'Executable'.

The reason why hex was not being produced is most likely you have the artiifact type set to 'static library'.

But as the other poster mentioned make sure you 'Build' the project.

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

Avrstudio4:
In Menu-Project mark the option "Create Hex File".

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

Thanks for all the help. Got it figured out.

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

Quote:
Got it figured out...
... but it is my secret how. You people with this problem help yoursef.

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

Visovian wrote:
but it is my secret how. You people with this problem help yoursef.

Not really. I spent a couple of hours on this and it was complicated and being a newbie, it involved learning the AVR Studio interface. If it there was a simple answer, I would have posted it.

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

jwriter wrote:
Visovian wrote:
but it is my secret how. You people with this problem help yoursef.

Not really. I spent a couple of hours on this and it was complicated and being a newbie, it involved learning the AVR Studio interface. If it there was a simple answer, I would have posted it.


That seems like a selfish attitude. Here on AVRFreaks many people take their own time, much more than a couple of hours in many instances, to help others figure out their problems. It is only common courtesy to let others know what resolved your issue in case they stumble across the same problem you did. There is no shame in divulging that you made an error or that it was a simple thing that you did not understand. Besides, you will have good Karma if you do.

"I may make you feel but I can't make you think" - Jethro Tull - Thick As A Brick

"void transmigratus(void) {transmigratus();} // recursio infinitus" - larryvc

"It's much more practical to rely on the processing powers of the real debugger, i.e. the one between the keyboard and chair." - JW wek3

"When you arise in the morning think of what a privilege it is to be alive: to breathe, to think, to enjoy, to love." -  Marcus Aurelius

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

Agreed, what both posters are doing is making them look like complete donkeys. There's no shame in admitting an error, it's part of the learning process, and helps others avoid the same pitfalls.

Explicitly telling others "Oh, I'm not going to share my solution with everyone else." shows a Microsoft-style attitude (Pardon my french) that, personally, is not welcome here.