Jump to content


  • Content Count

  • Joined

  • Last visited

  • Days Won


Everything posted by Rickta59

  1. @yyrkoon that adafruit library code is using doubles which hauls in all the floating point libs. That is causing your bloat. How did you determine that this code would be smaller with CCS? -rick
  2. If there is a popular Arduino library that already has similar functionality, you might consider using it. Then it is just a matter of using their classes and documentation as starting point for your msp430 implementation. This will make it easier for people to use on both Energia and Arduino and any other Wiring based framework. The bonus for you, is that you will have to do less work if they have already documented how it works. -rick
  3. It would be interesting to see your code. With Energia by default you get a lot of functionality for "free". However, free isn't free is it. The easiest way to figure out the Energia "bloat" is the compile the "Bare Bones Script" and look at the resulting elf file. However, your real code size depends on which features you use. I think we have probably spent more time thinking about code size than the Arduino people, this post details it http://forum.43oh.com/topic/2203-memory-footprint-with-a-thermometer-example-on-energia/?p=19228 In Energia, we do use all of gcc's optimization feat
  4. A simple smoke test, to verify all is good with your hardware setup, is to use the sample programs provided by TI. At least you know they might work providing you setup the hardware as directed in their samples. Beyond that you haven't told us about your hardware? What does your hardware setup look like? What size pull up resistors are you using? How long are your wires? Have you verified that when started the voltage is pulled up on the signals? -rick
  5. I've found very few problems with msp430-gcc 4.6.3. What specific problem are you finding? -rick
  6. I've been playing around with one of those LPC1114 28 pin dip chips. I'm running it on a breadboard using the internal 12MHz clock to drive the PLL clock. Using lpc21isp and an FTDI breakout board makes it a really low cost cortex-m0 development setup. When you setup the PLL, it has to be an integer multiple of the clock. If you use the internal clock as the source, that means a number less than 50MHz so we end up maxing out at 48MHz. However, if you tweak the IRCCTL value, you can get it to achieve 50MHz. The snippet below shows you how I changed my clock from 47.962 to 50.001: void outp
  7. When I started contributing to the Energia project this is the kind of end result I envisioned. Many users building on a common platform and everyone benefiting. I'm happy you were able to get this going. One less thing I will have to write for myself! Thanks for sharing! -rick
  8. @spirilis, I bet that device makes it a lot easier to debug spi stuff. Thanks for taking a snapshot! The patch above seems to have solved the issue Rei Vilo was having. -rick
  9. /** * spi_send() - send a byte and recv response */ uint8_t spi_send(const uint8_t _data) { UCB0TXBUF = _data; // setting TXBUF clears the TXIFG flag while (UCB0STAT & UCBUSY) ; // wait for SPI TX/RX to finish return UCB0RXBUF; // reading clears RXIFG flag } Try that in usci_spi.cpp
  10. Energia does ship with the command line program called msp430-gdb which can be used to attach to mspdebug in gdb mode. You can use that to debug your code. Granted, it isn't a GUI based tool but it works great. This is one of the big advantages the Energia + Launchpad combo has over the Arduino. Our hardware debugger is included in $4.30. On the Arduino, if you purchased an avrdragon debugger, it would set you back about $50. -rick
  11. A good purchase to make before starting all this is a usb hub. If you do inadvertently connect the wrong wires you will probably lose the hub or one of its ports before you fry your onboard usb port.
  12. Another guy from Bahston here now in NC. However, I have to disagree with regard to the easy to understand accents. I often have to try and interact with Harkers Islanders. They make a Boston accent seem understandable. Anyways, welcome to the forums. -rickta
  13. Do you have a logic analyzer or a scope?
  14. Are you using the latest energia?
  15. Maybe try a different computer or a different launchpad board, or a different chip. -rick
  16. Did you try the serial console of Energia? Did you try some different baud rates? How about just trying to print a char array Serial.println("Hello world!\r\n");
  17. Do you have hyperterminal configured for 9600 8-N-1?
  18. You might try and disconnect the RX/TX jumpers from J3. Pin 3 and 4 are the serial UART pins. They may be adversely affecting you. ... wait ... you are using the Serial port and then trying to use those as switches? ... wait ... Try and use Serial.begin only once. You have it in a loop. This page illustrates pins with special usage: https://github.com/energia/Energia/wiki/Hardware#wiki-LaunchPad_MSP430G2553 -rick
  19. Yes, it was that code. I did get it to work. I also changed the SPI clock. To get it to work at all at 800kHz I had to change one of the transmitted bytes. I don't remember. I either added or got rid of one of the high bits. Maybe my DCO clock was tweaked a different direction than yours. -rick
  20. You might want to store them as GRB instead of RGB as that is what the chip wants. Using a Timer, that triggers every 1.25usec would allow you to set the next wave form. Even with ISR overhead, running at 80MHz should hide all sins. There are some bit bang msp430asm routines that I know work over on 43oh.com in the code vault. The timing in those routines uses Zero(.25usec/1.0usec) and (One).60/.65usec with a (reset) 50usec. There is another implementation that uses SPI. I was able to get those routines to work at 400kHz. However, the 800kHz didn't seem to work reliably with the 430.
  21. I wrote a post a while back describing how I dealt with ISR routines using a simple macro with gnu asm here: http://forum.43oh.com/topic/2415-example-of-gnu-msp430-assembler-isr-handler/ -rick
  22. So the key to what I was saying is that Energia sketches are really C++ files. That means functions compiled with g++ will end up with different names than functions compiled with gcc. Look up C++ name mangling on the web. The way to force Energia to compile your C functions without name mangling is to create a new tab and call it "something.c". In the example below I created two new tabs, "timer_blink.c" which has the interrupt implementation, and "timer_blink.h" which has the declaration of those functions. I put some special sauce ( the ifdef __cplusplpus ) around the header to use 'extern
  23. Do a project clean then try using the "File/Export..." menu item. Export as an archive file and see what it puts in the zip. You can safely delete the Debug directory or just exclude it using the checkboxes in the export dialog. The files in that list should give you a good idea of what is needed by someone else to be able to build from scratch inside of CCS (eclipse really) -rick
  24. Using Energia, you don't supply the main(). One just implements a setup() and loop() function. The startup.c and main.c are provided automatically by the ide when you press Verify. Look at this introduction to Arduino style programming. http://arduino.cc/en/Tutorial/BareMinimum When you compile an '.ino' file it is compiled with arm-none-eabi-g++, that means your void Timer0IntHandler() gets C++ name managling which is the reason your link phase is failing. You could add extern "C" void Timer0IntHandler() to get C calling conventions however, Energia programs aren't meant to compile the
  • Create New...