Jump to content

fughilli

Members
  • Content Count

    11
  • Joined

  • Last visited

About fughilli

  • Rank
    Member

Profile Information

  • Sparkfun
    IOIO, Bus Pirate, GPS Module(s), Arduino Mega
  1. They are both using the same toolchain. I actually have Code::Blocks pointing to the /bin directory under Energia/hardware/tools/lm4f. As for include directories, I originally had added Energia/hardware/tools/lm4f/arm-none-eabi/include and Energia/hardware/tools/lm4f/arm-none-eabi/include/c++/4.7.1 to the build search paths in Code::Blocks, but I removed them later; that didn't seem to change anything... I tried fixing the warnings about initializer lists by populating the arrays manually, but that didn't fix it; I also tried compiling with the C++11 option, but that didn't fix it either. (I was a little wary of the second option, because that would differ from the arguments to the toolchain from Energia.)
  2. Hello all, A year or two ago I attempted to setup Code::Blocks with the arm-none-eabi toolchain so that I could compile and run my Energia projects without dealing with the idiosyncrasies of the Processing-based IDE. I did not much understand command-line tools or GCC and so my efforts were somewhat frustrated. I have picked it up again, and almost have it working. I have analyzed the verbose output from Energia to determine which compiler/linker flags are used, and set up Code::Blocks to do the exact same things as Energia during compilation (excepting one thing, which I will get to later). My projects compile, and I am able to upload them to the device, but for some reason the behaviour is not quite the same. (Specifically, a function I wrote for projecting 3D triangles to a plane does not return the correct value. I initially suspected a problem with the FPU configuration, but I debunked that by trying some other math which compiled and ran correctly.) Also, the .bin file generated by Energia is a slightly different size than the one generated by Code::Blocks. The only difference in the build processes between the two that I can see is that Energia uses arm-none-eabi-ar to roll an archive from the compiled "cores" code which the compiled application is then statically linked against, whereas my Code::Blocks setup compiles and then links everything together in one step. I do not think this is a significant difference, but I can try doing that if all else fails. The build output from Energia and Code::Blocks is attached below, as well as the generated .bin files for each. The code which was compiled to produce the .bin files is identical. If anyone can figure this one out, or help me understand better how Energia goes from code to executable, it would be much appreciated! P.S.: I had to change the file extensions of the .bin's to .txt so that I could upload them. CodeBlocksOutput.txt EnergiaOutput.txt CodeBlocksbin.txt Energiabin.txt
  3. Hello again, I've been busy thinking about how to restructure this library, and also about how to fix some issues I discovered with it. First: The modified linker script I originally posted is--in fact--flawed. Seriously so. I added in a section in the RAM for the ARM exception unwinding table (bounded by the __exidx_start and __exidx_end symbols) to allow me to use the GCC library functions that trigger errors (inverse trig, sqrt, etc...). Unfortunately, I did not have a very strong understanding of how linker scripts actually worked, and so I ended up placing that section in such a way that it overlaps the heap. (Not good.) This resulted in a lot of erratic behavior that prompted me to post this as an "experimental" library. After making a small modification to the linker script that moved this section into the FLASH, all of the erratic behavior went away. So, I am now posting the new linker script for you all to use. Second: I have now placed the entirety of the Scheduler library under GPLv3 (as opposed to the sleep-deprivation-induced-apathy license that it was previously under). I am posting my current code now as well, but as I have done a lot of tweaking to the way it works and have not done rigorous testing on the new functions, I am not going to suggest switching to it just yet. It should still be backwards-compatible with the original function set, but I am no professional regression tester so don't hold me accountable for any issues. It was "experimental" after all. I am going to say, for the time being, that this new code still is. Third: This doesn't really fit into parallel structure with the former items, but I did do a test to see how much space an "event" takes in memory. It's 32 bytes. Okay, that should about do it! -K/Fughilli linker script and startup_gcc.zip Chronos1.0.zip
  4. Hmm. That's an interesting issue. I will investigate as well, but I personally haven't had any issues between delayMicroseconds() and the servo library. I wrote these three libraries and the Chronos library for a quadcopter project I am working on, and they all play nicely with one another, including delays and the other built-in library functions. Thanks for bringing my attention to the problem! -K/Fughilli
  5. Hello all! I've been on a sort of coding binge lately... and so a new library has been born! This one will come with basically no manual and no explanation, other than: It lets you schedule things to happen at specific times. It is timer interrupt-driven. It works with the StellarPad. It requires that you make some modifications to startup_gcc.c and (at least, in my case) to Energia.h, main.c, and lm4fcpp.ld. All the files are attached below. Be warned that this is an early prototype, and that though it works (as far as I can tell) now, it will probably undergo some pretty significant changes in the future. Three examples are included. Have fun! -K/fughilli Chronos.zip modified_things.zip
  6. Hello all! I've got three new libraries to share with you! They are: An Arduino "Servo" library clone (StellarPad): Duplicates all of the functionality of the Arduino "Servo" library. Fully compatible with all existing sketches that use the Arduino "Servo" library. Based upon the Eigendreams servo library posted here a while back. Supports 8 servos as-is. Can be modified to do a heck of a lot more, but that is up to you to incorporate (at least for now -- update to come soon). An ultrasonic rangefinder library (StellarPad, easily modifiable to work with other Energia devices): Designed for the HC-SR04 rangefinder, about $5 on e-bay. Should also work with some other rangefinders, but I have not tested any others. That is, again, up to you (for now). Supports as many of them as you can fit on your I/O. A data smoother library (All Energia/Arduino supported devices): Inspired by the Arduino "smoothing" example by Tom Igoe. Allows the creation of "Smoother" objects that calculate running averages of raw data. "Smoother" is a template class and can be instantiated to work with int's, float's, long's, etc. All three libraries have their own examples, and the following is an example that incorporates the functionality of all of them (No comments, sorry! This one is pretty self-explanatory. See the library-specific examples for more details): #include <SonicRanger.h> #include <Smoother.h> #include <Servo.h> SonicRanger sr; Servo servo; Smoother<int, 10> ssmoother; boolean smoothing = false; void setup () { sr.attach(PE_1, PE_2); servo.attach(PF_1); pinMode(BLUE_LED, OUTPUT); digitalWrite(BLUE_LED, LOW); pinMode(PUSH2, INPUT); attachInterrupt(PUSH2, buttonISR, FALLING); } void loop () { float distance = sr.getDistance(INCHES); int processedDistance; if(distance > 0) { processedDistance = (int)(distance * 1000); processedDistance = constrain(processedDistance, 2000, 12000); if(smoothing) { ssmoother.pushValue(processedDistance); processedDistance = ssmoother.pullValue(); } servo.write(map(processedDistance, 2000, 12000, 0, 180)); } delay(50); } void buttonISR () { smoothing = !smoothing; digitalWrite(BLUE_LED, smoothing); } Video demonstration of the above example sketch: http://youtu.be/IViqIa4Rl9Y Enjoy! -K/Fughilli SonicRanger.zip Smoother.zip Servo.zip
  7. fughilli

    Issue with sqrt()

    Okay, so I've changed the code a bit to remove any ambiguity that may have been presented by the use of Random. The new code is as follows: #include <math.h> float test_arg = 1.0f; void setup () { Serial.begin(9600); delay(100); for(int i = 0; i < 10; i++) { Serial.println(sqrt(test_arg)); test_arg += 0.1f; } } void loop () { } It still doesn't compile and spits out the same error: D:\ENERGIA\HARDWARE\TOOLS\LM4F\BIN\arm-none-eabi-g++ -c -g -Os -Wall -fno-rtti -fno-exceptions -ffunction-sections -fdata-sections -mthumb -mcpu=cortex-m4 -mfloat-abi=hard -mfpu=fpv4-sp-d16 -fsingle-precision-constant -DF_CPU=80000000L -MMD -DARDUINO=101 -DENERGIA=9 -ID:\Energia\hardware\lm4f\cores\lm4f -ID:\Energia\hardware\lm4f\variants\stellarpad C:\Users\<my username>\AppData\Local\Temp\build92750122632519614.tmp\sketch_jun02a.cpp -o C:\Users\<my username>\AppData\Local\Temp\build92750122632519614.tmp\sketch_jun02a.cpp.o Using previously compiled: C:\Users\<my username>\AppData\Local\Temp\build92750122632519614.tmp\itoa.c.o Using previously compiled: C:\Users\<my username>\AppData\Local\Temp\build92750122632519614.tmp\random.c.o Using previously compiled: C:\Users\<my username>\AppData\Local\Temp\build92750122632519614.tmp\startup_gcc.c.o Using previously compiled: C:\Users\<my username>\AppData\Local\Temp\build92750122632519614.tmp\WInterrupts.c.o Using previously compiled: C:\Users\<my username>\AppData\Local\Temp\build92750122632519614.tmp\wiring.c.o Using previously compiled: C:\Users\<my username>\AppData\Local\Temp\build92750122632519614.tmp\wiring_analog.c.o Using previously compiled: C:\Users\<my username>\AppData\Local\Temp\build92750122632519614.tmp\wiring_digital.c.o Using previously compiled: C:\Users\<my username>\AppData\Local\Temp\build92750122632519614.tmp\wiring_pulse.c.o Using previously compiled: C:\Users\<my username>\AppData\Local\Temp\build92750122632519614.tmp\wiring_shift.c.o Using previously compiled: C:\Users\<my username>\AppData\Local\Temp\build92750122632519614.tmp\adc.c.o Using previously compiled: C:\Users\<my username>\AppData\Local\Temp\build92750122632519614.tmp\can.c.o Using previously compiled: C:\Users\<my username>\AppData\Local\Temp\build92750122632519614.tmp\comp.c.o Using previously compiled: C:\Users\<my username>\AppData\Local\Temp\build92750122632519614.tmp\cpu.c.o Using previously compiled: C:\Users\<my username>\AppData\Local\Temp\build92750122632519614.tmp\eeprom.c.o Using previously compiled: C:\Users\<my username>\AppData\Local\Temp\build92750122632519614.tmp\epi.c.o Using previously compiled: C:\Users\<my username>\AppData\Local\Temp\build92750122632519614.tmp\ethernet.c.o Using previously compiled: C:\Users\<my username>\AppData\Local\Temp\build92750122632519614.tmp\fan.c.o Using previously compiled: C:\Users\<my username>\AppData\Local\Temp\build92750122632519614.tmp\flash.c.o Using previously compiled: C:\Users\<my username>\AppData\Local\Temp\build92750122632519614.tmp\fpu.c.o Using previously compiled: C:\Users\<my username>\AppData\Local\Temp\build92750122632519614.tmp\gpio.c.o Using previously compiled: C:\Users\<my username>\AppData\Local\Temp\build92750122632519614.tmp\hibernate.c.o Using previously compiled: C:\Users\<my username>\AppData\Local\Temp\build92750122632519614.tmp\i2c.c.o Using previously compiled: C:\Users\<my username>\AppData\Local\Temp\build92750122632519614.tmp\i2s.c.o Using previously compiled: C:\Users\<my username>\AppData\Local\Temp\build92750122632519614.tmp\interrupt.c.o Using previously compiled: C:\Users\<my username>\AppData\Local\Temp\build92750122632519614.tmp\lpc.c.o Using previously compiled: C:\Users\<my username>\AppData\Local\Temp\build92750122632519614.tmp\mpu.c.o Using previously compiled: C:\Users\<my username>\AppData\Local\Temp\build92750122632519614.tmp\peci.c.o Using previously compiled: C:\Users\<my username>\AppData\Local\Temp\build92750122632519614.tmp\pwm.c.o Using previously compiled: C:\Users\<my username>\AppData\Local\Temp\build92750122632519614.tmp\qei.c.o Using previously compiled: C:\Users\<my username>\AppData\Local\Temp\build92750122632519614.tmp\ssi.c.o Using previously compiled: C:\Users\<my username>\AppData\Local\Temp\build92750122632519614.tmp\sysctl.c.o Using previously compiled: C:\Users\<my username>\AppData\Local\Temp\build92750122632519614.tmp\sysexc.c.o Using previously compiled: C:\Users\<my username>\AppData\Local\Temp\build92750122632519614.tmp\systick.c.o Using previously compiled: C:\Users\<my username>\AppData\Local\Temp\build92750122632519614.tmp\timer.c.o Using previously compiled: C:\Users\<my username>\AppData\Local\Temp\build92750122632519614.tmp\uart.c.o Using previously compiled: C:\Users\<my username>\AppData\Local\Temp\build92750122632519614.tmp\udma.c.o Using previously compiled: C:\Users\<my username>\AppData\Local\Temp\build92750122632519614.tmp\usb.c.o Using previously compiled: C:\Users\<my username>\AppData\Local\Temp\build92750122632519614.tmp\watchdog.c.o Using previously compiled: C:\Users\<my username>\AppData\Local\Temp\build92750122632519614.tmp\HardwareSerial.cpp.o Using previously compiled: C:\Users\<my username>\AppData\Local\Temp\build92750122632519614.tmp\main.cpp.o Using previously compiled: C:\Users\<my username>\AppData\Local\Temp\build92750122632519614.tmp\new.cpp.o Using previously compiled: C:\Users\<my username>\AppData\Local\Temp\build92750122632519614.tmp\Print.cpp.o Using previously compiled: C:\Users\<my username>\AppData\Local\Temp\build92750122632519614.tmp\Stream.cpp.o Using previously compiled: C:\Users\<my username>\AppData\Local\Temp\build92750122632519614.tmp\Tone.cpp.o Using previously compiled: C:\Users\<my username>\AppData\Local\Temp\build92750122632519614.tmp\WMath.cpp.o Using previously compiled: C:\Users\<my username>\AppData\Local\Temp\build92750122632519614.tmp\WString.cpp.o D:\ENERGIA\HARDWARE\TOOLS\LM4F\BIN\arm-none-eabi-ar rcs C:\Users\<my username>\AppData\Local\Temp\build92750122632519614.tmp\core.a C:\Users\<my username>\AppData\Local\Temp\build92750122632519614.tmp\itoa.c.o D:\ENERGIA\HARDWARE\TOOLS\LM4F\BIN\arm-none-eabi-ar rcs C:\Users\<my username>\AppData\Local\Temp\build92750122632519614.tmp\core.a C:\Users\<my username>\AppData\Local\Temp\build92750122632519614.tmp\random.c.o D:\ENERGIA\HARDWARE\TOOLS\LM4F\BIN\arm-none-eabi-ar rcs C:\Users\<my username>\AppData\Local\Temp\build92750122632519614.tmp\core.a C:\Users\<my username>\AppData\Local\Temp\build92750122632519614.tmp\startup_gcc.c.o D:\ENERGIA\HARDWARE\TOOLS\LM4F\BIN\arm-none-eabi-ar rcs C:\Users\<my username>\AppData\Local\Temp\build92750122632519614.tmp\core.a C:\Users\<my username>\AppData\Local\Temp\build92750122632519614.tmp\WInterrupts.c.o D:\ENERGIA\HARDWARE\TOOLS\LM4F\BIN\arm-none-eabi-ar rcs C:\Users\<my username>\AppData\Local\Temp\build92750122632519614.tmp\core.a C:\Users\<my username>\AppData\Local\Temp\build92750122632519614.tmp\wiring.c.o D:\ENERGIA\HARDWARE\TOOLS\LM4F\BIN\arm-none-eabi-ar rcs C:\Users\<my username>\AppData\Local\Temp\build92750122632519614.tmp\core.a C:\Users\<my username>\AppData\Local\Temp\build92750122632519614.tmp\wiring_analog.c.o D:\ENERGIA\HARDWARE\TOOLS\LM4F\BIN\arm-none-eabi-ar rcs C:\Users\<my username>\AppData\Local\Temp\build92750122632519614.tmp\core.a C:\Users\<my username>\AppData\Local\Temp\build92750122632519614.tmp\wiring_digital.c.o D:\ENERGIA\HARDWARE\TOOLS\LM4F\BIN\arm-none-eabi-ar rcs C:\Users\<my username>\AppData\Local\Temp\build92750122632519614.tmp\core.a C:\Users\<my username>\AppData\Local\Temp\build92750122632519614.tmp\wiring_pulse.c.o D:\ENERGIA\HARDWARE\TOOLS\LM4F\BIN\arm-none-eabi-ar rcs C:\Users\<my username>\AppData\Local\Temp\build92750122632519614.tmp\core.a C:\Users\<my username>\AppData\Local\Temp\build92750122632519614.tmp\wiring_shift.c.o D:\ENERGIA\HARDWARE\TOOLS\LM4F\BIN\arm-none-eabi-ar rcs C:\Users\<my username>\AppData\Local\Temp\build92750122632519614.tmp\core.a C:\Users\<my username>\AppData\Local\Temp\build92750122632519614.tmp\adc.c.o D:\ENERGIA\HARDWARE\TOOLS\LM4F\BIN\arm-none-eabi-ar rcs C:\Users\<my username>\AppData\Local\Temp\build92750122632519614.tmp\core.a C:\Users\<my username>\AppData\Local\Temp\build92750122632519614.tmp\can.c.o D:\ENERGIA\HARDWARE\TOOLS\LM4F\BIN\arm-none-eabi-ar rcs C:\Users\<my username>\AppData\Local\Temp\build92750122632519614.tmp\core.a C:\Users\<my username>\AppData\Local\Temp\build92750122632519614.tmp\comp.c.o D:\ENERGIA\HARDWARE\TOOLS\LM4F\BIN\arm-none-eabi-ar rcs C:\Users\<my username>\AppData\Local\Temp\build92750122632519614.tmp\core.a C:\Users\<my username>\AppData\Local\Temp\build92750122632519614.tmp\cpu.c.o D:\ENERGIA\HARDWARE\TOOLS\LM4F\BIN\arm-none-eabi-ar rcs C:\Users\<my username>\AppData\Local\Temp\build92750122632519614.tmp\core.a C:\Users\<my username>\AppData\Local\Temp\build92750122632519614.tmp\eeprom.c.o D:\ENERGIA\HARDWARE\TOOLS\LM4F\BIN\arm-none-eabi-ar rcs C:\Users\<my username>\AppData\Local\Temp\build92750122632519614.tmp\core.a C:\Users\<my username>\AppData\Local\Temp\build92750122632519614.tmp\epi.c.o D:\ENERGIA\HARDWARE\TOOLS\LM4F\BIN\arm-none-eabi-ar rcs C:\Users\<my username>\AppData\Local\Temp\build92750122632519614.tmp\core.a C:\Users\<my username>\AppData\Local\Temp\build92750122632519614.tmp\ethernet.c.o D:\ENERGIA\HARDWARE\TOOLS\LM4F\BIN\arm-none-eabi-ar rcs C:\Users\<my username>\AppData\Local\Temp\build92750122632519614.tmp\core.a C:\Users\<my username>\AppData\Local\Temp\build92750122632519614.tmp\fan.c.o D:\ENERGIA\HARDWARE\TOOLS\LM4F\BIN\arm-none-eabi-ar rcs C:\Users\<my username>\AppData\Local\Temp\build92750122632519614.tmp\core.a C:\Users\<my username>\AppData\Local\Temp\build92750122632519614.tmp\flash.c.o D:\ENERGIA\HARDWARE\TOOLS\LM4F\BIN\arm-none-eabi-ar rcs C:\Users\<my username>\AppData\Local\Temp\build92750122632519614.tmp\core.a C:\Users\<my username>\AppData\Local\Temp\build92750122632519614.tmp\fpu.c.o D:\ENERGIA\HARDWARE\TOOLS\LM4F\BIN\arm-none-eabi-ar rcs C:\Users\<my username>\AppData\Local\Temp\build92750122632519614.tmp\core.a C:\Users\<my username>\AppData\Local\Temp\build92750122632519614.tmp\gpio.c.o D:\ENERGIA\HARDWARE\TOOLS\LM4F\BIN\arm-none-eabi-ar rcs C:\Users\<my username>\AppData\Local\Temp\build92750122632519614.tmp\core.a C:\Users\<my username>\AppData\Local\Temp\build92750122632519614.tmp\hibernate.c.o D:\ENERGIA\HARDWARE\TOOLS\LM4F\BIN\arm-none-eabi-ar rcs C:\Users\<my username>\AppData\Local\Temp\build92750122632519614.tmp\core.a C:\Users\<my username>\AppData\Local\Temp\build92750122632519614.tmp\i2c.c.o D:\ENERGIA\HARDWARE\TOOLS\LM4F\BIN\arm-none-eabi-ar rcs C:\Users\<my username>\AppData\Local\Temp\build92750122632519614.tmp\core.a C:\Users\<my username>\AppData\Local\Temp\build92750122632519614.tmp\i2s.c.o D:\ENERGIA\HARDWARE\TOOLS\LM4F\BIN\arm-none-eabi-ar rcs C:\Users\<my username>\AppData\Local\Temp\build92750122632519614.tmp\core.a C:\Users\<my username>\AppData\Local\Temp\build92750122632519614.tmp\interrupt.c.o D:\ENERGIA\HARDWARE\TOOLS\LM4F\BIN\arm-none-eabi-ar rcs C:\Users\<my username>\AppData\Local\Temp\build92750122632519614.tmp\core.a C:\Users\<my username>\AppData\Local\Temp\build92750122632519614.tmp\lpc.c.o D:\ENERGIA\HARDWARE\TOOLS\LM4F\BIN\arm-none-eabi-ar rcs C:\Users\<my username>\AppData\Local\Temp\build92750122632519614.tmp\core.a C:\Users\<my username>\AppData\Local\Temp\build92750122632519614.tmp\mpu.c.o D:\ENERGIA\HARDWARE\TOOLS\LM4F\BIN\arm-none-eabi-ar rcs C:\Users\<my username>\AppData\Local\Temp\build92750122632519614.tmp\core.a C:\Users\<my username>\AppData\Local\Temp\build92750122632519614.tmp\peci.c.o D:\ENERGIA\HARDWARE\TOOLS\LM4F\BIN\arm-none-eabi-ar rcs C:\Users\<my username>\AppData\Local\Temp\build92750122632519614.tmp\core.a C:\Users\<my username>\AppData\Local\Temp\build92750122632519614.tmp\pwm.c.o D:\ENERGIA\HARDWARE\TOOLS\LM4F\BIN\arm-none-eabi-ar rcs C:\Users\<my username>\AppData\Local\Temp\build92750122632519614.tmp\core.a C:\Users\<my username>\AppData\Local\Temp\build92750122632519614.tmp\qei.c.o D:\ENERGIA\HARDWARE\TOOLS\LM4F\BIN\arm-none-eabi-ar rcs C:\Users\<my username>\AppData\Local\Temp\build92750122632519614.tmp\core.a C:\Users\<my username>\AppData\Local\Temp\build92750122632519614.tmp\ssi.c.o D:\ENERGIA\HARDWARE\TOOLS\LM4F\BIN\arm-none-eabi-ar rcs C:\Users\<my username>\AppData\Local\Temp\build92750122632519614.tmp\core.a C:\Users\<my username>\AppData\Local\Temp\build92750122632519614.tmp\sysctl.c.o D:\ENERGIA\HARDWARE\TOOLS\LM4F\BIN\arm-none-eabi-ar rcs C:\Users\<my username>\AppData\Local\Temp\build92750122632519614.tmp\core.a C:\Users\<my username>\AppData\Local\Temp\build92750122632519614.tmp\sysexc.c.o D:\ENERGIA\HARDWARE\TOOLS\LM4F\BIN\arm-none-eabi-ar rcs C:\Users\<my username>\AppData\Local\Temp\build92750122632519614.tmp\core.a C:\Users\<my username>\AppData\Local\Temp\build92750122632519614.tmp\systick.c.o D:\ENERGIA\HARDWARE\TOOLS\LM4F\BIN\arm-none-eabi-ar rcs C:\Users\<my username>\AppData\Local\Temp\build92750122632519614.tmp\core.a C:\Users\<my username>\AppData\Local\Temp\build92750122632519614.tmp\timer.c.o D:\ENERGIA\HARDWARE\TOOLS\LM4F\BIN\arm-none-eabi-ar rcs C:\Users\<my username>\AppData\Local\Temp\build92750122632519614.tmp\core.a C:\Users\<my username>\AppData\Local\Temp\build92750122632519614.tmp\uart.c.o D:\ENERGIA\HARDWARE\TOOLS\LM4F\BIN\arm-none-eabi-ar rcs C:\Users\<my username>\AppData\Local\Temp\build92750122632519614.tmp\core.a C:\Users\<my username>\AppData\Local\Temp\build92750122632519614.tmp\udma.c.o D:\ENERGIA\HARDWARE\TOOLS\LM4F\BIN\arm-none-eabi-ar rcs C:\Users\<my username>\AppData\Local\Temp\build92750122632519614.tmp\core.a C:\Users\<my username>\AppData\Local\Temp\build92750122632519614.tmp\usb.c.o D:\ENERGIA\HARDWARE\TOOLS\LM4F\BIN\arm-none-eabi-ar rcs C:\Users\<my username>\AppData\Local\Temp\build92750122632519614.tmp\core.a C:\Users\<my username>\AppData\Local\Temp\build92750122632519614.tmp\watchdog.c.o D:\ENERGIA\HARDWARE\TOOLS\LM4F\BIN\arm-none-eabi-ar rcs C:\Users\<my username>\AppData\Local\Temp\build92750122632519614.tmp\core.a C:\Users\<my username>\AppData\Local\Temp\build92750122632519614.tmp\HardwareSerial.cpp.o D:\ENERGIA\HARDWARE\TOOLS\LM4F\BIN\arm-none-eabi-ar rcs C:\Users\<my username>\AppData\Local\Temp\build92750122632519614.tmp\core.a C:\Users\<my username>\AppData\Local\Temp\build92750122632519614.tmp\main.cpp.o D:\ENERGIA\HARDWARE\TOOLS\LM4F\BIN\arm-none-eabi-ar rcs C:\Users\<my username>\AppData\Local\Temp\build92750122632519614.tmp\core.a C:\Users\<my username>\AppData\Local\Temp\build92750122632519614.tmp\new.cpp.o D:\ENERGIA\HARDWARE\TOOLS\LM4F\BIN\arm-none-eabi-ar rcs C:\Users\<my username>\AppData\Local\Temp\build92750122632519614.tmp\core.a C:\Users\<my username>\AppData\Local\Temp\build92750122632519614.tmp\Print.cpp.o D:\ENERGIA\HARDWARE\TOOLS\LM4F\BIN\arm-none-eabi-ar rcs C:\Users\<my username>\AppData\Local\Temp\build92750122632519614.tmp\core.a C:\Users\<my username>\AppData\Local\Temp\build92750122632519614.tmp\Stream.cpp.o D:\ENERGIA\HARDWARE\TOOLS\LM4F\BIN\arm-none-eabi-ar rcs C:\Users\<my username>\AppData\Local\Temp\build92750122632519614.tmp\core.a C:\Users\<my username>\AppData\Local\Temp\build92750122632519614.tmp\Tone.cpp.o D:\ENERGIA\HARDWARE\TOOLS\LM4F\BIN\arm-none-eabi-ar rcs C:\Users\<my username>\AppData\Local\Temp\build92750122632519614.tmp\core.a C:\Users\<my username>\AppData\Local\Temp\build92750122632519614.tmp\WMath.cpp.o D:\ENERGIA\HARDWARE\TOOLS\LM4F\BIN\arm-none-eabi-ar rcs C:\Users\<my username>\AppData\Local\Temp\build92750122632519614.tmp\core.a C:\Users\<my username>\AppData\Local\Temp\build92750122632519614.tmp\WString.cpp.o D:\ENERGIA\HARDWARE\TOOLS\LM4F\BIN\arm-none-eabi-g++ -Os -nostartfiles -nostdlib -Wl,--gc-sections -T D:\Energia\hardware\lm4f\cores\lm4f\lm4fcpp.ld --entry=ResetISR -mthumb -mcpu=cortex-m4 -mfloat-abi=hard -mfpu=fpv4-sp-d16 -fsingle-precision-constant -o C:\Users\<my username>\AppData\Local\Temp\build92750122632519614.tmp\sketch_jun02a.cpp.elf C:\Users\<my username>\AppData\Local\Temp\build92750122632519614.tmp\sketch_jun02a.cpp.o C:\Users\<my username>\AppData\Local\Temp\build92750122632519614.tmp\core.a -LC:\Users\<my username>\AppData\Local\Temp\build92750122632519614.tmp -lc -lm -lgcc d:/energia/hardware/tools/lm4f/bin/../lib/gcc/arm-none-eabi/4.7.1/../../../../arm-none-eabi/lib/thumb/armv7e-m/fpu/fpv4-sp-d16\libm.a(lib_a-w_sqrt.o): In function `sqrt': C:\MinGW\msys\1.0\home\a0273864\yagarto\newlib-build\arm-none-eabi\thumb\armv7e-m\fpu\fpv4-sp-d16\newlib\libm\math/../../../../../../../../../newlib-1.20.0/newlib/libm/math/w_sqrt.c:83: undefined reference to `__errno' C:\MinGW\msys\1.0\home\a0273864\yagarto\newlib-build\arm-none-eabi\thumb\armv7e-m\fpu\fpv4-sp-d16\newlib\libm\math/../../../../../../../../../newlib-1.20.0/newlib/libm/math/w_sqrt.c:86: undefined reference to `__errno' collect2.exe: error: ld returned 1 exit status Any other possibilities? Okay, wait, I just found this: http://mhonarc.axis.se/dev-etrax/msg00675.html The guy there just defined "__errno" in his code body and it compiled: int __errno; I feel like that hack shouldn't be necessary. It compiled and is a workable solution for now. I would still like to know what causes the bug in the first place, though. If anyone can find a solution that doesn't require hacking in variables like this, please reply!
  8. fughilli

    Issue with sqrt()

    Hi, I'm having an issue with the sqrt() function. The following code compiles and runs: #include <math.h> void setup() { Serial.begin(9600); delay(100); Serial.println(sqrt(1.5f)); } void loop() { } It gives the following output on the serial console: 1.22 The following code, however, does not compile: #include <math.h> void setup() { Serial.begin(9600); randomSeed(analogRead(A0)); delay(100); Serial.println(sqrt(random(0.0, 1.0f))); } void loop() { } Energia spits out the following: D:\ENERGIA\HARDWARE\TOOLS\LM4F\BIN\arm-none-eabi-g++ -c -g -Os -Wall -fno-rtti -fno-exceptions -ffunction-sections -fdata-sections -mthumb -mcpu=cortex-m4 -mfloat-abi=hard -mfpu=fpv4-sp-d16 -fsingle-precision-constant -DF_CPU=80000000L -MMD -DARDUINO=101 -DENERGIA=9 -ID:\Energia\hardware\lm4f\cores\lm4f -ID:\Energia\hardware\lm4f\variants\stellarpad C:\Users\<my username>\AppData\Local\Temp\build1872331821301160683.tmp\sketch_jun01b.cpp -o C:\Users\<my username>\AppData\Local\Temp\build1872331821301160683.tmp\sketch_jun01b.cpp.o Using previously compiled: C:\Users\<my username>\AppData\Local\Temp\build1872331821301160683.tmp\itoa.c.o Using previously compiled: C:\Users\<my username>\AppData\Local\Temp\build1872331821301160683.tmp\random.c.o Using previously compiled: C:\Users\<my username>\AppData\Local\Temp\build1872331821301160683.tmp\startup_gcc.c.o Using previously compiled: C:\Users\<my username>\AppData\Local\Temp\build1872331821301160683.tmp\WInterrupts.c.o Using previously compiled: C:\Users\<my username>\AppData\Local\Temp\build1872331821301160683.tmp\wiring.c.o Using previously compiled: C:\Users\<my username>\AppData\Local\Temp\build1872331821301160683.tmp\wiring_analog.c.o Using previously compiled: C:\Users\<my username>\AppData\Local\Temp\build1872331821301160683.tmp\wiring_digital.c.o Using previously compiled: C:\Users\<my username>\AppData\Local\Temp\build1872331821301160683.tmp\wiring_pulse.c.o Using previously compiled: C:\Users\<my username>\AppData\Local\Temp\build1872331821301160683.tmp\wiring_shift.c.o Using previously compiled: C:\Users\<my username>\AppData\Local\Temp\build1872331821301160683.tmp\adc.c.o Using previously compiled: C:\Users\<my username>\AppData\Local\Temp\build1872331821301160683.tmp\can.c.o Using previously compiled: C:\Users\<my username>\AppData\Local\Temp\build1872331821301160683.tmp\comp.c.o Using previously compiled: C:\Users\<my username>\AppData\Local\Temp\build1872331821301160683.tmp\cpu.c.o Using previously compiled: C:\Users\<my username>\AppData\Local\Temp\build1872331821301160683.tmp\eeprom.c.o Using previously compiled: C:\Users\<my username>\AppData\Local\Temp\build1872331821301160683.tmp\epi.c.o Using previously compiled: C:\Users\<my username>\AppData\Local\Temp\build1872331821301160683.tmp\ethernet.c.o Using previously compiled: C:\Users\<my username>\AppData\Local\Temp\build1872331821301160683.tmp\fan.c.o Using previously compiled: C:\Users\<my username>\AppData\Local\Temp\build1872331821301160683.tmp\flash.c.o Using previously compiled: C:\Users\<my username>\AppData\Local\Temp\build1872331821301160683.tmp\fpu.c.o Using previously compiled: C:\Users\<my username>\AppData\Local\Temp\build1872331821301160683.tmp\gpio.c.o Using previously compiled: C:\Users\<my username>\AppData\Local\Temp\build1872331821301160683.tmp\hibernate.c.o Using previously compiled: C:\Users\<my username>\AppData\Local\Temp\build1872331821301160683.tmp\i2c.c.o Using previously compiled: C:\Users\<my username>\AppData\Local\Temp\build1872331821301160683.tmp\i2s.c.o Using previously compiled: C:\Users\<my username>\AppData\Local\Temp\build1872331821301160683.tmp\interrupt.c.o Using previously compiled: C:\Users\<my username>\AppData\Local\Temp\build1872331821301160683.tmp\lpc.c.o Using previously compiled: C:\Users\<my username>\AppData\Local\Temp\build1872331821301160683.tmp\mpu.c.o Using previously compiled: C:\Users\<my username>\AppData\Local\Temp\build1872331821301160683.tmp\peci.c.o Using previously compiled: C:\Users\<my username>\AppData\Local\Temp\build1872331821301160683.tmp\pwm.c.o Using previously compiled: C:\Users\<my username>\AppData\Local\Temp\build1872331821301160683.tmp\qei.c.o Using previously compiled: C:\Users\<my username>\AppData\Local\Temp\build1872331821301160683.tmp\ssi.c.o Using previously compiled: C:\Users\<my username>\AppData\Local\Temp\build1872331821301160683.tmp\sysctl.c.o Using previously compiled: C:\Users\<my username>\AppData\Local\Temp\build1872331821301160683.tmp\sysexc.c.o Using previously compiled: C:\Users\<my username>\AppData\Local\Temp\build1872331821301160683.tmp\systick.c.o Using previously compiled: C:\Users\<my username>\AppData\Local\Temp\build1872331821301160683.tmp\timer.c.o Using previously compiled: C:\Users\<my username>\AppData\Local\Temp\build1872331821301160683.tmp\uart.c.o Using previously compiled: C:\Users\<my username>\AppData\Local\Temp\build1872331821301160683.tmp\udma.c.o Using previously compiled: C:\Users\<my username>\AppData\Local\Temp\build1872331821301160683.tmp\usb.c.o Using previously compiled: C:\Users\<my username>\AppData\Local\Temp\build1872331821301160683.tmp\watchdog.c.o Using previously compiled: C:\Users\<my username>\AppData\Local\Temp\build1872331821301160683.tmp\HardwareSerial.cpp.o Using previously compiled: C:\Users\<my username>\AppData\Local\Temp\build1872331821301160683.tmp\main.cpp.o Using previously compiled: C:\Users\<my username>\AppData\Local\Temp\build1872331821301160683.tmp\new.cpp.o Using previously compiled: C:\Users\<my username>\AppData\Local\Temp\build1872331821301160683.tmp\Print.cpp.o Using previously compiled: C:\Users\<my username>\AppData\Local\Temp\build1872331821301160683.tmp\Stream.cpp.o Using previously compiled: C:\Users\<my username>\AppData\Local\Temp\build1872331821301160683.tmp\Tone.cpp.o Using previously compiled: C:\Users\<my username>\AppData\Local\Temp\build1872331821301160683.tmp\WMath.cpp.o Using previously compiled: C:\Users\<my username>\AppData\Local\Temp\build1872331821301160683.tmp\WString.cpp.o D:\ENERGIA\HARDWARE\TOOLS\LM4F\BIN\arm-none-eabi-ar rcs C:\Users\<my username>\AppData\Local\Temp\build1872331821301160683.tmp\core.a C:\Users\<my username>\AppData\Local\Temp\build1872331821301160683.tmp\itoa.c.o D:\ENERGIA\HARDWARE\TOOLS\LM4F\BIN\arm-none-eabi-ar rcs C:\Users\<my username>\AppData\Local\Temp\build1872331821301160683.tmp\core.a C:\Users\<my username>\AppData\Local\Temp\build1872331821301160683.tmp\random.c.o D:\ENERGIA\HARDWARE\TOOLS\LM4F\BIN\arm-none-eabi-ar rcs C:\Users\<my username>\AppData\Local\Temp\build1872331821301160683.tmp\core.a C:\Users\<my username>\AppData\Local\Temp\build1872331821301160683.tmp\startup_gcc.c.o D:\ENERGIA\HARDWARE\TOOLS\LM4F\BIN\arm-none-eabi-ar rcs C:\Users\<my username>\AppData\Local\Temp\build1872331821301160683.tmp\core.a C:\Users\<my username>\AppData\Local\Temp\build1872331821301160683.tmp\WInterrupts.c.o D:\ENERGIA\HARDWARE\TOOLS\LM4F\BIN\arm-none-eabi-ar rcs C:\Users\<my username>\AppData\Local\Temp\build1872331821301160683.tmp\core.a C:\Users\<my username>\AppData\Local\Temp\build1872331821301160683.tmp\wiring.c.o D:\ENERGIA\HARDWARE\TOOLS\LM4F\BIN\arm-none-eabi-ar rcs C:\Users\<my username>\AppData\Local\Temp\build1872331821301160683.tmp\core.a C:\Users\<my username>\AppData\Local\Temp\build1872331821301160683.tmp\wiring_analog.c.o D:\ENERGIA\HARDWARE\TOOLS\LM4F\BIN\arm-none-eabi-ar rcs C:\Users\<my username>\AppData\Local\Temp\build1872331821301160683.tmp\core.a C:\Users\<my username>\AppData\Local\Temp\build1872331821301160683.tmp\wiring_digital.c.o D:\ENERGIA\HARDWARE\TOOLS\LM4F\BIN\arm-none-eabi-ar rcs C:\Users\<my username>\AppData\Local\Temp\build1872331821301160683.tmp\core.a C:\Users\<my username>\AppData\Local\Temp\build1872331821301160683.tmp\wiring_pulse.c.o D:\ENERGIA\HARDWARE\TOOLS\LM4F\BIN\arm-none-eabi-ar rcs C:\Users\<my username>\AppData\Local\Temp\build1872331821301160683.tmp\core.a C:\Users\<my username>\AppData\Local\Temp\build1872331821301160683.tmp\wiring_shift.c.o D:\ENERGIA\HARDWARE\TOOLS\LM4F\BIN\arm-none-eabi-ar rcs C:\Users\<my username>\AppData\Local\Temp\build1872331821301160683.tmp\core.a C:\Users\<my username>\AppData\Local\Temp\build1872331821301160683.tmp\adc.c.o D:\ENERGIA\HARDWARE\TOOLS\LM4F\BIN\arm-none-eabi-ar rcs C:\Users\<my username>\AppData\Local\Temp\build1872331821301160683.tmp\core.a C:\Users\<my username>\AppData\Local\Temp\build1872331821301160683.tmp\can.c.o D:\ENERGIA\HARDWARE\TOOLS\LM4F\BIN\arm-none-eabi-ar rcs C:\Users\<my username>\AppData\Local\Temp\build1872331821301160683.tmp\core.a C:\Users\<my username>\AppData\Local\Temp\build1872331821301160683.tmp\comp.c.o D:\ENERGIA\HARDWARE\TOOLS\LM4F\BIN\arm-none-eabi-ar rcs C:\Users\<my username>\AppData\Local\Temp\build1872331821301160683.tmp\core.a C:\Users\<my username>\AppData\Local\Temp\build1872331821301160683.tmp\cpu.c.o D:\ENERGIA\HARDWARE\TOOLS\LM4F\BIN\arm-none-eabi-ar rcs C:\Users\<my username>\AppData\Local\Temp\build1872331821301160683.tmp\core.a C:\Users\<my username>\AppData\Local\Temp\build1872331821301160683.tmp\eeprom.c.o D:\ENERGIA\HARDWARE\TOOLS\LM4F\BIN\arm-none-eabi-ar rcs C:\Users\<my username>\AppData\Local\Temp\build1872331821301160683.tmp\core.a C:\Users\<my username>\AppData\Local\Temp\build1872331821301160683.tmp\epi.c.o D:\ENERGIA\HARDWARE\TOOLS\LM4F\BIN\arm-none-eabi-ar rcs C:\Users\<my username>\AppData\Local\Temp\build1872331821301160683.tmp\core.a C:\Users\<my username>\AppData\Local\Temp\build1872331821301160683.tmp\ethernet.c.o D:\ENERGIA\HARDWARE\TOOLS\LM4F\BIN\arm-none-eabi-ar rcs C:\Users\<my username>\AppData\Local\Temp\build1872331821301160683.tmp\core.a C:\Users\<my username>\AppData\Local\Temp\build1872331821301160683.tmp\fan.c.o D:\ENERGIA\HARDWARE\TOOLS\LM4F\BIN\arm-none-eabi-ar rcs C:\Users\<my username>\AppData\Local\Temp\build1872331821301160683.tmp\core.a C:\Users\<my username>\AppData\Local\Temp\build1872331821301160683.tmp\flash.c.o D:\ENERGIA\HARDWARE\TOOLS\LM4F\BIN\arm-none-eabi-ar rcs C:\Users\<my username>\AppData\Local\Temp\build1872331821301160683.tmp\core.a C:\Users\<my username>\AppData\Local\Temp\build1872331821301160683.tmp\fpu.c.o D:\ENERGIA\HARDWARE\TOOLS\LM4F\BIN\arm-none-eabi-ar rcs C:\Users\<my username>\AppData\Local\Temp\build1872331821301160683.tmp\core.a C:\Users\<my username>\AppData\Local\Temp\build1872331821301160683.tmp\gpio.c.o D:\ENERGIA\HARDWARE\TOOLS\LM4F\BIN\arm-none-eabi-ar rcs C:\Users\<my username>\AppData\Local\Temp\build1872331821301160683.tmp\core.a C:\Users\<my username>\AppData\Local\Temp\build1872331821301160683.tmp\hibernate.c.o D:\ENERGIA\HARDWARE\TOOLS\LM4F\BIN\arm-none-eabi-ar rcs C:\Users\<my username>\AppData\Local\Temp\build1872331821301160683.tmp\core.a C:\Users\<my username>\AppData\Local\Temp\build1872331821301160683.tmp\i2c.c.o D:\ENERGIA\HARDWARE\TOOLS\LM4F\BIN\arm-none-eabi-ar rcs C:\Users\<my username>\AppData\Local\Temp\build1872331821301160683.tmp\core.a C:\Users\<my username>\AppData\Local\Temp\build1872331821301160683.tmp\i2s.c.o D:\ENERGIA\HARDWARE\TOOLS\LM4F\BIN\arm-none-eabi-ar rcs C:\Users\<my username>\AppData\Local\Temp\build1872331821301160683.tmp\core.a C:\Users\<my username>\AppData\Local\Temp\build1872331821301160683.tmp\interrupt.c.o D:\ENERGIA\HARDWARE\TOOLS\LM4F\BIN\arm-none-eabi-ar rcs C:\Users\<my username>\AppData\Local\Temp\build1872331821301160683.tmp\core.a C:\Users\<my username>\AppData\Local\Temp\build1872331821301160683.tmp\lpc.c.o D:\ENERGIA\HARDWARE\TOOLS\LM4F\BIN\arm-none-eabi-ar rcs C:\Users\<my username>\AppData\Local\Temp\build1872331821301160683.tmp\core.a C:\Users\<my username>\AppData\Local\Temp\build1872331821301160683.tmp\mpu.c.o D:\ENERGIA\HARDWARE\TOOLS\LM4F\BIN\arm-none-eabi-ar rcs C:\Users\<my username>\AppData\Local\Temp\build1872331821301160683.tmp\core.a C:\Users\<my username>\AppData\Local\Temp\build1872331821301160683.tmp\peci.c.o D:\ENERGIA\HARDWARE\TOOLS\LM4F\BIN\arm-none-eabi-ar rcs C:\Users\<my username>\AppData\Local\Temp\build1872331821301160683.tmp\core.a C:\Users\<my username>\AppData\Local\Temp\build1872331821301160683.tmp\pwm.c.o D:\ENERGIA\HARDWARE\TOOLS\LM4F\BIN\arm-none-eabi-ar rcs C:\Users\<my username>\AppData\Local\Temp\build1872331821301160683.tmp\core.a C:\Users\<my username>\AppData\Local\Temp\build1872331821301160683.tmp\qei.c.o D:\ENERGIA\HARDWARE\TOOLS\LM4F\BIN\arm-none-eabi-ar rcs C:\Users\<my username>\AppData\Local\Temp\build1872331821301160683.tmp\core.a C:\Users\<my username>\AppData\Local\Temp\build1872331821301160683.tmp\ssi.c.o D:\ENERGIA\HARDWARE\TOOLS\LM4F\BIN\arm-none-eabi-ar rcs C:\Users\<my username>\AppData\Local\Temp\build1872331821301160683.tmp\core.a C:\Users\<my username>\AppData\Local\Temp\build1872331821301160683.tmp\sysctl.c.o D:\ENERGIA\HARDWARE\TOOLS\LM4F\BIN\arm-none-eabi-ar rcs C:\Users\<my username>\AppData\Local\Temp\build1872331821301160683.tmp\core.a C:\Users\<my username>\AppData\Local\Temp\build1872331821301160683.tmp\sysexc.c.o D:\ENERGIA\HARDWARE\TOOLS\LM4F\BIN\arm-none-eabi-ar rcs C:\Users\<my username>\AppData\Local\Temp\build1872331821301160683.tmp\core.a C:\Users\<my username>\AppData\Local\Temp\build1872331821301160683.tmp\systick.c.o D:\ENERGIA\HARDWARE\TOOLS\LM4F\BIN\arm-none-eabi-ar rcs C:\Users\<my username>\AppData\Local\Temp\build1872331821301160683.tmp\core.a C:\Users\<my username>\AppData\Local\Temp\build1872331821301160683.tmp\timer.c.o D:\ENERGIA\HARDWARE\TOOLS\LM4F\BIN\arm-none-eabi-ar rcs C:\Users\<my username>\AppData\Local\Temp\build1872331821301160683.tmp\core.a C:\Users\<my username>\AppData\Local\Temp\build1872331821301160683.tmp\uart.c.o D:\ENERGIA\HARDWARE\TOOLS\LM4F\BIN\arm-none-eabi-ar rcs C:\Users\<my username>\AppData\Local\Temp\build1872331821301160683.tmp\core.a C:\Users\<my username>\AppData\Local\Temp\build1872331821301160683.tmp\udma.c.o D:\ENERGIA\HARDWARE\TOOLS\LM4F\BIN\arm-none-eabi-ar rcs C:\Users\<my username>\AppData\Local\Temp\build1872331821301160683.tmp\core.a C:\Users\<my username>\AppData\Local\Temp\build1872331821301160683.tmp\usb.c.o D:\ENERGIA\HARDWARE\TOOLS\LM4F\BIN\arm-none-eabi-ar rcs C:\Users\<my username>\AppData\Local\Temp\build1872331821301160683.tmp\core.a C:\Users\<my username>\AppData\Local\Temp\build1872331821301160683.tmp\watchdog.c.o D:\ENERGIA\HARDWARE\TOOLS\LM4F\BIN\arm-none-eabi-ar rcs C:\Users\<my username>\AppData\Local\Temp\build1872331821301160683.tmp\core.a C:\Users\<my username>\AppData\Local\Temp\build1872331821301160683.tmp\HardwareSerial.cpp.o D:\ENERGIA\HARDWARE\TOOLS\LM4F\BIN\arm-none-eabi-ar rcs C:\Users\<my username>\AppData\Local\Temp\build1872331821301160683.tmp\core.a C:\Users\<my username>\AppData\Local\Temp\build1872331821301160683.tmp\main.cpp.o D:\ENERGIA\HARDWARE\TOOLS\LM4F\BIN\arm-none-eabi-ar rcs C:\Users\<my username>\AppData\Local\Temp\build1872331821301160683.tmp\core.a C:\Users\<my username>\AppData\Local\Temp\build1872331821301160683.tmp\new.cpp.o D:\ENERGIA\HARDWARE\TOOLS\LM4F\BIN\arm-none-eabi-ar rcs C:\Users\<my username>\AppData\Local\Temp\build1872331821301160683.tmp\core.a C:\Users\<my username>\AppData\Local\Temp\build1872331821301160683.tmp\Print.cpp.o D:\ENERGIA\HARDWARE\TOOLS\LM4F\BIN\arm-none-eabi-ar rcs C:\Users\<my username>\AppData\Local\Temp\build1872331821301160683.tmp\core.a C:\Users\<my username>\AppData\Local\Temp\build1872331821301160683.tmp\Stream.cpp.o D:\ENERGIA\HARDWARE\TOOLS\LM4F\BIN\arm-none-eabi-ar rcs C:\Users\<my username>\AppData\Local\Temp\build1872331821301160683.tmp\core.a C:\Users\<my username>\AppData\Local\Temp\build1872331821301160683.tmp\Tone.cpp.o D:\ENERGIA\HARDWARE\TOOLS\LM4F\BIN\arm-none-eabi-ar rcs C:\Users\<my username>\AppData\Local\Temp\build1872331821301160683.tmp\core.a C:\Users\<my username>\AppData\Local\Temp\build1872331821301160683.tmp\WMath.cpp.o D:\ENERGIA\HARDWARE\TOOLS\LM4F\BIN\arm-none-eabi-ar rcs C:\Users\<my username>\AppData\Local\Temp\build1872331821301160683.tmp\core.a C:\Users\<my username>\AppData\Local\Temp\build1872331821301160683.tmp\WString.cpp.o D:\ENERGIA\HARDWARE\TOOLS\LM4F\BIN\arm-none-eabi-g++ -Os -nostartfiles -nostdlib -Wl,--gc-sections -T D:\Energia\hardware\lm4f\cores\lm4f\lm4fcpp.ld --entry=ResetISR -mthumb -mcpu=cortex-m4 -mfloat-abi=hard -mfpu=fpv4-sp-d16 -fsingle-precision-constant -o C:\Users\<my username>\AppData\Local\Temp\build1872331821301160683.tmp\sketch_jun01b.cpp.elf C:\Users\<my username>\AppData\Local\Temp\build1872331821301160683.tmp\sketch_jun01b.cpp.o C:\Users\<my username>\AppData\Local\Temp\build1872331821301160683.tmp\core.a -LC:\Users\<my username>\AppData\Local\Temp\build1872331821301160683.tmp -lc -lm -lgcc d:/energia/hardware/tools/lm4f/bin/../lib/gcc/arm-none-eabi/4.7.1/../../../../arm-none-eabi/lib/thumb/armv7e-m/fpu/fpv4-sp-d16\libm.a(lib_a-w_sqrt.o): In function `sqrt': C:\MinGW\msys\1.0\home\a0273864\yagarto\newlib-build\arm-none-eabi\thumb\armv7e-m\fpu\fpv4-sp-d16\newlib\libm\math/../../../../../../../../../newlib-1.20.0/newlib/libm/math/w_sqrt.c:83: undefined reference to `__errno' C:\MinGW\msys\1.0\home\a0273864\yagarto\newlib-build\arm-none-eabi\thumb\armv7e-m\fpu\fpv4-sp-d16\newlib\libm\math/../../../../../../../../../newlib-1.20.0/newlib/libm/math/w_sqrt.c:86: undefined reference to `__errno' collect2.exe: error: ld returned 1 exit status (JSYK, I have Energia on D:/, an external drive.) Does anyone know how to fix this? I did a little digging around the interwebs and saw some stuff on compiler options having to do with some "ld" but I couldn't figure out how that would help me fix it. Any help would be awesome! Thanks, fughilli
  9. Well, after much deliberation and a while reading through documentation on C++ templates, I've (more or less) fixed my own problem. Instead of allocating memory dynamically, I've opted for a statically allocated Smoother instance using a template argument. The new library is attached below. Any further suggestions would be greatly appreciated! Smoother.zip
  10. fughilli

    Servo Library

    Hey Rickysinho! I had the same question about two days ago, and I found a couple on this forum available for download. However, I didn't spot one that matched the layout of the official Arduino servo library, so I've modified one that I got from here (eigendreams' library, github here: https://github.com/eigendreams/stellaris_energia_libs) to be a drop-in substitute. Go ahead and use that one for now; it works well as-is. I'm gonna keep tinkering with my library and see if I can't release it here sometime soon.
  11. Hello everyone, I've written a small library for smoothing raw data by averaging collected values over a set history, and to accomplish this in a portable way I made the "Smoother" class a template. There is an array of the generic T type that starts as a private pointer and is then allocated as an array using the "new" keyword of a size specified by the user. Everything works fine and dandy on codepad.org, so I assumed I could just plop it down verbatim onto the Stellaris Launchpad. Unfortunately, the sample program I've written does not work as expected; instead, the analogRead() function spits out a bunch of gibberish values. I figured this is some kind of memory allocation error, but it could be something completely different, so could anyone take a look at the source and maybe diagnose the problem/point me in the right direction? Thanks! P.S., I was able to get mixed results by instantiating the "Smoother" with the "SOLVE_ON_PUSH" flag set. Smoother.zip
×