This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Porting Libraries made for Arduino to Energia

Other Parts Discussed in Thread: ENERGIA, TM4C1294NCPDT

Hi,

I have downloaded some libraries which have been created for arduino(Modbus Master / Slave). I want to use them with TIVA Launchpad 129. I have compiled them in Arduino IDE successfully. However, when I compile them using Energia after selecting Launchpad 129, I get some errors related to Hardware_Serial.h. I would like to know what changes are to be done in Energia to compile without errors. I have attached Modbus Master library for reference.

  • Komal Marathe said:
    like to know what changes are to be done in xenergia

    Would not that be better handled w/in (that) forum or market/sales department?

    You must think (at least somewhat) of the impact such, "extra TM4C" tech demand places upon the sole vendor expert - assigned here.  Once that "flood-gate" opens - when/where does it stop?   (if ever)

    At the minimum - your coding efforts - submitted here in this vendor's API format - would prove a far more suitable & reasonable request...

  • The conventional approach to porting

    1. check for any porting guides and read
    2. read the code
    3. understand what the code does, particularly the interfaces
    4. create replacements for the sections that change for your processor
    5. verify operation

    Sometimes, it's simpler to start from scratch.  Particularly if the code is not designed with portability in mind.

    Remember, the only portable code is code that has been ported.

    Robert

  • One notes that your listing demands (some) code read/review - followed by serious programming effort - which appears (outside) the desire of poster who reports, "downloading only!"
  • Noticed that did you?

    Robert

    I do remember Microsoft asserting portable meant that it worked on more than one version of windows. Sometimes the bar gets set very low.
  • Robert Adsett said:
    Sometimes the bar gets set very low.

    Ah so true - yet extends to certain downtown Chi. "water-holes" - where, after reasonable number of "adult beverages" - selection criteria erodes...

    Steering (bit) back to poster land - is it not time that you "got cracking" and converted that Arduino code into appropriate TM4C style?   (time's wasting Robert - and poster did make the effort to "download that code.")   Allez!

  • Hi
    I am facing exactly same problem! But I have went through Hardware_Serial.h file in arduino as well as in energia (Both are similar) . The problem is with UART buffer registers. I have gone through TM4C1294NCPDT datasheet and i haven't come across any detailed information on UART buffers. If you can provide more information on UART registers and buffers i can port my libraries which have dependence on Hardware_Serial.h and finally I can "Make The Switch"
  • Hi,

    You may find out helpful this link, from TI, related to Modbus-TCP -  inside there are several routines for serial ModbusRTU. Some more explanations inside spma037.pdf application note - paragraph 11/page 8 states that the software is not complete, you must add some more, but at least you have some starting info. 

    Of coarse that may differ from your Arduino sources. Take care what Arduino is that, since there are several flavors (Uno, Due, Tre,...- "Uno" was/is used for 8-bit micro, "Due" for 32-bit, but not ARM), so could be sub-optimal from your micro point of view.  

  • Suyog Vyawahare said:
    If you can provide ... and finally I can "Make The Switch"

    With that as motivation - how possibly can we (outsiders) resist kicking "all" paid tech work to the curb - and leaping to your assistance?

    Would it not make (more) sense for you to "build" experience & confidence (w/your "Switched" device) by loading & running the detailed, UART examples - designed for the 129 device?   (i.e. switch central)

  • Thanks for link. I will go through it and study it But i really want some detailed information on UART block. Once again thank you.
  • Hi
    cb1_ thank you for your kind and encouraging words.

    1) I am not asking for spoon feeding. Nor did I asked anyone to to give me ready-made solution. All I asked was where can I get detailed information on UART registers.

    2) And why should I expect help from outsider? This is not a maker forum or Open source forum where we are helping each other for betterment of community! Its pure commercial business I buy TI products in return TI give me technical support.
    And do you want to imply that TI staff is not competent enough to address our queries? and we will be dependent on outsider help? In that case thanks for giving me a heads up!

    3) Regarding "Building experience" "Been there done that" now go back and read my question, was it program based or hardware base?
  • Suyog Vyawahare said:
    now go back and read my question

    Your wish - my command!   (except not anytime soon - this planet...)

    You'll note that it's Sunday - there's just one vendor expert here - you cannot (realistically) expect 24/7 - can you?   (thus you'd (likely) do better to exercise a broader appeal than (simple minded) make the switch...)

    Spend (any) time here and you'd note (repeatedly) that I'm prime supporter of vendor's expert.   It is your (reach) which attempts to degrade this vendor.

    Detailed info on MCU Registers (any/all) is usually found w/in the MCU manual - is it not?    There's an entire chapter dealing w/UARTs.   And - as I noted - there are many code examples - which further illustrate.   Are you still very much "lost" - after (really) "being there - and doing that?"

    Perhaps best "going back & reading" targets you - and your MCU manual!

  • Hi
    I have read MCU manual many times i still i have some doubts. I never said or expected a 24X7 instant support. So whats your point about today being sunday i dont get! Or you just want to brag about your contribution? I would had really thanked your efforts to help but because of your tone I won't!
  • Suyog Vyawahare said:
    Hi
    I have read MCU manual many times i still i have some doubts. I never said or expected a 24X7 instant support. So whats your point about today being sunday i dont get! Or you just want to brag about your contribution? I would had really thanked your efforts to help but because of your tone I won't!

     Hi Suyog, please take some breath and calm down, I try explain what happened:

     This forum level got raised down from too many question asking to solve coding issue for free.

     One staff person appear to like more useless people answer with do a search or similar answer than hint good person are here contributing. Ths also is acerbating me, these people receive recognition and free hardware who really help ENgineer receive frustration and flood from too many "ultra low level" <<do it for me it is urgent>>.

     Ok this is not your case and I am not hobby user but I am evaluating Energia as teaching aid, this in term of make yourself not bad too often seen "do it for me".

     I am evaluating modbus to give PLC world access from TIVA (Not arduino carrying an old 8 bit processor for an uncheap proce)

     So modbus implementation are welcome and can be developed with joint efforts too.

     This forum dropped from good technical to low level social network <<Like>> and post <<every thing in your mind>>.. This , it like just non tech staff is the worstest commercial move from a silicon seller.

     Have a good time and take good tuition come from CB1 and Robert TOO, they are professional, I am professional too and we don't like some language I suppose you too. Also remember I am not native and I also do some mistake on writing in this "foreign language" I use everyday but I never like  see tech level raised down.

  • Thank you Mr. Roberto Romano for explaining in polite manner. I know about rewards. Lets work for implementing Modbus library i am in for helping. My schooling was done in english we its still foreign language for us :) My problem was tone of speaking not lack of help!
  • If you have read the manual then please ask questions about what is not clear. Your current question is too broad to answer without duplicating the manual. The manual does appear to be fairly complete to me but it does require a certain amount of knowledge to understand.

    Robert