B4R Question Jointstring results in rebooting Nano device

MbedAndroid

Well-Known Member
Licensed User
Longtime User
trying using this code

Dim c AsString = JoinStrings(ArrayAsString("Number of millis: ", Millis, CRLF, "Number of micros: ", Micros))
gives a reboot of the Nano even when the code is not called yet.
Just removing this line solves the problem
Probably a low memory issue
Ram around 330 byts free
Stackusage gives 0

With a workaround (sending the parts of the string to the LCD in multiple times) gives no problem.
during compilation i see around 17000 bytes used of code and 1000 bytes of ram (2k internal)
it's not a big issue for me as i worked around the problems, but should be nice to get some answer if this issue can be solved and how
 

Erel

B4X founder
Staff member
Licensed User
Longtime User
Please use [code]code here...[/code] tags when posting code.

With a workaround (sending the parts of the string to the LCD in multiple times) gives no problem.
Note that this is not a workaround. This is the correct implementation.

Can you upload your project (File - export as zip)?
 
Upvote 0

MbedAndroid

Well-Known Member
Licensed User
Longtime User
here you are
i think it will run without the LCD and thermosensor
disable line #64 or #65 for test
(it's a interface to connect the Honeywell to my oil-based heating system)
 

Attachments

  • kachel.zip
    4.6 KB · Views: 269
Upvote 0

MbedAndroid

Well-Known Member
Licensed User
Longtime User
ok How are const treaded in B4R? are they loaded direct from program memory or copied to volatile memory? In Avr C you need to add a PROGMEM tag to specify you want to load constants from your program memory; if not it will be copied from program memory into volatile memory. (as i load a of const for the graphics char)
arduino mega has 8 k instead of the Nano with 2K
 
Upvote 0
Top