element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • Community Hub
    Community Hub
    • What's New on element14
    • Feedback and Support
    • Benefits of Membership
    • Personal Blogs
    • Members Area
    • Achievement Levels
  • Learn
    Learn
    • Ask an Expert
    • eBooks
    • element14 presents
    • Learning Center
    • Tech Spotlight
    • STEM Academy
    • Webinars, Training and Events
    • Learning Groups
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents Projects
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Avnet & Tria Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • About Us
  • Store
    Store
    • Visit Your Store
    • Choose another store...
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      • Japan
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • Vietnam
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
  • Settings
Arduino
  • Products
  • More
Arduino
Arduino Forum Run Arduino code on MSP430
  • Blog
  • Forum
  • Documents
  • Quiz
  • Events
  • Polls
  • Files
  • Members
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
Join Arduino to participate - click to join for free!
Actions
  • Share
  • More
  • Cancel
Forum Thread Details
  • Replies 16 replies
  • Subscribers 404 subscribers
  • Views 3913 views
  • Users 0 members are here
  • energia
  • msp430
  • arduino
Related

Run Arduino code on MSP430

ntewinkel
ntewinkel over 12 years ago

Hi all,

 

I just found this last night: http://energia.nu (Energia)

 

It's an Arduino style IDE that works with the $4.30 MSP Launchpads. It looks like most of the Arduino libraries have also been ported. So you can take your Arduino sketch and run directly it on the MSP430 (with maybe a few pin reassignments).

 

I'm just trying to get things going here on my Mac today (yes, it runs on Mac - woohoo!).

 

Has anyone else tried this out yet?

 

Cheers,

-Nico

  • Sign in to reply
  • Cancel

