Giter Club home page Giter Club logo

Comments (7)

madleech avatar madleech commented on September 28, 2024

Hi Hoffy,

What isn't working? Are you getting compile errors, or are you unable to get it to respond when using it in a JMRI system? Have you followed the directions at the top of the "hello world" sample program for setting it up with JMRI?

The code is very platform-agnostic, it doesn't use any AVR-specific features so should work fine in Energia.

--Michael

from arduinocmri.

hoffy avatar hoffy commented on September 28, 2024

Hi Michael,

I am getting compile errors. I can't quite seem to wrap my head around
a resolution to it. I expected it to compile fine as well, and does
just fine within Arduino IDE.

Here is the output from the bottom console of Energia.

C:\Users\Steve\Desktop\energia-0101E0010\hardware\tools\msp430\bin\msp430-g++
-c -g -Os -Wall -ffunction-sections -fdata-sections -mmcu=msp430g2553
-DF_CPU=16000000L -MMD -DARDUINO=101 -DENERGIA=10
-IC:\Users\Steve\Desktop\energia-0101E0010\hardware\msp430\cores\msp430
-IC:\Users\Steve\Desktop\energia-0101E0010\hardware\msp430\variants\launchpad
-IC:\Users\Steve\Desktop\energia-0101E0010\hardware\msp430\libraries\CMRI C:\Users\Steve\AppData\Local\Temp\build1721320052316381893.tmp\hello_world.cpp
-o
C:\Users\Steve\AppData\Local\Temp\build1721320052316381893.tmp\hello_world.cpp.o

C:\Users\Steve\Desktop\energia-0101E0010\hardware\tools\msp430\bin\msp430-g++
-c -g -Os -Wall -ffunction-sections -fdata-sections -mmcu=msp430g2553
-DF_CPU=16000000L -MMD -DARDUINO=101 -DENERGIA=10
-IC:\Users\Steve\Desktop\energia-0101E0010\hardware\msp430\cores\msp430
-IC:\Users\Steve\Desktop\energia-0101E0010\hardware\msp430\variants\launchpad
-IC:\Users\Steve\Desktop\energia-0101E0010\hardware\msp430\libraries\CMRI -IC:\Users\Steve\Desktop\energia-0101E0010\hardware\msp430\libraries\CMRI\utility
C:\Users\Steve\Desktop\energia-0101E0010\hardware\msp430\libraries\CMRI\CMRI.cpp
-o
C:\Users\Steve\AppData\Local\Temp\build1721320052316381893.tmp\CMRI\CMRI.cpp.o

C:\Users\Steve\Desktop\energia-0101E0010\hardware\msp430\libraries\CMRI\CMRI.cpp:
In constructor 'CMRI::CMRI(unsigned int, unsigned int, unsigned int)':
C:\Users\Steve\Desktop\energia-0101E0010\hardware\msp430\libraries\CMRI\CMRI.cpp:34:44:
error: 'calloc' was not declared in this scope
C:\Users\Steve\Desktop\energia-0101E0010\hardware\msp430\libraries\CMRI\CMRI.cpp:
In member function 'void CMRI::set_length(unsigned int, unsigned int)':
C:\Users\Steve\Desktop\energia-0101E0010\hardware\msp430\libraries\CMRI\CMRI.cpp:54:53:
error: 'realloc' was not declared in this scope
C:\Users\Steve\Desktop\energia-0101E0010\hardware\msp430\libraries\CMRI\CMRI.cpp:
In member function 'char CMRI::process()':
C:\Users\Steve\Desktop\energia-0101E0010\hardware\msp430\libraries\CMRI\CMRI.cpp:80:9:
warning: converting to non-pointer type 'char' from NULL [-Wconversion-null]

Thanks for the response, I know a bunch of people who may enjoy this on
the MSP430 as well as the Launchpad. My particular interest in regard
to the MSP430 is cost as I am limited on resources as I am disabled.
This will be a giant cost saver to me if we get it to work.

Steve "Hoffy" Hofmeister
Hoffy's World Website http://hoffysworld.com
Hoffy's World Facebook
https://www.facebook.com/pages/Hoffys-World/291487184220303
Follow @Hoffys_World
http://twitter.com/intent/user?screen_name=Hoffys_World
Hear me occasionally on The Model Rail Radio Podcast
http://www.modelrailradio.com

On 9/24/2013 6:39 PM, Michael Adams wrote:

Hi Hoffy,

What isn't working? Are you getting compile errors, or are you unable
to get it to respond when using it in a JMRI system? Have you followed
the directions at the top of the "hello world" sample program for
setting it up with JMRI?

The code is very platform-agnostic, it doesn't use any AVR-specific
features so should work fine in Energia.

--Michael


Reply to this email directly or view it on GitHub
#2 (comment).

http://twitter.com/intent/user?screen_name=Hoffys_World

from arduinocmri.

madleech avatar madleech commented on September 28, 2024

Fantastic, that's very useful. Seems that I was using AVR specific code, in that calloc and realloc aren't supported by the MSP430 libc. So I've changed the former to use malloc and removed the latter, since how useful is it to be able to resize the storage space on the fly anyway? I can't imagine any real reason to ever need to do that.

Steve, could you download the updated library and try again please? Note that it won't compile for the MSP430g2231 as it doesn't have enough flash storage space, but it should compile correctly for any other MSP.

from arduinocmri.

hoffy avatar hoffy commented on September 28, 2024

Well, that would explain why I could not figure out the issue. I never
considered that it was not supported. I look forward to testing it. I
will report back soon.

Thanks for taking the time to look into it!

Steve "Hoffy" Hofmeister

Hoffy's World Website http://hoffysworld.com
Hoffy's World Facebook
https://www.facebook.com/pages/Hoffys-World/291487184220303
Follow @Hoffys_World
http://twitter.com/intent/user?screen_name=Hoffys_World
Hear me occasionally on The Model Rail Radio Podcast
http://www.modelrailradio.com

from arduinocmri.

hoffy avatar hoffy commented on September 28, 2024

It appears to be compiling fine now, I will do a physical test before

the day is out and report on that was well.

Steve "Hoffy" Hofmeister

Hoffy's World Website http://hoffysworld.com
Hoffy's World Facebook
https://www.facebook.com/pages/Hoffys-World/291487184220303
Follow @Hoffys_World
http://twitter.com/intent/user?screen_name=Hoffys_World
Hear me occasionally on The Model Rail Radio Podcast
http://www.modelrailradio.com

from arduinocmri.

hoffy avatar hoffy commented on September 28, 2024

Works like a charm. I ran the Hello World example, after following your
instructions as written. Other than setting the RXD & TXD Pins of the
MSP430 to Hardware UART no special changes are needed.

I am going to have a lot of fun playing with this little beauty. Thanks
for the modification.

Steve "Hoffy" Hofmeister

Hoffy's World Website http://hoffysworld.com
Hoffy's World Facebook
https://www.facebook.com/pages/Hoffys-World/291487184220303
Follow @Hoffys_World
http://twitter.com/intent/user?screen_name=Hoffys_World
Hear me occasionally on The Model Rail Radio Podcast
http://www.modelrailradio.com

from arduinocmri.

madleech avatar madleech commented on September 28, 2024

Fantastic! Thanks very much for your help debugging and testing this, I look forward to hearing what you do with it.

from arduinocmri.

Related Issues (10)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.