Jump to content
43oh

brainwash

Members
  • Content Count

    32
  • Joined

  • Last visited

  • Days Won

    2

Everything posted by brainwash

  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 applic
  2. 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 re
  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 hav
  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 tim
  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
  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\launch
  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 an
  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 toolc
  16. Hey, nice project, I was looking for a JTAG-capable project. Not to rain on your parade but it could probably be done as cubeberg mentioned with xmodem and TFTP and FTDI cable. I've yet to met a router that does not have that pins somewhere as they are heavily used even after the C-sample (production) boards are out but the firmware is not yet finished. The only issue is knowing how to exit the autoboot mode right at the beginning. Usually pressing ESC/enter/space/backspace a few times does the trick and puts you into firmware upload mode. This is not even limited to routers, it ranges from
  17. Just thought I posted my long-time pending project - a replacement chip solution for the Senseo coffee pad machine. It's not 'in production' yet, will do so in the following days, just a bit nervous about playing with line voltages. The machine uses/used a capacitive divider instead of a small transformer, which means that most of the stuff is at line potential with reference to earth. Original voltage regulation is done by clamping 220V through a 5V zener. It has been thoroughly tested on the breadboard so it should work once installed. Hardware - mostly stock, I'm just putting in the MS
  18. Just remember to add the line HWREG(TIMER0_BASE + TIMER_O_TAMR) |= (TIMER_TAMR_TAMRSU | TIMER_TAMR_TAPLO | TIMER_TAMR_TAILD); if you bump into problems. It is in the comments section of that blog post.
  19. Just a suggestion, perhaps Energia should also have a Code Vault. This is because most of the working code samples (like above) get lost in the myriad of questions that is on this sub-forum. Or maybe invent some kind of a rule like prefixing the thread titles with [Q], [ code], ... Edit: now that I think more, a nice code should be commited to Energia.
  20. Just as a suggestion for anyone else trying this, I've done the same project years ago using a 16F PIC, leds as light detectors and L293/SN754410 as motor driver. I think that's the most minimalistic setup you can have and it can mostly be done single-side. It relies on the fact that the LED capacitance decreases(?) with increasing light incidence. I will have to try some day to implement the same using the stellaris, the only hardware required would be the LEDs and of course the motor driver board, but with the power remaining in the board one would be able to do temperature, luminosity and
  21. Very simple code to get the AD9850 [ebay] module up and running. I will use Energia whenever possible because it results in more portable code. /* Using the AD9850 DDS ebay module with Stellaris Launchpad. Code based on http://nr8o.dhlpilotcentral.com/?p=83 and https://gist.github.com/raivisr/3861473 PA2 - W_CLK PA3 - FQ_UD PA4 - DATA PB6 - RESET VCC - VCC (5V can also be used but will dissipate more heat) GND - GND Serial comms - 9600, NewLine (0x0A) denotes end of input, f 10000 - set frequency s 20 20000 10 1000 - sweep from frequency to frequency using this step size in
  22. Just to get back on topic, is there any way to write "Energia" code within CCS? I've used Eclipse for the past 7 years or so and the Energia IDE seems very limited. I expect to be something like: set up the includes for the GCC (or cl430?) to point to the "energia/hardware/cores/msp430", the "variants/launchpad" folder and then setting up some board/cpu defines. I am not at all skilled at c/cpp so I don't know exactly where to look. The end purpose would be to have autocomplete and debugging activated within Eclipse, not just to use it as a basic notepad. I like the dumbed down version
  23. Thank you. I didn't know it was supposed to be in a .cpp file. Now at least it compiles so if I find any runtime problems with CCS I will report them here. I only know Java well and a tiny bit of C, so this is a bit steep to me, but it's a much better abstraction than having to bit juggling, even if you manage abstract a lot of the math.
  24. Sorry to be such a noob, but I don't know how to get this to work: "C:/ti/ccsv5/tools/compiler/msp430_4.1.4/bin/cl430" -vmsp --abi=eabi -g --include_path="C:/ti/ccsv5/ccs_base/msp430/include" --include_path="C:/ti/ccsv5/tools/compiler/msp430_4.1.4/include" --advice:power=all --define=__MSP430G2553__ --diag_warning=225 --display_error_number --diag_wrap=off --printf_support=minimal --preproc_with_compile --preproc_dependency="blink.pp" "../blink.c" "..\gpio.h", line 80: error #78-D: this declaration has no storage class or type specifier "..\gpio.h", line 80: error #66: expected a
  25. I noticed that the function definition in gpio.c has an assert added in front of it, so I decided that for fast IO I needed to call HWREG directly. However, further digging showed up that ASSERT is macro in debug.h that's only enabled if the #DEBUG directive is set. Does anybody know if by default the directive is set? Perhaps when using the default debug build it is set? I cannot find this information anywhere. The reason is that I want to keep the code abstract enough (like stellarisware aims to do) without adding unnecessary hardware references. What's the impact on the IO speed of keepin
×
×
  • Create New...