Jump to content
43oh

Arduino Serial.print(F("lala")) Energia/MSP430 equivalent?


Recommended Posts

Hello

 

I have a large sketch with lots of quite long Serial.print() and I have read somewhere about Arduino that to save SRAM you can use the F() macro like "Serial.print(F("lala"))". But When I try to use this in Energia I get no errors but the Serial.print don't display anything. Why is this?

 

Thanks!

 

Best regards

Andreas

Link to post
Share on other sites

It's not necessary under any of the TI MCU platforms.  Those strings don't use SRAM like they do on the (Harvard Architecture*) Atmel AVR.  That said, it should still work & print the value, so there may be a bug in Energia's implementation of that F() kludge.  Best just to leave it out though.

 

* AVR is Harvard Arch. but cannot pull flash as data as easily as it can pull SRAM as data; ARM Cortex-M is also harvard arch, but doesn't have that limitation since it has a humungous address bus it can fit code & SRAM in the same address scheme.

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