Jump to content
43oh

Writing to MSP430 Flash


Recommended Posts

  • 4 weeks later...

Thurns out that MspFlash.h in Energia/hardware/msp430/libraries/MspFlash/ was missing the #include <Energia.h>. Because of the missing header, the mcu header was not picked up and thus the #ifdef's where not selecting the right piece of code.

 

I checked in a fix: https://github.com/energia/Energia/commit/7883fb0dfa6ddd961a1befd4274ecc9785d11a6e

 

If you would like to fix this in your Energia installation then open the file <energia installation direcory>/hardware/msp430/libraries/MspFlash/MspFlash.h

Add #include <Energia.h> just above the line  #ifndef MSP_FLASH_h. It should look something like this:

  Flash segments:     |...SEGMENT-0...|...SEGMENT-1...|...SEGMENT-2...|...SEGMENT-3...|...SEGMENT-4...|...SEGMENT-5...|
  Program output:     |Program code.......|flash[3*512***********************************]|Other data.................|
  Available segments: |-------------------------------|+++++++++++++++|+++++++++++++++|-------------------------------|  
  
  
*/

#include <Energia.h>

#ifndef MSP_FLASH_h
#define MSP_FLASH_h

#define SEGMENT_SIZE 512 // main segment size (smallest flasheable area)
#ifdef __MSP430_HAS_FLASH2__

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...