Hello,
I'm trying to ultimately be able to send an integer value of 45 with the below code using a uart serial port. To see if data is being sent to the uart, I'm trying to check using a serial emulator program (Terminal), but in compiling the below code, I get the following two error messages:
Error: Symbol pc multiply defined (by mbed_genie.NUCLEO_F302R8.o and main.NUCLEO_F302R8.o).
Error: Not enough information to list the image map.
What do I need to do to resolve this?
Thanks a lot,
Neil
- include "mbed.h"
Serial pc(USBTX,USBRX);
Serial uart(D1,D0, 9600);set tx and rx on the mbed
DigitalOut leddata(LED1);
void sendInt( int numberToSend ) {
char *dataStart = (char *) &numberToSend;
for (int i = 0; i < sizeof(int); i++) {
pc.putc( *(dataStart + i) );
}
} handles data send
int main()
{
while (1)
{
if (pc.writeable())
{
int datavalue = 45;/could change to include the H1/DC value in future (from ventilator) if this
sendInt(datavalue);
}
}
}
Hello,
I'm trying to ultimately be able to send an integer value of 45 with the below code using a uart serial port. To see if data is being sent to the uart, I'm trying to check using a serial emulator program (Terminal), but in compiling the below code, I get the following two error messages:
Error: Symbol pc multiply defined (by mbed_genie.NUCLEO_F302R8.o and main.NUCLEO_F302R8.o). Error: Not enough information to list the image map.
What do I need to do to resolve this?
Thanks a lot, Neil
Serial pc(USBTX,USBRX); Serial uart(D1,D0, 9600);set tx and rx on the mbed DigitalOut leddata(LED1); void sendInt( int numberToSend ) { char *dataStart = (char *) &numberToSend;
for (int i = 0; i < sizeof(int); i++) { pc.putc( *(dataStart + i) ); } } handles data send
int main() {
while (1) {
if (pc.writeable()) { int datavalue = 45;/could change to include the H1/DC value in future (from ventilator) if this sendInt(datavalue); } } }