Before logging an issue, please update to the latest release of Visual Micro from the Downloads Page.

When Logging a Support Issue in the Forum, please ensure you have also:-

  • Enabled vMicro > Compiler > Show Build Properties
  • Re-Compile your program with these settings enabled
 
Save the new Output to a Text File and....
  • Click the Reply button and attach as .txt file OR
  • Click here to Email us with the file attached, and a link to your post
Support requests without the output above may be impossible to answer, so please help us to help you
 
Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic Program wont load (Read 3660 times)
Brennon Williams
Newbies
*
Offline


Posts: 7
Joined: Jan 15th, 2013
Program wont load
Apr 6th, 2013 at 5:37pm
Print Post  
Hi there,

I have been searching all day and kinda pulling my hair out in the process.

I have a simple program that pulls values from an Accelerometer. It works as expected.

I tried now to move all that to a library. Created a .h and .cpp files - checked my code and all falls apart.

Below is the build output: I am completely stumped.

Can someone tell me if: Adding new classes is supported, if returning an object (class defined) is supported from functions etc or any other pointers as to why this isnt working.

One other thing - If I remove all the code and go back to a blinking LED - I still get this build output and no uploaded program to the board.

Cheers for any help.


PRS1_Scale.cpp.o : :/PRSAccelerometer.h:26: first defined here
PRSAccelerometer.cpp.o : : In function `PRSAccelerometer':
PRSAccelerometer.h : PRSAccelerometer()'
PRS1_Scale.cpp.o : :/PRSAccelerometer.h:26: first defined here
PRSAccelerometer.cpp.o : : In function `~PRSAccelerometer':
PRSAccelerometer.h : ~PRSAccelerometer()'
PRS1_Scale.cpp.o : :/PRSAccelerometer.h:42: first defined here
PRSAccelerometer.cpp.o : : In function `~PRSAccelerometer':
PRSAccelerometer.h : ~PRSAccelerometer()'
PRS1_Scale.cpp.o : :/PRSAccelerometer.h:42: first defined here
ols\avr\bin\avr-objcopy -O ihex -j .eeprom --set-section-flags=.eeprom=alloc,load --no-change-warnings --change-section-lma .eeprom=0 cale.elf" cale.eep"
avr-objcopy* : : cale.elf': No such file
ols\avr\bin\avr-objcopy -O ihex -R .eeprom cale.elf" cale.hex"
avr-objcopy* : : cale.elf': No such file
Couldn't determine program size:
  
Back to top
 
IP Logged
 
Brennon Williams
Newbies
*
Offline


Posts: 7
Joined: Jan 15th, 2013
Re: Program wont load
Reply #1 - Apr 6th, 2013 at 5:56pm
Print Post  
Before anyone replies, I think I found the issue.

I created the class and header files manually by adding them as "NEW ITEM" in the respective folders.

I have just rebuilt a completely new solution and used the "ADD cpp item" and it is now working.

A serious defect that needs to be addressed as I am sure it will trip others up.

Cheers
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12071
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Program wont load
Reply #2 - Apr 6th, 2013 at 7:56pm
Print Post  

hi you can add new files in any way that you like. Think about how the arduino use works it does not have a project. The compiler in vs follows the arduino rules. This means that all sources in the sketch folder are always compiled so be sure to move unwanted sources out of the sketch folder or it will cause compilation errors.
  
Back to top
WWW  
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint