B4R Question serial communication with Arduino DUE

newbie

Member
Licensed User
Longtime User
Hello,

this simple code gives me a error
.....
OK.
Boards werden vorbereitet...
Überprüfungsvorgang...
C:\Users\nobody\AppData\Local\Temp\_tc\VDRIVE\Objects\bin\sketch\AsyncStreams.cpp.o: In function `B4R::AsyncStreams::checkForData(void*)':
C:\Users\nobody\AppData\Local\Temp\_tc\VDRIVE\Objects\src/AsyncStreams.cpp:37: undefined reference to `operator new(unsigned int, void*)'
collect2.exe: error: ld returned 1 exit status
exit status 1
......


when i build the project.
Has anybody a suggestion ??

Thanks.

Code:
#Region Project Attributes
    #AutoFlushLogs: True
    #CheckArrayBounds: True
    #StackBufferSize: 300
#End Region
'Ctrl+Click to open the C code folder: ide://run?File=%WINDIR%\System32\explorer.exe&Args=%PROJECT%\Objects\Src

Sub Process_Globals
    Public Serial1 As Serial
    Private stream1 As AsyncStreams
    Private SerialNative1 As Stream
End Sub

Private Sub AppStart
    Serial1.Initialize(115200)
    Log("AppStart")
  
  
    RunNative("SerialNative1", Null)
    stream1.Initialize(SerialNative1, "VDRIVE_NewData", Null)
  
    SendData
End Sub



Sub SendData
'    stream1.Write("DIR".GetBytes)
'    stream1.Write(Array As Byte(13))
End Sub

Sub VDRIVE_NewData (Buffer() As Byte)
    Log("Received from VDRIVE: -------------")
    Log(Buffer)
    Log("----------------------------------")
 
End Sub

#if C
void SerialNative1(B4R::Object* unused) {
   ::Serial1.begin(9600);
  b4r_main::_serialnative1->wrappedStream = &::Serial1;
}
#end if
 

Mark Read

Well-Known Member
Licensed User
Longtime User
Just to clarify, for me. Why are you intialising the serial port with two different baudrates?
 
Upvote 0
Top