abecedarian 330 Posted April 17, 2014 Share Posted April 17, 2014 I have a strange problem with Energia. On certain simple projects it generates huge (512M) .bin file and hangs during the upload, although the binary sketch size reported in the shell is perfectly normal. It is reproduceable, but I can not find what in the code triggeres it. Has anyone noticed something similar ?Can you post the code that results in the exorbitant code? Quote Link to post Share on other sites
spirilis 1,265 Posted April 17, 2014 Share Posted April 17, 2014 Inspect the .elf file with arm-none-eabi-objdump (found in hardware/tools/lm4f/bin) to see what's up. The -x option shows all the sections, sizes and locations so it may give a hint. Quote Link to post Share on other sites
vladn 3 Posted April 18, 2014 Share Posted April 18, 2014 Nothing abnormal in .elf (using objdump) as far as I can see, but the .bin is messed up (under XP x64 and 8.1 x64). I'll try this weekend to isolate the case. Quote Link to post Share on other sites
vladn 3 Posted April 23, 2014 Share Posted April 23, 2014 I think I found the culprit - uint64_t seem to confuse the linker in certain cases. Since it works sometimes perhaps the problem is related to the alignment ? I used uint64_t to avoid overload in the duty cycle computations in my variant of the PMWWrite(). I switched to float and so far everything is stable. Quote Link to post Share on other sites
Rei Vilo 695 Posted April 24, 2014 Share Posted April 24, 2014 About uint64_t on Stellaris and Tiva C, see #247 StellarPad: uint64_t Related Undefined References Quote Link to post Share on other sites
dpharris 13 Posted April 24, 2014 Share Posted April 24, 2014 Sorry, newly question --- Where do I find "#247:..."? David Quote Link to post Share on other sites
vladn 3 Posted April 25, 2014 Share Posted April 25, 2014 It is under "closed" issues on github: https://github.com/energia/Energia/issues/247 But the problem I described seems unrelated. The .elf looks normal (to my untrained eye) yet the .bin is huge. The problem seems to happen during the objcopy. Quote Link to post Share on other sites
vladn 3 Posted April 25, 2014 Share Posted April 25, 2014 Perhaps someone with more experience with GCC flow can look at these objdump -x outputs and get some idea. The only change between the two projects is "uint64_t" changed to "float" in one place inside the PWMWrite(). using uint64_t (.bin file 512Mb): 1.txt using float (.bin size 3876 bytes) 2.txt Quote Link to post Share on other sites
energia 485 Posted April 25, 2014 Author Share Posted April 25, 2014 @@vladn can you please post the offending Sketch or modifications that you made to the framework so that I can try and reproduce? Quote Link to post Share on other sites
vladn 3 Posted April 25, 2014 Share Posted April 25, 2014 @@energia 1. Pull the latest wiring_analog.c and the TServo library from my Energia clone: https://github.com/vladn2/Energia 2. Build the TServo "three_async_servos" example. The .bin should come up normal (my latest version of wiring_analog.c uses float). 3. Change the "float" to "uint64_t" inside PWMWrite() inside wiring_analog.c (there is only one place). 4. Build the example and check the size of the .bin file. Let me know if you can reproduce the problem. Quote Link to post Share on other sites
igor 163 Posted October 6, 2014 Share Posted October 6, 2014 FYI: New Energia release 0101E0013 - 09/05/2014 http://forum.43oh.com/topic/5839-new-energia-release-0101e0013-09052014/ "This release adds support for the awesome CC3200 WiFi LaunchPad and CC3100 BoosterPack for MSP430 and TivaC." If you have a CC3200, be sure to see the preparation and cautions mentioned in the above thread. (ADC voltage limit, jumper settings) [i just realized that there hasn't been much of an announcement of this update on stellarisiti. Thought would be well to include a notice here for those who don't read 43oh.] Issues: The Tiva and CC3200 support inadvertently had optimization turned off. http://forum.43oh.com/topic/5876-energia-0101e0013-how-turn-on-optimization-for-tivacc3200/ The next release will fix this, but in the interim you can download a patch from the above thread that turns optimization back on. [Edit]micros function has problems on CC3200. See http://forum.43oh.com/topic/5902-measure-short-amounts-of-time-with-micros/ 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.