Issue solved at brach 1.0.0, Rev 712.
Issue in Arduino Uno: Receiving the string in chunks is normal if you don't detect "\r\n".
Issue in Arduino Mega:
I think it is good to explain this one, because it's related to the new MCU simulator and is the kind of errors that any user could solve by himself.
MCUs in this simulator are defined in xml files ( simulide/resources/data ).
Some problems are related to errors in these files.
These problems can be solved by the user just editing those files.
This Issue in Arduino Mega Usart in one example of an error in one of these files:
Atmega2560 (used in Arduino Mega) if defined in simulide/resources/data/AVR/mega2560.mcu
That file contains this:
<mcu name="mega2560" core="AVR" data="8704" prog="262144" progword="2" eeprom="4096" inst_cycle="1">
<include file="avr/avr_gpr.xml" />
<include file="m640_1280_2560/m640_regs.xml" />
<datablock name="RAM" start="0x0200" end="0x21FF"/>
<include file="m640_1280_2560/m640_int.xml" />
<include file="m640_1280_2560/m640_perif.xml" />
In the first line is defined: the core, data memory size, program memory size, program word size, eeprom size, instruction cycle clocks.
Then it includes other files:
Files ended in "_regs.xml" define Registers.
Files ended in "_int.xml" define Interrupts.
Files ended in "_perif.xml" define Perifericals.
In this case the error was in UCSR0C register ( file: m640_1280_2560/m640_regs.xml )
<register name="UCSR0C" addr="0x00C2" reset="00000110" mask=""
As you can see the Register bit names are incorrect, the correct ones are these:
Just by editing this line the problem is solved.
Perifericals are defined in (relative path): m640_1280_2560/m640_perif.xml
In this case it was correct (just a typo in Usart number 2), but users can check if everything is correct.
For example first Usart is defined here:
<usart name="USART0" number="1" configregsA="UCSR0A" configregsB="UCSR0B" configregsC="UCSR0C">
<trunit type="tx" pin="PORTE1" register="UDR0">
<interrupt name="USART0_T" />
<trunit type="rx" pin="PORTE0">
<interrupt name="USART0_R" />
<interrupt name="USART0_U" />
Some Register name, Pin name, Interrupt name, etc. could be wrong creating a problem.
Note that adding a set of files like these you can add microcontrollers, even microcontrollers that don't exist.
The constrain is mostly in the perifericals, it must be periferical variants that are already implemented.