Jump to content

brainwash

Members
  • Content Count

    32
  • Joined

  • Last visited

  • Days Won

    2

brainwash last won the day on July 6 2013

brainwash had the most liked content!

About brainwash

  • Rank
    Advanced Member
  1. I don't know how relevant this is but TI has brought mspgcc support to their IDE: http://www.ti.com/tool/msp430-3p-gcc-mspgcc-tpde While it's still not a clean Eclipse installation it allows usage of GCC code and probably easy Energia integration. Also: http://e2e.ti.com/blogs_/b/msp430blog/archive/2013/12/09/you-beta-believe-it-gcc-and-ccsv6.aspx If an IDE is what you are looking for, GCC is now integrated in the recent BETA release of Code Composer Studio 6 as well. This means that if the size and speed and optimization support offered by the TI compiler are unnecessary for your application, you can choose to compile with GCC and use Code Composer Studio for free, without any code size limitation!
  2. brainwash

    RF bootloader

    I'm trying to build a home automation system and would like to be able to update the firmware on the nodes remotely via the NRF24L (SPI) module. Either that or go with an embedded scripted language but I don't know anything that would fit into an MSP430G (eLua, Python, TinyBasic) that's why I would rather go with the remote bootloader approach. Or are there any other ways to implement a simple scripted language? Something like: if (ADC(P1.4)>20) then (P1.5=1). I could always use a Stellaris and load everything into RAM but I'm trying to go with the lowest-end solution.
  3. See my posts starting with #9: http://forum.43oh.com/topic/3901-energia-framework-on-eclipse/ I want to make it into a standalone project template that can be imported in Eclipse and requires only project properties (env vars) to be set. CCS5 is actually Eclipse, just with some changes and limitations. For all intents and purposes Eclipse CDC is what you want.
  4. I'm in the process of building a dual lab power supply with and the Stellaris should provide monitoring and protection shutdown. I've ported the Adafruit LCD library to Energia LM4F (it should be easy to port to MSP430 as well) so I'm using that to display stuff in graphical format. The code below does a few tricks that might be useful for some of you: a rolling buffer to hold the data, automatic vertical scaling between the minimum and maximum values. As always, any kind of feedback is appreciated, I'm still a beginner. A picture is worth a thousand words. I only have 5 points of resolution in this picture but the vertical scale is actually 20 points.
  5. Since I haven't been able to find a library for the LCD 5110 that supports graphics as well I decided to port the arduino library. It turned out to be take much less time than I thought it would, considering my very limited C/C++ experience. Most of the time was spent rewriting the fast software SPI routine: inline void Adafruit_PCD8544::fastSPIwrite(uint8_t d) { for(uint8_t bit = 0x80; bit; bit >>= 1) { ROM_GPIOPinWrite(mosiport, mosipinmask, d&bit ? mosipinmask : 0); ROM_GPIOPinWrite(clkport, clkpinmask, clkpinmask); ROM_GPIOPinWrite(clkport, clkpinmask, 0); } } I haven't tested everything but the example (also included in the zip) works. There are still avr includes in the GFX libraries but it seems to work. Maybe someone can clean up and package a nice library. Adafruit_PCD8544.zip
  6. Win8 64bit I'm sure this has been discussed before but I cannot find the topic. One board I can program correctly with Energia or CCS, the other one I can only program through LMFlasher or CCS. Energia is saying something about PID:VID not found. I've tried everything that is humanely possible: uninstalling drivers, changing com port (com port works fine though), installing libusb and then changing back to stellaris icdi, using different usb port or hub. I'm sure there must be a way to delete some entry from the registry but otherwise I have absolutely no idea why one board works all the time with the lm4flash included with the arm-gcc and the other one never.
  7. Solved it (not really) by changing the pins. It seems that all the 10 or so configurations I've tried were wrong. With this pinout it works: Enrf24 radio(PE_1, PE_2, PE_3); // CE,PSN,IRQ One of these is the culprit: PB6 is also MISO(2) PD6 is also RX(2) PA3 is also CS(0) Maybe someone can explain to me what's wrong but I'm just glad this is over and when I get over it I will do some more testing to see what pins should not be used.
  8. I cannot get the module to talk reliably to Stellaris: En
  9. Outputting the display[] on serial shows this: " 32x7 . xC" where x is some strange character. Moving the display[] declaration inside the loop solves the problem showing the correct string " 32.5?C".
  10. The display[] array loses somehow the characters that are not updated. Instead of " 32.4*C" I get " 32". Uncommenting the lines at the bottom 'fixes' part of the stuff, but still something is displayed wrong (the comma symbol gets extra junk at the bottom). Setting the backlight variable to true at initialization time changes the display to " 32x4" where 'x' is some random junk character. Either I'm doing something wrong or the compiler has a bug. I suppose since most of this code is in the Energia repository (but only for 430) it should work.
  11. For debugging, you need to start mspdebug in gdb mode. On windows you can do this: mspdebug.exe tilib -j -d USB "gdb" The parameters for a debugging session: GDB Hardware debugging Standard GDB Hardware Debugging Launcher (not DSF) Command set: standard (windows), Protocol: mi That should be just about everything required. I don't know how to sync the source files with the binary, I get messages like "No source available for "analogRead() "" but I can see the stack just fine. Breakpoints also seem to work. Perhaps I'll try the same things using xpg's Eclipse plugin, it should take some tedium off the steps. I just haven't manage to get it working with Energia.
  12. I added the "hex" target to the included Makefile and also some small modifications. The "all" target also compiles the hex file. Added my name and a new version number there to avoid confusion with the original attachment. Window/Preferences search for "File Types" and add .ino as C++ source file. I added another environment variable called ENERGIADOSDIR=c:\Programs\energia-0101E0009. This is because Eclipse cannot recognize MinGW paths, AFAIK. Go to project properties, C/C++ General, Paths and symbols and add the following items: ${ENERGIADOSDIR}\hardware\msp430\variants\launchpad ${ENERGIADOSDIR}\hardware\msp430\cores\msp430\Arduino.h ${ENERGIADOSDIR}\hardware\msp430\cores\msp430\ Make sure your '.ino' files have the following include: #include <Energia.h> After these steps your autocomplete should work in Eclipse. I appended ....\energia-0101E0009\hardware\tools\msp430\mspdebug to the existing PATH variable, perhaps there is some way to do this better. This is needed in order for the "upload" target to work. The Makefile now treats Windows and *unix machines differently because at least on my machine the mspdebug is not listing any USB devices in its default configuration. Anyway it is recommended to use the 'tilib' option. Next stop would be debugging, if I'm able to figure it out. Sorry if I did some stupid things, I have zero programming experience with C++ and makefiles. Edit: I don't know why the stupid uploader won't let me upload almost any file extension. Security through obscurity. Makefile.txt
  13. Just a question, were you able to debug using the Launchpad as is or by a 3rd party tool (FET, ezMSP, ...)?
  14. I've started installing the tools and everything on Eclipse and Win8 and here's the initial guide for beginners like me: - install Eclipse Juno CDT or you can add the CDT/gcc/C++ stuff into your existing Java Eclipse (like I did) - install MingW and add it to the environment path (c:\MinGW\bin\). Required for make - [optional] create a new workspace (I used the existing one) and copy your old energia sketch folder into the workspace - find the energia.mk in a post above, copy it to your project folder, rename it to Makefile - run the eclipse wizard to create a new project from makefile and specify the project/sketch folder The "Problems" tab should show that gcc and g++ are not found. - rightclick on project properties, C/C++ build, Discovery options and rename gcc with msp430-gcc and g++ with msp430-g++ - on the environment tab append the ..energia\hardware\tools\msp430\bin\ folder to PATH; this is msp430, adjust for stellaris The "Problems" tab should not show zero errors now. Right click, project properties, C/C++ build, Environment: add the ENERGIADIR variable !VERY IMPORTANT! replace c:\ with /c/ and backslashes with slashes. It should point to your energia installation folder. Open the Make targets view and add "all", "boards" and "clean" targets while leaving everything in place. Double-click on "boards" and you should have the output in the console. make boards Available values for BOARD: lpmsp430g2231 LaunchPad w/ msp430g2231 (1MHz) lpmsp430g2231f LaunchPad w/ msp430g2231 (16MHz) lpmsp430g2452 LaunchPad w/ msp430g2452 (16MHz) lpmsp430g2553 LaunchPad w/ msp430g2553 (16MHz) lpmsp430fr5739 FraunchPad w/ msp430fr5739 Add the ENERGIABOARD env variable (e.g. lpmsp430g2231f) to the project. Do a clean build and then "all" and the project should compile to an .elf file. It's late and I don't have any more time today but the objcopy command is missing, it should compile to a .hex file. I haven't tried debugging and uploading, maybe someone can continue the 'tutorial'.
  15. I'm a little late to the party but I would venture to say that he did it this way because the article is a comparison on Arduino-style boards with Arduino code (check the sources). For Arduino Due and Maple board the SerialUSB configuration was used, as well as for LM4F120. AFAIK, for the Stellaris the Energia hardware serial implementation does not make use of advanced features. See hardware\lm4f\cores\lm4f\HardwareSerial.cpp. This is why I'm pushing towards Energia since it unifies all these different platforms and allows better collaboration and easy entry. Even though I like TIs toolchain I have the impression that for most hobbyists it's a moving target. If you buy a fairly popular module you can get try a sketch and maybe it will work in 5 minutes with minimal modifications or you might have to spend the time to look into the datasheet for both the uC and the module and write everything from scratch in a day/week. Sorry for ranting but this double effort always annoys me and I come from a PIC background (triple effort then, nothing like AVR or ARM).
×
×
  • Create New...