Jump to content
43oh

new msp430g2955 with energia


Recommended Posts

the datasheet from msp430g2955 so i was trying to get it to work with energia. It's for the robotics club i'm in. C assembly is not a option for the newer students.

 

i changed the:

pins_energia.h in energia-0101E0009\hardware\msp430\variants

energia.h in energia-0101E0009\hardware\msp430\cores

 

and created a msp430g2955 core in energia-0101E0009\hardware\tools\msp430\msp430\include

 

 

but i got this error message:

 

In file included from C:\Users\User\Desktop\Nova pasta\robotica\msp430\energia-0101E0009\hardware\msp430\cores\msp430g2x55\twi.c:43:0:
C:\Users\User\Desktop\Nova pasta\robotica\msp430\energia-0101E0009\hardware\msp430\cores\msp430g2x55\/twi.h:36:2: error: #error "********** USI not available"
C:\Users\User\Desktop\Nova pasta\robotica\msp430\energia-0101E0009\hardware\msp430\cores\msp430g2x55\/twi.h:40:2: error: #error "********** USCI not available"
C:\Users\User\Desktop\Nova pasta\robotica\msp430\energia-0101E0009\hardware\msp430\cores\msp430g2x55\twi.c: In function 'twi_readFrom':
C:\Users\User\Desktop\Nova pasta\robotica\msp430\energia-0101E0009\hardware\msp430\cores\msp430g2x55\twi.c:278:21: error: 'LPM0_bits' undeclared (first use in this function)
C:\Users\User\Desktop\Nova pasta\robotica\msp430\energia-0101E0009\hardware\msp430\cores\msp430g2x55\twi.c:278:21: note: each undeclared identifier is reported only once for each function it appears in
C:\Users\User\Desktop\Nova pasta\robotica\msp430\energia-0101E0009\hardware\msp430\cores\msp430g2x55\twi.c: In function 'twi_writeTo':
C:\Users\User\Desktop\Nova pasta\robotica\msp430\energia-0101E0009\hardware\msp430\cores\msp430g2x55\twi.c:378:21: error: 'LPM0_bits' undeclared (first use in this function)
 
 
can anyone help me in developing this? then ill post all the edited files to everione to use.
 
edit:
i belive it's the msp430g2955 mcu i created that it's giving the trouble.
there are some changes, not just added. for example de T1Ax has diferent registers (i mean the hexadecimal number changed)
 
 
 
i forgot to add to msp430.h the file msp430g2955.h so now it works.
 
 
 
the new problem is this:
 
