• AVR Freaks

Other Harmony 3 Woes

Author
jimctr7
New Member
  • Total Posts : 10
  • Reward points : 0
  • Joined: 2020/04/09 10:34:40
  • Location: 0
  • Status: offline
2020/05/21 17:03:43 (permalink)
0

Other Harmony 3 Woes

Whenever I make a change in the configurator, and generate new code,  I get the following error during compilation:
 
dist/default/production/crt0.o: In function `_main_entry':
(.text.main_entry+0x24): undefined reference to `main'
dist/default/production/crt0.o: In function `_main_entry':
(.text.main_entry+0x28): undefined reference to `main'
collect2.exe: error: ld returned 255 exit status
make[2]: *** [nbproject/Makefile-default.mk:501: dist/default/production/900179-update.X.production.hex] Error 255
make[1]: *** [nbproject/Makefile-default.mk:91: .build-conf] Error 2
make: *** [nbproject/Makefile-impl.mk:39: .build-impl] Error 2
 
The only way I have found to fix this problem is to delete the project and create a new one from scratch.  It's as if the configurator corrupted my project, so I need to toss it out.  Has anyone come across this and figured out a way to avoid creating a new project every time the configurator is used?
#1

4 Replies Related Threads

    nigelwright7557
    Super Member
    • Total Posts : 422
    • Reward points : 0
    • Joined: 2006/11/06 08:15:51
    • Location: 0
    • Status: online
    Re: Other Harmony 3 Woes 2020/05/21 17:07:07 (permalink)
    0
    H3 can go wrong occasionally probably due to it being so complex.
    I do about 10 minutes work then copy working directory to my backup drive.
    Saves me starting from scratch !
    Also sometimes a reboot will kick H3 into working ok again.
     
    #2
    rainbolt
    New Member
    • Total Posts : 1
    • Reward points : 0
    • Joined: 2020/05/15 18:59:24
    • Location: 0
    • Status: offline
    Re: Other Harmony 3 Woes 2020/05/21 21:25:56 (permalink)
    0
    I ran into this problem as well.  In the configurator under system/device & project configuration/project configuration menu I had "Generate Main Source File" checked.  So the configurator obliges by creating a new main.c.
     
    All I needed to do was delete the new file.  My main.c was called something else so there was no difficulty in just deleting the superfluous file.   YMMV and all that.
    Cheers!
    #3
    arpananand
    Super Member
    • Total Posts : 486
    • Reward points : 0
    • Joined: 2009/11/18 04:35:42
    • Location: 0
    • Status: offline
    Re: Other Harmony 3 Woes 2020/05/22 01:14:15 (permalink)
    2 (1)
    try this:
    1. remove main.c file from your mplabx project
    2. regenerate code from MHC to add the main.c again
     
     
    #4
    arpananand
    Super Member
    • Total Posts : 486
    • Reward points : 0
    • Joined: 2009/11/18 04:35:42
    • Location: 0
    • Status: offline
    Re: Other Harmony 3 Woes 2020/05/22 08:03:54 (permalink)
    0
    @rainbolt, what you can also do is, change the name of main.c file which MHC generates. it can be done right under "Generate Main Source File" option which you mentioned. that way everytime you regnerate, MHC will generate and add correct <your choice of main>.c file.
    #5
    Jump to:
    © 2020 APG vNext Commercial Version 4.5