codyneslen 0 Posted May 9, 2014 Share Posted May 9, 2014 Hi All, I am using Energia 0101E0012, MSP430G2553, Launchpad G2 Rev 1.4, on a mac. When I run the example MspFlash program, it appears like I erase and write to flash correctly, but when I try to read the "Hello World" written into flash, the only thing that prints out is Quote Link to post Share on other sites
rustw 0 Posted May 9, 2014 Share Posted May 9, 2014 Cody, Putting #define __MSP430_HAS_FLASH2__ above #include <MspFlash.h> should do the trick. Wayne Quote Link to post Share on other sites
pabigot 355 Posted May 9, 2014 Share Posted May 9, 2014 msp430.h should be defining __MSP430_HAS_FLASH2__ if the device has that peripheral. It's almost never correct for user code to define any macro that begins or ends with two underscores: those belong to the implementation. (The right answer may be to include msp430.h, though MspFlash.h should be including everything it requires; if it doesn't that's a flaw in whatever provides MspFlash.h.) Quote Link to post Share on other sites
codyneslen 0 Posted May 13, 2014 Author Share Posted May 13, 2014 Adding #include "msp430.h" to the top of the file worked. I did not try to include the defined flash macro. Thanks for the help! -Cody Quote Link to post Share on other sites
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.