Jump to content
Sign in to follow this  
sven222

MSP430G2252 with launchpad

Recommended Posts

Hi folks,

 

sorry that I have so many questions in the moment, but I do not find to many other sources for help. I got a bunch of G2252IN20 for under 50cents a piece. Because of the pinout, that is quiet similar to the G2452 I thought I can program it with my launchpad. But when I put the chip into the launchpad, start mspdebug and try to download my code, I get the following error:

Writing  818 bytes to 0xc000
fet: FET returned error code 7 (Could not write device memory)
fet: failed to write to 0xc000

On an Energia site I found that this happens when you have choosen the wrong target, but I do not use Energia. Even when I start mspdebug this way:

mspdebug rf2500 --fet-force-id MSP430G2252

I get the same error.

Has anybody any idea what I do wrong?

 

Greetings

 

Sven

Share this post


Link to post
Share on other sites

Try installing Code Composer Studio and build a simple test program or use one of the Launchpad Demos. Debug it in CCS, and it will load through the FET on the Launchpad. Even if you build for the wrong target, it will tell you and ask if you want to go ahead and ignore that error.

 

If that works, then the hardware is fine, and you just need to debug the software command in your project that is not working. Maybe the force option is broken?

Share this post


Link to post
Share on other sites

@sven222 It looks like you're trying to load a file into the flash area of a larger chip.

 

The G2252 only has 2kB of FLASH, where as the G2452 has 8kB The device datasheet shows a table with this information.

post-274-0-46510100-1454396167_thumb.png

 

Even if your compiled program is less than 2kB, when it is compiled for the G2452 it will sit at the lowest flash address. I think the only way to solve this problem is to re-compile your code with the target set as msp430g2252, not msp430g2452. This should instruct the linker to place the code at an address where memory exists.

Share this post


Link to post
Share on other sites

Slowly I think I find the problem. The linker options  in the Codeblocks installation are like from the Codeblocks and MSP430 tutorial from this forum. And I did not change the compiler and linker settinge. When I change linker and compiler to the 2452 it compiles, but can not upload. So like you said Greg, that the start adress is wrong. If I change both settinge to the G2252 I get a new error message:

||=== Build: Debug in Brainmachine (compiler: GNU GCC Compiler for MSP430) ===|
/usr/lib/gcc/msp430/4.6.3/libcrt0.a(_copy_data.o)||In function `__do_copy_data':|
/build/buildd/gcc-msp430-4.6.3~mspgcc-20120406/./gcc-4.6.3/gcc/config/msp430/crt0.S|195|relocation truncated to fit: R_MSP430_16_BYTE against symbol `__data_load_start' defined in *ABS* section in bin/Debug/Brainmachine.elf|
||=== Build failed: 1 error(s), 0 warning(s) (0 minute(s), 0 second(s)) ===|

But I have no idea what this error message means. Anybody any idea?

 

Greetings

 

Sven

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×