AndreL 1 Posted August 30, 2016 Share Posted August 30, 2016 Everyone, I am new to the Energia platform. I am a professional embedded developer, so rarely use Arduino like tools, well never Unless I am trying to teach someone how to get started. That said, I have a project that I was coding in TI Code Studio for a client, then I thought on this next project, much simpler, I would use Energia, so they could actually make changes to it -- Anyway, I downloaded the Energia ZIP latest, there is no installer, so unzipped into directory. I then set it up, board selected MSP432 Launchpad, then started trying examples. Everything works perfectly. However, when I take ANY project, blink, you name it and save as and place into another directory, ANYWHERE -- then re-compile, I get: C:\Users\Andre\AppData\Local\Energia15\packages\energia\hardware\msp432\1.3.3\cores\msp432\gnu/targets/arm/rtsv7M/lib/boot.am4fg(startup.om4fg): In function `startupC': /db/vtree/library/trees/zumaprod/zumaprod-n06/exports/tirtos_full_2_20_00_06/products/bios_6_46_00_23/packages/gnu/targets/arm/rtsv7M/startup.c:76: undefined reference to `main' collect2.exe: error: ld returned 1 exit status exit status 1 Error compiling for board LaunchPad w/ msp432 EMT (48MHz). In other words, the linker can't find main() -- so I am thinking, someone HARD coded a path somewhere and at this point, I can't save anything and then run it. Currently my work around is: 1. Open any example project, compile, upload, test it, works. 2. Take my source and copy into IDE, then compile, upload, it works. 3. IF I then try to save, I get read only, since the examples are flagged read-only, thus I save as another name, in a number of directories, no matter what, THEN when I try to compile I always get: C:\Users\Andre\AppData\Local\Energia15\packages\energia\hardware\msp432\1.3.3\cores\msp432\gnu/targets/arm/rtsv7M/lib/boot.am4fg(startup.om4fg): In function `startupC': /db/vtree/library/trees/zumaprod/zumaprod-n06/exports/tirtos_full_2_20_00_06/products/bios_6_46_00_23/packages/gnu/targets/arm/rtsv7M/startup.c:76: undefined reference to `main' collect2.exe: error: ld returned 1 exit status exit status 1 Error compiling for board LaunchPad w/ msp432 EMT (48MHz). I am getting frustrated here, the whole point of this was to try and give the customers something they might be able to put hands on, but this IDE needs to be solid -- Anyway, any help or suggestions would be appreciated. This should work out of box, "saving" the project should NOT break the application and IDE loose track of the build process, etc. Andre' bluehash 1 Quote Link to post Share on other sites
energia 485 Posted August 30, 2016 Share Posted August 30, 2016 Thanks for reporting this and sorry for the inconvenience this is causing. This should be straight forward and would very much like to get to the bottom of this. So please bear with me while we try to get to the bottom of this. I tried to reproduce it on Windows 10. But am not able to reproduce the issue (see steps below). You might have hit a corner case that we might not have caught. Would really appreciate it if you could provide details such as Sketch name, Sketch folder saved to, what is in that folder, etc. Anything helps. I'll then use those details to try and reproduce it. Would be great if you could try the below and see if that works. Can you please also copy paste the entire output of the black log window in this thread for both the fail and success case? Before you do so, please turn on "Show verbose output during [ ] compilation". Hopefully that will provide additional clues. This is what I did in an attempt to reproduce the issue. Open File->Examples->01.Basic->Blink File->Save As... Saved it to Desktop/Blink. This should produce a folder Blink on your Desktop with a file Blink.ino in it. Then Sketch->Verify/Compile This works as expected, the file compiles and produces an .elf file but obviously I am missing something in my steps that makes it fail in your case. Robert bluehash 1 Quote Link to post Share on other sites
AndreL 1 Posted August 31, 2016 Author Share Posted August 31, 2016 Thanks -- I will do some runs and show with a screen cast. But, you are saving to the desktop, this is a very magical place, and a good place to hardcode something, I wonder if you try saving in a C:\testing\Blink -- what would happen? Anyway, I will show with video -- right now, just fighting the serial system without debugging Andre' Quote Link to post Share on other sites
energia 485 Posted August 31, 2016 Share Posted August 31, 2016 None of the paths should be hardcoded and as far as I can see aren't. Saving to C:\testing\Blink still works for me. Screencasts and log output pasts would be great to have. Quote Link to post Share on other sites
L.R.A 78 Posted August 31, 2016 Share Posted August 31, 2016 @@energia btw, is MSP432 Energia still not supported in CCS so it the debugger can be used? Quote Link to post Share on other sites
L.R.A 78 Posted August 31, 2016 Share Posted August 31, 2016 You said, any path but still I must ask. Does your windows user name have any weird characters like (how are they called in english), the: Quote Link to post Share on other sites
AndreL 1 Posted September 25, 2016 Author Share Posted September 25, 2016 You said, any path but still I must ask. Does your windows user name have any weird characters like (how are they called in english), the: Quote Link to post Share on other sites
litos97 0 Posted June 3, 2017 Share Posted June 3, 2017 Hi there, I´m having the same problem, with Energia 1.6.10E18 an my launchpad CC1350. I´m working with Windows 7 VM over Mac OS X Sierra. This happens when I start Engergía the first time. To solve the problem I comment the 70 - 80 % of code and then the compilation is OK. After that I remove the comments (/* ...*/) and all is ok again. Now I can make changes for all day and no error. How can I solve this issue ?? Thank´s a lot. Litos 97 Quote Link to post Share on other sites
dubnet 238 Posted June 4, 2017 Share Posted June 4, 2017 Energia has had some sensitivity to not only unusual characters that might be in the path but also very long paths. What has worked in the past to is to move the Energia folder to the root of your drive (or one or two folders away from the root) and to use text based folder names, avoiding special characters. Quote Link to post Share on other sites
litos97 0 Posted June 4, 2017 Share Posted June 4, 2017 Thank you dubnet. I´ve tried to short the paths and delete some blank spaces and so, but it doesn't work. I´ve attached a screenshot where you can see the compilation error log window. My project path now is C:\energia_1_6_10E18\MGG\ Thank´s a lot. Litos97 Quote Link to post Share on other sites
Rickta59 589 Posted June 5, 2017 Share Posted June 5, 2017 Something is certainly wrong with your setup. In the picture you posted, I see it trying to compile using the -mcpu=cortex-m3 flag. That is wrong it would be -mcpu=cortex-m4. Looking at the stuff that is checked into github.com (those seem to be right) However, you can't really trust what is out on github. So who knows. You might look in the Energia15\package directory and find the platform.txt file and verify it has cortex-m4. Never mind ignore this post I read the topic title and it was msp432 .. I didn't look closely at your post. You are using a cc1350 which is a cortex-m3. I'm not sure what is wrong. Quote Link to post Share on other sites
lonelycanyon 1 Posted July 3, 2018 Share Posted July 3, 2018 Just in case anyone comes across this in Google, I encountered a very similar bug in energia 17 and 18: code won't compile in user saved projects, but will compile if you copy the code into an example sketch. After several days of tinkering I FOUND THE PROBLEM, it seems that is you have a function name that contains 'setup' or 'loop' and you previously compiled to a different board, the sketch won't compile. once you change the name of these functions, the sketch compiles, and curiously, if you change it back it also compiles. so, to avoid this bug (at least my variant of it): don't create functions that contain the words 'setup' or 'loop' steps to reproduce: create a new project with this code: void setuptwo() { } void setup() { // put your setup code here, to run once: setuptwo(); } void loop() { // put your main code here, to run repeatedly: } compile for MSP430F5529 compile for MSP432 Hope this helps compilation log.txt Fmilburn 1 Quote Link to post Share on other sites
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.