energia / Energia

Fork of Arduino for the Texas Instruments LaunchPad's
http://energia.nu
Other
798 stars 670 forks source link

Error compiling assembler libraries ".S" #47

Closed xv4y closed 12 years ago

xv4y commented 12 years ago

Hi,

I am new to MSP430 and Energia and trying to learn. I am using Energia build 005a right now.

I am trying to use the RTC library from TI but it is in assembler. I have setup the files in my Sketchbook directories. I renamed the RTC.s43 file to RTC.S. When I try to compile my small example (just calling the libraries in fact), it end with this error : Cannot run programm "/Applications/Energia.app/Contests/Resources/Java/hardware/tools/msp430/bin/avr-gcc": error=2, No such file or directory

It seems Energia is not calling the right compiler for assembler...

Thanks for your help. Yan.

rei-vilo commented 12 years ago

What board have you selected?

You need to select a LaunchPad with msp430g2xxx to call the right compiler.

xv4y commented 12 years ago

Yes it is right. If I compile "pure Processing" or C code it is ok and upload to LaunchPad ok. Error occurs only when I tried to include libraries with assembler (.S files)

Yan.

Yannick DEVOS - XV4Y http://xv4y.radioclub.asia/ http://varc.radioclub.asia/ http://www.qslwatch.com/

Le 14 mai 2012 à 15:22, Rei Vilo a écrit :

What board have you selected?

You need to select a LaunchPad with msp430g2xxx to call the right compiler.

--- rei_vilo


Reply to this email directly or view it on GitHub: https://github.com/energia/Energia/issues/47#issuecomment-5684759

RickKimball commented 12 years ago

I renamed the RTC.s43 file to RTC.S.

The syntax for msp430-gas (.S) is different than IAR msp430 asm (.s43). They are not compatible. You have to convert the compiler directives and make sure that any argument passing is compatible with the gcc ABI.

robertinant commented 12 years ago

I have reproduced it. It is calling avr-gcc instead of msp430-gcc for .S files as it should. Will look into it.

xv4y commented 12 years ago

Hi,

Thanks Robert, Rick, Rei for your answers. I will wait the next release to have it corrected then...

Rick, yes I know about the incompatibilities but without compiler I was unable to check my code. Invoking the compiler manually, I have been working on it. I have a enough spare time perhaps I will publish the RTC lib so it will be available for Energia.

73,

Yan.

Yannick DEVOS - XV4Y http://xv4y.radioclub.asia/ http://varc.radioclub.asia/

Le 14 mai 2012 à 22:14, Robert Wessels a écrit :

I have reproduced it. It is calling avr-gcc instead of msp430-gcc for .S files as it should. Will look into it.


Reply to this email directly or view it on GitHub: https://github.com/energia/Energia/issues/47#issuecomment-5692635

robertinant commented 12 years ago

Please review fix in Issue #48 (pull request)

xv4y commented 12 years ago

Hi,

I am unable to test it (to compile Energia from source) but the patch and the test seem ok to me. I close this issue.

Thanks again. Yan.

robertinant commented 12 years ago

Yan, looking at the path /Applications/Energia.app/Contests/Resources/Java/hardware/tools/msp430/bin/avr-gcc indicates you are on OS X. I will do a build with the fix and post it somewhere.

robertinant commented 12 years ago

Yan, can you please send me an e-mail at robertinant at yahoo dot com so that I can provide you with a link to a 0006 build for you to test?

xv4y commented 12 years ago

Hi Robert,

Thanks a lot for your help, I really appreciate it since it seems a lot of improvements have been done since 005a. To be honest, finally I don't need the ability to compile assembler libs... I forgot I don't like assembler for 20 years now and got bored trying to port the code to GNU asm. I am writing a new lib from scratch in C.

Meanwhile, I wonder if there is a forum or a place to talk about Energia usage, not issues but how to code with it. I would like to use interrupts and have some problems compiling with it :

Thanks again,

Yan.

Yannick DEVOS - XV4Y http://xv4y.radioclub.asia/ http://varc.radioclub.asia/

Le 16 mai 2012 à 12:06, Robert Wessels a écrit :

Yan, can you please send me an e-mail at robertinant at yahoo dot com so that I can provide you with a link to a 0006 build for you to test?


Reply to this email directly or view it on GitHub: https://github.com/energia/Energia/issues/47#issuecomment-5733628

rei-vilo commented 12 years ago

Meanwhile, I wonder if there is a forum or a place to talk about Energia usage, not issues but how to code with it.

See Energia (Arduino for msp430)

xv4y commented 12 years ago

Hi Rei,

Thanks. Right now I almost solved my Timer problems. Just need to force the P1 to be digital I/O and not timer output... beside using "pinMode" my code does not work as expected. I have to check a few things but later... if I need help I will go to the forum you suggested.

Once my simple RTC code is clean I will post it for comments. Perhaps it could be included in Energia as a sample library.

Thanks,

Yan.

Yannick DEVOS - XV4Y http://xv4y.radioclub.asia/ http://varc.radioclub.asia/

Le 16 mai 2012 à 14:11, Rei Vilo a écrit :

Meanwhile, I wonder if there is a forum or a place to talk about Energia usage, not issues but how to code with it.

See Energia (Arduino for msp430)


Reply to this email directly or view it on GitHub: https://github.com/energia/Energia/issues/47#issuecomment-5734787

robertinant commented 12 years ago

Hi Yan, we are working on getting a forum up and running in a week or so. Meanwhile, if you have questions, please feel free to send me an e-mail: robertinant at yahoo dot com

xv4y commented 12 years ago

Hi Robert,

Thanks for your help. As suggested by Rei the 43o.com forum is also a good place, open minded. Perhaps if our community is small better not to waste time on setting up a forum.

I have a running sRTC.h library. Only managing hh:mm:ss, not days, but a good start. Where should I put it for review as a sample lib for Energia ?

Yan.

Yannick DEVOS - XV4Y http://xv4y.radioclub.asia/ http://varc.radioclub.asia/ http://www.qslwatch.com/

Le 17 mai 2012 à 09:51, Robert Wessels a écrit :

Hi Yan, we are working on getting a forum up and running in a week or so. Meanwhile, if you have questions, please feel free to send me an e-mail: robertinant at yahoo dot com


Reply to this email directly or view it on GitHub: https://github.com/energia/Energia/issues/47#issuecomment-5757202

robertinant commented 12 years ago

I am aiming to get Energia forum on 43oh.com under the Community Projects.

For contributions of libraries, the official process is posted here: https://github.com/energia/Energia/wiki/Bug-fix-and-new-feature-review-process. Still work in progress but will be finalized by the end of the week. Following this procedure does require you to check it out from git. If this is something you do not feel comfortable with then you can also send it to me and I will put it on a branch here for code review.

For casual sharing of libraries Energia is in need of something like the Arduino playground. I have been working on something that will enable this but this is far from complete.