Taggsladder 2 Posted March 25, 2015 Share Posted March 25, 2015 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 Quote Link to post Share on other sites
spirilis 1,265 Posted March 25, 2015 Share Posted March 25, 2015 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. Quote Link to post Share on other sites
Taggsladder 2 Posted March 25, 2015 Author Share Posted March 25, 2015 Thanks for the reply! Have a great day. Kind regards Andreas Quote Link to post Share on other sites
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.