Top Replies

  • grahamf72
    grahamf72 over 12 years ago +2
    Hi Nico, I've been using Energia for a few months now. As a development tool, it is much easier to use than CCS, primarily because of the way it hides the low-level register manipulation with a higher…
  • DAB
    DAB over 12 years ago +1
    Hi Nico, I just recently downloaded the software myself. I hope to try it out in the next couple of weeks. I just recieved by Launchpad Educational Boosterpack and I am ancious to see what it can do. So…
  • DAB
    DAB over 12 years ago in reply to ntewinkel +1
    Hi Nico, Yes, the Education Boosterpack is a real bargain at 25 USD. You get a microphone, and amplifier intput, a transducer audio output, a potentiometer, an OLED display, a three axis accellerometer…
  • DAB
    DAB over 12 years ago

    Hi Nico,

     

    I just recently downloaded the software myself.  I hope to try it out in the next couple of weeks.

     

    I just recieved by Launchpad Educational Boosterpack and I am ancious to see what it can do.

     

    So far, it looks like the community is making a good effort to support the 430 line at the hobby level.

     

    I will see if I can get a blog together in the next couple of weeks.

     

    Till then, have fun.

     

    DAB

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • Cancel
  • ntewinkel
    ntewinkel over 12 years ago in reply to DAB

    Hi DAB,

     

    I saw your post about the educational boosterpack in a launchpad roadtest review and did a search - is that the one with the buttons and buzzer on it?

     

    I just finished setting up Energia just now, and it only took maybe 10 minutes (this note is taking me longer to type image), following these instructions: https://github.com/energia/Energia/wiki/Getting-Started

     

    For my Macbook it was just a case of drag and drop the app into my Applications folder, and double click on the installer for a driver (and a reboot).

     

    Then I opened the app, plugged in my Launchpad board, selected the com port and board, and tried the Blink sample. Super easy, super smoothly, works like a charm!

    I love the added touch of them having defined "RED_LED" and "GREEN_LED" to address the board's built-in LEDs.

     

    This definitely means I'll be working with my Launchpad boards more now image

     

    Cheers,

    -Nico

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • mcb1
    mcb1 over 12 years ago in reply to ntewinkel

    Nico

    Thanks for the link.

     

    I like how people are making us 'non-software' persons able to easily use the awesome hardware that is available.

     

    If anyone has any means to make a day longer than 24hours, perhaps they could post the method so that some of us can put all our thoughts into practice.

     

     

    Mark

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • ntewinkel
    ntewinkel over 12 years ago in reply to mcb1

    Hi Mark,

     

    I'm a software person, and I've spent many years programming in C, but some of that hardware dev stuff is just plain nasty! Even if they cleaned it up a bit so it doesn't all look like assembly language, that would be a lot better.

     

    When the hobby stuff is harder work than my dayjob, I lose interest quickly!

     

    I agree, a 25 hour day would be perfect, though to be honest I'd probably use the extra hour to sleep in every day image

     

    Cheers,

    -Nico

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • grahamf72
    grahamf72 over 12 years ago

    Hi Nico,

    I've been using Energia for a few months now. As a development tool, it is much easier to use than CCS, primarily because of the way it hides the low-level register manipulation with a higher level API. This approach does have some drawbacks. Firstly you don't have the same level of control over the hardware, especially clocks, so you won't get the same degree of low power that would be possible with CCS.  Secondly, the libraries come with quite a bit of overhead. Although the compiler & linker are quite good at leaving out unused code, a "do nothing" sketch still runs to about 500 bytes, and even very minimal sketches will run to a bit over 2k, meaning it is of very limited use on the 2231 chips. Also, Energia doesn't provide an interactive debugger as in CCS, so debugging is a little trickier also.

     

    But I believe the benefits of Energia will far outweigh these minor drawbacks in many situations. The Arduino compatibility isn't perfect but is quite good, so it gives access to a large pool of libraries and example code, making development much faster and less prone to mistakes.  Since the modern launchpads include the 2452 & 2553 chips, the code bloat is less of an issue than with a 2231.

     

    Over on the 43oh.com forums there is a quite active sub-forum about Energia development, including quite a few libraries - some written from scratch, some adapted from Arduino.  If you have a specific issue or question, there's a good chance someone over there has done something similar already.

    • Cancel
    • Vote Up +2 Vote Down
    • Sign in to reply
    • Cancel
  • DAB
    DAB over 12 years ago in reply to ntewinkel

    Hi Nico,

     

    Yes, the Education Boosterpack is a real bargain at 25 USD.  You get a microphone, and amplifier intput, a transducer audio output, a potentiometer, an OLED display, a three axis accellerometer, all setup to run on the Launchpad, the Sitara Launchpad or the new C2000 launchpad.

    You can get an MSP430 and EB for about 30 USD, go for the Sitara and EB for about 37 USD or the C2000 and EB for about 50 USD.

    I do not think anyone could build a board with as much capability already built and tested for what they charge.

     

    The Energia software looks interesting, but I am wanting to try out the new GUI debug feature of CCS 5.3.  It looks like a huge step up in building test software for the launchpad.

     

    That said, I think the Energia sofware would be good for short simple projects with just a few inputs or outputs.

    I am sure that each will find its own niche among the users.

     

    I really like the wealth of information that TI has available on its Launchpad devices.  You can do a lot of powerful projects very inexpensively.

     

    Meanwhile, my toys await.

     

    DAB

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • Cancel
  • phoenixcomm
    phoenixcomm over 12 years ago in reply to ntewinkel

    hi Nico, et al.

    Me I like my CSS (Eclipse) & C. by using native C you  have access to the years of code that is available to you.

    Yes TI's Libs SUCK and their Doc's are Worse! The Video stuff used in the Stellaris is just bad news.. The 'user guide please don't make me laugh.. is the functions puked up into a book.. with no rime or reason. I wish their was something better.

    My advice to all the non-programmers... hey get the basic ANSI C book and get on with it.. yes the interrupts are though to learn.. but there are some great libs out there...

     

    Yes You Can Do It....

    Cris H.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • grahamf72
    grahamf72 over 12 years ago in reply to phoenixcomm

    I'm not sure what you mean with "by using native C you have access to the years of code that is available to you."?

     

    Energia is native C/C++. The underlying compiler is mspgcc - a 430 version of the industry standard gcc compiler. Energia is not a new programming language, it is a C/C++ library framework to simplify development. Although the framework provides high-level abstraction of the hardware, you can still do the low-level stuff should you so desire, and indeed some of my libraries that I have written do quite a bit of low-level stuff that is basically the same as typical CCS code.

     

    As you say, TI's lib's suck - Energia is a non-sucky library/framework.  Admittedly it isn't for everyone. As I said in my previous post, it comes with quite a bit of overhead, and does have it's limitations. But it is still quite powerful, and allows you to do in just a few lines of clear, readable code, what would normally require several lines of rather obscure code.  Debugging is a bit harder than with CCS, but because the framework makes coding much plainer, I've found debugging is less necessary.

     

    For someone who has just got their Launchpad, and is now scratching their head wondering where to get started, Energia is a great place to begin whereby they can quickly start developing their own working code without having to try to make sense of all the registers etc.  I know when I first started working with the 430, I saw the first few examples and got as far as WDTCTL=WDTPW|WDTHOLD and went "WHAT THE HECK????". It makes sense to me now, but at first it was gobbledygook. I've had about 25 years in C development, as well as a bit of assembly on Z80 based embedded systems (admittedly a very long time ago), yet this was very foreign to me.  This is where Energia is good - you can start getting functional code running without having to worry about all the obscure registers and bitfields.

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • Cancel
  • ntewinkel
    ntewinkel over 12 years ago in reply to DAB

    @Graham - Thanks for the info! I noticed that too, about the binary size bloat. I have an older board with the little chip (2231 I think), and I can't run the temp sensor demo in energia if I use the float library. But like you said, the new ones have chips with more memory (maybe in response to energia?) so that's not too much of an issue. And I already have a few of the better chips I can use - one G2452 came with the capacitive touch boosterpack.

     

    If I were working with them full time I'd probably stick with CCS and learn the lingo, but for the once-in-a-blue-moon projects I'll take the easy route. In case of a brilliant product idea I can still do quick prototyping with energia that could later be built more efficiently in CCS.

     

    Given the choice, I'd choose development-time efficiency over binary-size efficiency - for my hobby stuff the extra 50 cents for a chip with more flash is worth the pain it saves me!

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • Former Member
    Former Member over 9 years ago

    I am using same sensor(bno055 shuttle board). I follow same connection that sensor master has posted(schemetic.jpg).slight change i use 10kohm with 'i2c addr selec' pin then to vddio. I want connect bno055 shuttle board with msp432 using energia IDE. energia is compatible of arduino libraries. but while uploading the code I am facing following errors. I dont know why it comes

     

     

     

     

     

    CCROOT C:\Users\Reazwan\Downloads\energia-0101E0017-windows\energia-0101E0017\hardware\tools\lm4f

    SDKROOT C:\Users\Reazwan\Downloads\energia-0101E0017-windows\energia-0101E0017\hardware\msp432/CC3200SDK_1.0.0.patch

    CLOSURE C:\Users\Reazwan\Downloads\energia-0101E0017-windows\energia-0101E0017\hardware\common

    MAINSKETCH sensorapi.cpp

    armcl sensorapi.cpp

    C:\Users\Reazwan\Downloads\energia-0101E0017-windows\energia-0101E0017\hardware\tools\lm4f/bin/arm-none-eabi-gcc -c -Os @"C:\Users\Reazwan\Downloads\energia-0101E0017-windows\energia-0101E0017\hardware\emt/ti/runtime/wiring/msp432/compiler.opt" -DF_CPU=48000000L -D__MSP432P401R__ -DTARGET_IS_MSP432P4XX -Dxdc__nolocalstring=1 -IC:\Users\Reazwan\Downloads\energia-0101E0017-windows\energia-0101E0017/hardware/msp432/libraries/AIR430BoostEuropeETSI/ -IC:\Users\Reazwan\Downloads\energia-0101E0017-windows\energia-0101E0017/hardware/msp432/libraries/AIR430BoostEuropeETSI/utility/ -IC:\Users\Reazwan\Downloads\energia-0101E0017-windows\energia-0101E0017/hardware/msp432/libraries/AIR430BoostUSAFCC/ -IC:\Users\Reazwan\Downloads\energia-0101E0017-windows\energia-0101E0017/hardware/msp432/libraries/AIR430BoostUSAFCC/utility/ -IC:\Users\Reazwan\Downloads\energia-0101E0017-windows\energia-0101E0017/hardware/msp432/libraries/Adafruit_BNO055/ -IC:\Users\Reazwan\Downloads\energia-0101E0017-windows\energia-0101E0017/hardware/msp432/libraries/Adafruit_Sensor/ -IC:\Users\Reazwan\Downloads\energia-0101E0017-windows\energia-0101E0017/hardware/msp432/libraries/Adafruit_TMP006/ -IC:\Users\Reazwan\Downloads\energia-0101E0017-windows\energia-0101E0017/hardware/msp432/libraries/CogLCD/ -IC:\Users\Reazwan\Downloads\energia-0101E0017-windows\energia-0101E0017/hardware/msp432/libraries/EduBPMKII_Screen/ -IC:\Users\Reazwan\Downloads\energia-0101E0017-windows\energia-0101E0017/hardware/msp432/libraries/LCD_SharpBoosterPack_SPI/ -IC:\Users\Reazwan\Downloads\energia-0101E0017-windows\energia-0101E0017/hardware/msp432/libraries/M2XStreamClient/ -IC:\Users\Reazwan\Downloads\energia-0101E0017-windows\energia-0101E0017/hardware/msp432/libraries/MQTTClient/ -IC:\Users\Reazwan\Downloads\energia-0101E0017-windows\energia-0101E0017/hardware/msp432/libraries/MSP432P401_Code_Examples/ -IC:\Users\Reazwan\Downloads\energia-0101E0017-windows\energia-0101E0017/hardware/msp432/libraries/OPT3001/ -IC:\Users\Reazwan\Downloads\energia-0101E0017-windows\energia-0101E0017/hardware/msp432/libraries/OneMsTaskTimer/ -IC:\Users\Reazwan\Downloads\energia-0101E0017-windows\energia-0101E0017/hardware/msp432/libraries/OneWire/ -IC:\Users\Reazwan\Downloads\energia-0101E0017-windows\energia-0101E0017/hardware/msp432/libraries/PubNub/ -IC:\Users\Reazwan\Downloads\energia-0101E0017-windows\energia-0101E0017/hardware/msp432/libraries/PubSubClient/ -IC:\Users\Reazwan\Downloads\energia-0101E0017-windows\energia-0101E0017/hardware/msp432/libraries/SPI/ -IC:\Users\Reazwan\Downloads\energia-0101E0017-windows\energia-0101E0017/hardware/msp432/libraries/Servo/ -IC:\Users\Reazwan\Downloads\energia-0101E0017-windows\energia-0101E0017/hardware/msp432/libraries/Temboo/ -IC:\Users\Reazwan\Downloads\energia-0101E0017-windows\energia-0101E0017/hardware/msp432/libraries/Temboo/utility/ -IC:\Users\Reazwan\Downloads\energia-0101E0017-windows\energia-0101E0017/hardware/msp432/libraries/WiFi/ -IC:\Users\Reazwan\Downloads\energia-0101E0017-windows\energia-0101E0017/hardware/msp432/libraries/WiFi/utility/ -IC:\Users\Reazwan\Downloads\energia-0101E0017-windows\energia-0101E0017/hardware/msp432/libraries/Wire/ -IC:\Users\Reazwan\Downloads\energia-0101E0017-windows\energia-0101E0017/hardware/msp432/libraries/aJson/ -IC:\Users\Reazwan\Downloads\energia-0101E0017-windows\energia-0101E0017/hardware/msp432/libraries/aJson/utility/ -IC:\Users\Reazwan\Downloads\energia-0101E0017-windows\energia-0101E0017/hardware/msp432/variants/MSP_EXP432P401R/ -IC:\Users\Reazwan\Downloads\energia-0101E0017-windows\energia-0101E0017/hardware/msp432/cores/msp432/ -IC:\Users\Reazwan\Downloads\energia-0101E0017-windows\energia-0101E0017/hardware/msp432/cores/msp432/inc/ -IC:\Users\Reazwan\Downloads\energia-0101E0017-windows\energia-0101E0017/hardware/msp432/cores/msp432/lib/ -IC:\Users\Reazwan\Downloads\energia-0101E0017-windows\energia-0101E0017\hardware\emt -IC:\Users\Reazwan\Downloads\energia-0101E0017-windows\energia-0101E0017\hardware\emt\ti\runtime\wiring\msp432 -IC:\Users\Reazwan\Downloads\energia-0101E0017-windows\energia-0101E0017/hardware/emt/ti/runtime/wiring/ -ffunction-sections -fdata-sections -DARDUINO=101 -DBOARD_MSP_EXP432P401R -DENERGIA=17 -D__MSP432P401R__ -mfloat-abi=hard -mfpu=fpv4-sp-d16 -fsingle-precision-constant  -fno-exceptions -fno-rtti -I "C:\Users\Reazwan\Downloads\energia-0101E0017-windows\energia-0101E0017\hardware\tools\lm4f/include" -I "C:\Users\Reazwan\Downloads\energia-0101E0017-windows\energia-0101E0017\hardware\common" -I "C:\Users\Reazwan\Downloads\energia-0101E0017-windows\energia-0101E0017\hardware\common" -IC:\Users\Reazwan\Downloads\energia-0101E0017-windows\energia-0101E0017/hardware/msp432/cores/msp432/inc/CMSIS -IC:\Users\Reazwan\Downloads\energia-0101E0017-windows\energia-0101E0017/hardware/msp432/cores/msp432/driverlib/MSP432P4xx sensorapi.cpp -o sensorapi.obj

    sensorapi.ino:6:29: fatal error: Adafruit_Sensor.h: No such file or directory

    compilation terminated.

    make: *** [sensorapi.obj] Error 1

    C:\Users\Reazwan\Downloads\energia-0101E0017-windows\energia-0101E0017\tools\common\bin\make returned 2

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
>
element14 Community

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2025 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

ICP 备案号 10220084.

Follow element14

  • X
  • Facebook
  • linkedin
  • YouTube