core.a(wiring_digital.c.o) :-(.rodata.port_to_sel2+0x8): undefined reference to `__P4SEL2'
core.a(wiring_digital.c.o) :-(.rodata.port_to_sel0+0x8): undefined reference to `__P4SEL'
core.a(wiring_digital.c.o) :-(.rodata.port_to_ren+0x8): undefined reference to `__P4REN'
core.a(wiring_digital.c.o) :-(.rodata.port_to_dir+0x8): undefined reference to `__P4DIR'
core.a(wiring_digital.c.o) :-(.rodata.port_to_output+0x8): undefined reference to `__P4OUT'
collect2: ld returned 1 exit status
 
 
can someone tell me how to edit periph.x? i edited but it gives out a error with the notepad 
Link to post
Share on other sites

This msp430 has a few "new" periferials that we have not implemented in Energia. There is quite a bit of changed needed throughout the core. Of course if you think you can contribute support for this new MSP430 then I would be happy to pull it into Energia. I can guide you to some extend but will not be able to spend to much time due to other things on my plate that need to get done.

Link to post
Share on other sites

I i'm probaly not the best person for this kind of tingh. but i will test stuff and bring out bugs and explore solutions.

 

Do you want me to organize a kind of change log to keep track here on the forum or github? Not just the Energia team but also other people that can use this. All help is apreciated.

 

I posted this in github: https://github.com/energia/Energia/issues/214

here is my changes until now: https://www.dropbox.com/sh/nedw9hjxutt4fa4/BfV611sdOh

 

Me and a friend are also making stelarpad more compatible with energia too. I'm mainly trying to make Energia compatible for msp430g2955 and he's adapting libraries for servos, srf08/10 and everitigh that comes along in need. All this for the club for the new students initiating. I could ask him to share here the files in stelarpad if anyone is interested

Link to post
Share on other sites

Energia,

 

Can we take an incremental approach for the support of the MSP430G2955 by Energia?

  • First, the features that already exist in the MSP430G2553.
  • Then, the new features.

What do you think?

 

This msp430 has a few "new" periferials that we have not implemented in Energia. There is quite a bit of changed needed throughout the core. Of course if you think you can contribute support for this new MSP430 then I would be happy to pull it into Energia. I can guide you to some extend but will not be able to spend to much time due to other things on my plate that need to get done.

Link to post
Share on other sites

To LR.A.

 

It seems other files with MCU-specific data are impacted too:

 

 
/Applications/Energia.app/Contents/Resources/Java/hardware/msp430/boards.txt
/Applications/Energia.app/Contents/Resources/Java/hardware/msp430/variants/launchpad/pins_energia.h
/Applications/Energia.app/Contents/Resources/Java/hardware/tools/msp430/msp430/include/msp430g2553.h
/Applications/Energia.app/Contents/Resources/Java/hardware/tools/msp430/msp430/lib/ldscripts/msp430g2553/memory.x
/Applications/Energia.app/Contents/Resources/Java/hardware/tools/msp430/msp430/lib/ldscripts/msp430g2553/periph.x
 
on a Mac installation.
Link to post
Share on other sites

Energia,

 

Can we take an incremental approach for the support of the MSP430G2955 by Energia?

  • First, the features that already exist in the MSP430G2553.
  • Then, the new features.

What do you think?

 

We sure can. We do not have a board with this chip on it however that we can use for the pin map. We could just take the DIP package pin out as the board pin out. Does the TSSOP to DIP result in the same pin out as the 2955 in a DIP package?

Link to post
Share on other sites

We sure can. We do not have a board with this chip on it however that we can use for the pin map. We could just take the DIP package pin out as the board pin out. Does the TSSOP to DIP result in the same pin out as the 2955 in a DIP package?

 

8597723611_189aa81a63_z.jpg

 

TSSOP pins are documented, but not yet for the DIP40!

Link to post
Share on other sites

 

To LR.A.

 

It seems other files with MCU-specific data are impacted too:

 

 
/Applications/Energia.app/Contents/Resources/Java/hardware/msp430/boards.txt
/Applications/Energia.app/Contents/Resources/Java/hardware/msp430/variants/launchpad/pins_energia.h
/Applications/Energia.app/Contents/Resources/Java/hardware/tools/msp430/msp430/include/msp430g2553.h
/Applications/Energia.app/Contents/Resources/Java/hardware/tools/msp430/msp430/lib/ldscripts/msp430g2553/memory.x
/Applications/Energia.app/Contents/Resources/Java/hardware/tools/msp430/msp430/lib/ldscripts/msp430g2553/periph.x
 
on a Mac installation.

I don't even know anytigh about a Mac. Never used one ever.

 

What do you mean? The files i have in the github changed those files? i don't belive i changed any files of msp430g2553. i only have some add-ons for msp430g2553 28pin. but it should not afect the original 20pin

Those are the files that i chaged and have only the changes.

 

For example. in board.txt, in the shared files, i only have there the added boards. becouse i didn't change anytigh on the original boards.

 

 

 

 

My aproach will be for now just the club needs, that are basic.

       -digitalRead and digitalWrite

       -PWM signal for DC motor speed control

       -analogRead

       -servo control

       -I2C for use of SRF10

In that order.

 

The last one seems to be the hardest becouse i still havent been able to use them with msp430g2553

Link to post
Share on other sites

I mean those files should be updated in order to manage the MSP430G2995:

  • add board definition for the MSP430G2995 in hardware/msp430/boards.txt 
  • add pins definition for the MSP430G2995 in hardware/msp430/variants/launchpad/pins_energia.h
  • create a new file msp430g2995.h out of hardware/tools/msp430/msp430/include/msp430g2553.h
  • create a new file msp430g2995/memory.x out of hardware/tools/msp430/msp430/lib/ldscripts/msp430g2553/memory.x
  • create a new file msp430g2995/periph.x out of hardware/tools/msp430/msp430/lib/ldscripts/msp430g2553/periph.x
Link to post
Share on other sites

 

I mean those files should be updated in order to manage the MSP430G2995:

  • add board definition for the MSP430G2995 in hardware/msp430/boards.txt 
  • add pins definition for the MSP430G2995 in hardware/msp430/variants/launchpad/pins_energia.h
  • create a new file msp430g2995.h out of hardware/tools/msp430/msp430/include/msp430g2553.h
  • create a new file msp430g2995/memory.x out of hardware/tools/msp430/msp430/lib/ldscripts/msp430g2553/memory.x
  • create a new file msp430g2995/periph.x out of hardware/tools/msp430/msp430/lib/ldscripts/msp430g2553/periph.x

 

i just didn't change the memory.x of all that

 

i got the edited files here: https://www.dropbox....4fa4/BfV611sdOh

it also has msp430g2553 28pin added there.

 

in here:https://github.com/e...rgia/issues/214

i say exacly what i have changed

 

 

i can't give much support until the end of April. Got a competition coming and only have a little spare time

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...