fulltimenoob 0 Posted July 27, 2014 Share Posted July 27, 2014 I've compiled the demo application qs-rgb, but it doesn't work on my launchpad. To compile, I used "make", the compiler is arm-none-eabi-gcc. It compiles without problems, but when I flash the launchpad (using lm4flash), the LEDs stay off. When I flash the precompiled binary, everything is working as expected. Does anyone have an idea why the self-compiled binary doesn't work? I am completely new to C and microcontrollers, having only programmed in higher languages so far. Quote Link to post Share on other sites
Pradeepa 1 Posted July 28, 2014 Share Posted July 28, 2014 Hello, Based on the post I assume you are using Linux for the developments. Did you try building the project using Code Composer Studio? Are there any errors/warnings in your compilations? What is the command you ran to flash the binary to the firmware? Quote Link to post Share on other sites
fulltimenoob 0 Posted July 28, 2014 Author Share Posted July 28, 2014 Yes, I am using Linux. I did not try Code Composer Studio. The compilation works without errors or warnings. To flash the binary, I use "lm4flash qs-rgb.bin" The blinky and project0 examples worked well after compiling myself (using "make") and flashing to the launchpad. I also modified one of the examples to flash the LED in a specific color when holding one of the buttons, and it works well for the left button, but the right one doesn't do anything. I assume it is a compilation problem, but have no idea why. Quote Link to post Share on other sites
Pradeepa 1 Posted July 28, 2014 Share Posted July 28, 2014 I hope you are compiling the application from "StellarisWare\boards\ek-lm4f120xl\blinky" directory. The blinky and project0 examples worked well after compiling myself (using "make") and flashing to the launchpad. I also modified one of the examples to flash the LED in a specific color when holding one of the buttons, and it works well for the left button, but the right one doesn't do anything.I assume it is a compilation problem, but have no idea why. I believe the button issue is related to some error in your configuration. Cannot say without checking the code. Quote Link to post Share on other sites
Pradeepa 1 Posted July 28, 2014 Share Posted July 28, 2014 Just one thing I observed in the qs-rgb example 'Makefile'. There is a line, CFLAGSgcc=-DTARGET_IS_BLIZZARD_RA2 -DUART_BUFFERED Try commenting that line. Are you using Stellaris launchpad or Tiva launchpad? Quote Link to post Share on other sites
Pradeepa 1 Posted July 28, 2014 Share Posted July 28, 2014 I have tried building and flashing the qs-rgb binary to my Stellaris launchpad. It worked without any issue. Steps, Set up the arm-none-eabi toolchain. I used 'arm-2013.11-24-arm-none-eabi-i686-pc-linux-gnu' toolchain. But any newer versions should ideally work too. Set up the $PATH variable to point to the 'bin' directory of the toolchain. Clone the lm4flash application using 'git clone https://github.com/utzig/lm4tools.git' Build the lm4flash application using 'make' Navigate to 'qs-rgb' project folder in the Stellarisware/boards/ek-lm4f120... Run 'make clean' Run 'make' The binaries will be created in 'gcc' folder. Copy the binaries to the location of 'lm4flash' application folder. Connect the device. Run 'lm4flash qs-rgb.bin' (I hade to use sudo too) This should work without any changes. Quote Link to post Share on other sites
fulltimenoob 0 Posted July 29, 2014 Author Share Posted July 29, 2014 I hope you are compiling the application from "StellarisWare\boards\ek-lm4f120xl\blinky" directory. No, I have a Tiva launchpad; on the box it says "TM4C123G" and "EK-TM4C123GXL". I am therefore compiling in "examples/boards/ek-tm4c123gxl/qs-rgb/". I believe that flashing works correctly, because all applications that I have tested work as expected when I flash the binary initially provided in the package. Only when I compile by myself does the application not work. There is a line, CFLAGSgcc=-DTARGET_IS_BLIZZARD_RA2 -DUART_BUFFERED Try commenting that line. When I do that, I get plenty of compilation errors of undefined references to 'ROM_*' functions. I am using the current version (4.9.1-1) of arm-none-eabi-gcc of the Archlinux distribution, and have also installed the arm-none-eabi-binutils (2.24-1). Quote Link to post Share on other sites
Pradeepa 1 Posted August 1, 2014 Share Posted August 1, 2014 Hello, Just now I tried the whole process on my Tiva-Ware launchpad and I did not get any issue. I tried with toolchains I got from CodeBench (http://www.mentor.com/embedded-software/sourcery-tools/sourcery-codebench/editions/lite-edition/) and also from launchpad.net (https://launchpad.net/gcc-arm-embedded). When I do that, I get plenty of compilation errors of undefined references to 'ROM_*' functions. You do not need to do that. Even with that line it works. I was checking StellarisWare previously. I am using the current version (4.9.1-1) of arm-none-eabi-gcc of the Archlinux distribution, and have also installed the arm-none-eabi-binutils (2.24-1). This might be the issue. Try downloading the toolchains that I used (I added the links to make it easy for you). It may be an issue related to the toolchain. I tried with the archlinux (gcc version 4.9.1 (Arch Repository)) from https://www.archlinux.org/packages/community/x86_64/arm-none-eabi-gcc/ but it did not even compile. It looks like it does not know about -mcpu=cortex-m4. Moreover, the lm4flash version I used is, LM4Flash version 0.1.3 - Flasher for Stellaris Launchpad ICDI boardsCopyright © 2012 Fabio Utzig <fabio@@utzig.net>Copyright © 2012 Peter Stuge <peter@stuge.se> Hope this would solve your issue. -Pradeepa Quote Link to post Share on other sites
rinosh1989 0 Posted December 22, 2014 Share Posted December 22, 2014 I too am facing the same issue. If i compile the stellarisware and load the code, it is still working but for Tivaware I am out of luck. I tried changing my compiler versions still the issue is not solved. ie, I have both stellarisware and Tivaware and have executed make in both. When i execute the command paul@paul:~/Documents/Project/tivaware/examples/boards/dk-tm4c123g/blinky/gcc$ lm4flash blinky.bin Found ICDI device with serial: 0E102CEA ICDI version: 9270 Result -The Controller LED is not blinking.But when I executepaul@paul:~/Documents/Project/stellaris/boards/ek-lm4f120xl/blinky/gcc$ lm4flash blinky.bin Found ICDI device with serial: 0E102CEA ICDI version: 9270Result:- The Controller LED is blinking green.I have seen the same result in both the boards I have ek-lm4f120xl and dk-tm4c123g.Any suggestions?? gcc version 4.9.3 20141119 (release) [ARM/embedded-4_9-branch revision 218278] (GNU Tools for ARM Embedded Processors) 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.