Jump to content
43oh

AndyD273

Members
  • Content Count

    5
  • Joined

  • Last visited

Posts posted by AndyD273

  1.  

    I've included a compiled version of this so you can just load it on the msp430g2231 launchpad.

    Use the mspdebug command to load it (Find mspdebug.exe someplace in the Energia install tree on your hard disk)

     

    C:\ mspdebug rf2500 "prog andyd273.hex"

     

    rename this file to andyd273.hex

    attachicon.gifandyd273.txt

     

     

    That is awesome, thanks!

    I had to use tilib instead of rf2500, but after that it seemed to work. Weirdly the first few times that I unplugged the board and plugged it back in the program seemed to get lost. Then the 4th or 5th time I loaded the program it seemed to stick. 

     

    I'll probably pick up a handful of those arduino clones, and maybe a few of the atmega chips so I can just program them and use them without the board, I've just had this board laying around so long that I really wanted to see it given a use.

  2. My project is this:

     

    Wait for a button push. Turn on a relay for 10 seconds. Turn off the relay. Wait for the next button push.

     

    on the arduino it is essentially:

     

    loop(){

      if(button == HIGH){

        writeout(relay, HIGH);

        delay(10000);

        writeout(relay, LOW);

      }

    }

     

    In code composer it seems a lot more complicated. I think that's why I've never done anything with the MSP430 in the 8+ years I've had it.

  3. First problem you have the wrong board selected:

     

     

     

     

    Second problem ... Energia is not going to work smoothly with the msp430g2231 chip even when you do select the right board. Energia is too bloated to work well on a chip with only 2k of flash and 128bytes of ram, and no real uart and a single timer. You are wasting your time trying to learn with this chip if your goal is to do Arduino stuff.

     

    Unfortunately that's the only G chip listed. 

    I tried adding the MSP430G2231 to the boards.txt with some stuff I found on GitHub, but apparently I didn't do that right:

     

    boards.txt  

    #MSP-EXP430G2231
     
    MSP-EXP430G2231LP.vid.0=0x2341
    MSP-EXP430G2231LP.pid.0=0x0c9f
     
    MSP-EXP430G2231LP.name=MSP-EXP430G2 w/ MSP430G2231
     
    MSP-EXP430G2231LP.build.mcu=msp430g2231
    MSP-EXP430G2231LP.build.f_cpu=1000000L
    MSP-EXP430G2231LP.build.core=msp430
    MSP-EXP430G2231LP.build.variant=MSP-EXP430G2
    MSP-EXP430G2231LP.build.board=MSP_EXP430G2231LP
     
    MSP-EXP430G2231LP.upload.tool=mspdebug
    MSP-EXP430G2231LP.upload.protocol=tilib
    MSP-EXP430G2231LP.upload.maximum_size=2048
    MSP-EXP430G2231LP.upload.maximum_data_size=256

     

     

    When I try to run it I get this error:

     

     

    Energia: 1.6.10E18 (Windows 10), Board: "MSP-EXP430G2 w/ MSP430G2231"

     
    C:\Users\andy\Desktop\energia-1.6.10E18\arduino-builder -dump-prefs -logger=machine -hardware "C:\Users\andy\Desktop\energia-1.6.10E18\hardware" -tools "C:\Users\andy\Desktop\energia-1.6.10E18\tools-builder" -tools "C:\Users\andy\Desktop\energia-1.6.10E18\hardware\tools\msp430" -built-in-libraries "C:\Users\andy\Desktop\energia-1.6.10E18\libraries" -libraries "C:\Users\andy\Documents\Energia\libraries" -fqbn=energia:msp430:MSP-EXP430G2231LP -ide-version=10610 -build-path "C:\Users\andy\AppData\Local\Temp\build75ed397880e43e5832dfe04a926c3554.tmp" -warnings=none -prefs=build.warn_data_percentage=75 -verbose "C:\Users\andy\Documents\Energia\blink\blink.ino"
    C:\Users\andy\Desktop\energia-1.6.10E18\arduino-builder -compile -logger=machine -hardware "C:\Users\andy\Desktop\energia-1.6.10E18\hardware" -tools "C:\Users\andy\Desktop\energia-1.6.10E18\tools-builder" -tools "C:\Users\andy\Desktop\energia-1.6.10E18\hardware\tools\msp430" -built-in-libraries "C:\Users\andy\Desktop\energia-1.6.10E18\libraries" -libraries "C:\Users\andy\Documents\Energia\libraries" -fqbn=energia:msp430:MSP-EXP430G2231LP -ide-version=10610 -build-path "C:\Users\andy\AppData\Local\Temp\build75ed397880e43e5832dfe04a926c3554.tmp" -warnings=none -prefs=build.warn_data_percentage=75 -verbose "C:\Users\andy\Documents\Energia\blink\blink.ino"
    Using board 'MSP-EXP430G2231LP' from platform in folder: C:\Users\andy\Desktop\energia-1.6.10E18\hardware\energia\msp430
    Using core 'msp430' from platform in folder: C:\Users\andy\Desktop\energia-1.6.10E18\hardware\energia\msp430
    Detecting libraries used...
    "C:\Users\andy\Desktop\energia-1.6.10E18\hardware\tools\msp430/bin/msp430-g++" -c -g -O2  -w -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics  -w -x c++ -E -CC -mmcu=msp430g2231 -DF_CPU=1000000L -DARDUINO=10610 -DENERGIA=10610 -DENERGIA_MSP_EXP430G2231LP -DENERGIA_ARCH_MSP430 -IC:\Users\andy\Desktop\energia-1.6.10E18\hardware\tools\msp430/include  "-IC:\Users\andy\Desktop\energia-1.6.10E18\hardware\energia\msp430\cores\msp430" "-IC:\Users\andy\Desktop\energia-1.6.10E18\hardware\energia\msp430\variants\MSP-EXP430G2" "C:\Users\andy\AppData\Local\Temp\build75ed397880e43e5832dfe04a926c3554.tmp\sketch\blink.ino.cpp" -o "nul"
    "C:\Users\andy\Desktop\energia-1.6.10E18\hardware\tools\msp430/bin/msp430-g++" -c -g -O2  -w -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics  -w -x c++ -E -CC -mmcu=msp430g2231 -DF_CPU=1000000L -DARDUINO=10610 -DENERGIA=10610 -DENERGIA_MSP_EXP430G2231LP -DENERGIA_ARCH_MSP430 -IC:\Users\andy\Desktop\energia-1.6.10E18\hardware\tools\msp430/include  "-IC:\Users\andy\Desktop\energia-1.6.10E18\hardware\energia\msp430\cores\msp430" "-IC:\Users\andy\Desktop\energia-1.6.10E18\hardware\energia\msp430\variants\MSP-EXP430G2" "C:\Users\andy\AppData\Local\Temp\build75ed397880e43e5832dfe04a926c3554.tmp\sketch\blink.ino.cpp" -o "nul"
    Generating function prototypes...
    "C:\Users\andy\Desktop\energia-1.6.10E18\hardware\tools\msp430/bin/msp430-g++" -c -g -O2  -w -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics  -w -x c++ -E -CC -mmcu=msp430g2231 -DF_CPU=1000000L -DARDUINO=10610 -DENERGIA=10610 -DENERGIA_MSP_EXP430G2231LP -DENERGIA_ARCH_MSP430 -IC:\Users\andy\Desktop\energia-1.6.10E18\hardware\tools\msp430/include  "-IC:\Users\andy\Desktop\energia-1.6.10E18\hardware\energia\msp430\cores\msp430" "-IC:\Users\andy\Desktop\energia-1.6.10E18\hardware\energia\msp430\variants\MSP-EXP430G2" "C:\Users\andy\AppData\Local\Temp\build75ed397880e43e5832dfe04a926c3554.tmp\sketch\blink.ino.cpp" -o "C:\Users\andy\AppData\Local\Temp\build75ed397880e43e5832dfe04a926c3554.tmp\preproc\ctags_target_for_gcc_minus_e.cpp"
    "C:\Users\andy\Desktop\energia-1.6.10E18\tools-builder\ctags\5.8-arduino10/ctags" -u --language-force=c++ -f - --c++-kinds=svpf --fields=KSTtzns --line-directives "C:\Users\andy\AppData\Local\Temp\build75ed397880e43e5832dfe04a926c3554.tmp\preproc\ctags_target_for_gcc_minus_e.cpp"
    Compiling sketch...
    "C:\Users\andy\Desktop\energia-1.6.10E18\hardware\tools\msp430/bin/msp430-g++" -c -g -O2  -w -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -MMD -mmcu=msp430g2231 -DF_CPU=1000000L -DARDUINO=10610 -DENERGIA=10610 -DENERGIA_MSP_EXP430G2231LP -DENERGIA_ARCH_MSP430 -IC:\Users\andy\Desktop\energia-1.6.10E18\hardware\tools\msp430/include  "-IC:\Users\andy\Desktop\energia-1.6.10E18\hardware\energia\msp430\cores\msp430" "-IC:\Users\andy\Desktop\energia-1.6.10E18\hardware\energia\msp430\variants\MSP-EXP430G2" "C:\Users\andy\AppData\Local\Temp\build75ed397880e43e5832dfe04a926c3554.tmp\sketch\blink.ino.cpp" -o "C:\Users\andy\AppData\Local\Temp\build75ed397880e43e5832dfe04a926c3554.tmp\sketch\blink.ino.cpp.o"
    Compiling libraries...
    Compiling core...
    open C:\Users\andy\Desktop\energia-1.6.10E18\hardware\energia\msp430\variants\MSP-EXP430G2: The system cannot find the file specified.
    Error compiling for board MSP-EXP430G2 w/ MSP430G2231.

     

     

    Lastly, I have an Arduino Uno which I started my project on and got it working, but I want to turn it into an embedded project and so was hoping to use this little board in place of the Uno so I can use that for other things. 

    The project is super simple, and isn't much more complicated than this blink example.

    If I have to I'll learn how to do it with code composer, but it would be cool if I didn't have to start over from scratch.

  4. I'm trying to get my MSP430 working with Energia.

     

    I was getting an error saying it couldn't find the board. 

    Then I found this work around: http://forum.43oh.com/topic/9848-energia-1610r18-windows-7-launchpad-msp430g2553-dont-load-sketch/?p=74156

     

    and now it can find the board, but I'm getting a new error:

     

    Energia: 1.6.10E18 (Windows 10), Board: "MSP-EXP430G2553LP"
     
    Build options changed, rebuilding all
     
    Sketch uses 760 bytes (4%) of program storage space. Maximum is 16,384 bytes.
    Global variables use 20 bytes (3%) of dynamic memory, leaving 492 bytes for local variables. Maximum is 512 bytes.
    C:\Users\andy\Desktop\energia-1.6.10E18\hardware\tools\msp430/bin/mspdebug tilib --force-reset prog C:\Users\andy\AppData\Local\Temp\build75ed397880e43e5832dfe04a926c3554.tmp/blink.ino.hex 
    MSPDebug version 0.22 - debugging tool for MSP430 MCUs
    Copyright © 2009-2013 Daniel Beer <dlbeer@gmail.com>
    This is free software; see the source for copying conditions.  There is NO
    warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
     
    MSP430_GetNumberOfUsbIfs
    MSP430_GetNameOfUsbIf
    Found FET: HID0016:COM5
    MSP430_Initialize: HID0016:COM5
    Firmware version is 20409001
    MSP430_VCC: 3000 mV
    MSP430_OpenDevice
    MSP430_GetFoundDevice
    Device: F20x2_G2x2x_G2x3x (id = 0x0035)
    2 breakpoints available
    MSP430_EEM_Init
    Chip ID data: f2 01 02
    Erasing...
    Programming...
    Writing  842 bytes at c000...
    tilib: MSP430_Memory: Could not write device memory (error = 7)
    MSP430_Run
    ihex: error on line 55
    MSP430_Close
    tilib: MSP430_Run: Could not run device (to breakpoint) (error = 17)
    tilib: MSP430_Run: Could not run device (to breakpoint) (error = 17)
     

     

     

    I'm just trying to upload an unmodified blink example program. 

    From what I can tell, the problem is the line that says "Writing  842 bytes at c000..." because that is outside of the device memory range.

     

    I don't know if there's a way to work around this, but I'm hopeful.

     

×
×
  • Create New...