Ask Your Question
0

Error Compiling razor_imu_9dof Firmware

asked 2018-10-24 16:18:09 -0500

Driver gravatar image

updated 2019-04-07 21:41:04 -0500

jayess gravatar image

Hi, I am new to ROS and can someone help me resolving the following issue?

Firstly, I am unable to flash the updated firmware from the /src folder through the Arduino IDE into the imu. I get the following error whenI try to flash the firmware

Error- ./arduino
Picked up JAVA_TOOL_OPTIONS: 
/home/nvidia/racecar-ws/src/razor_imu_9dof/src/Razor_AHRS/Razor_AHRS.ino: In function 'char readChar()':
Razor_AHRS:223:18: error: 'SERIAL_PORT_USBVIRTUAL' was not declared in this scope
 #define LOG_PORT SERIAL_PORT_USBVIRTUAL 
                  ^
/home/nvidia/racecar-ws/src/razor_imu_9dof/src/Razor_AHRS/Razor_AHRS.ino:626:10: note: in expansion of macro 'LOG_PORT'
   while (LOG_PORT.available() < 1) { } // Block
          ^
Razor_AHRS:223:18: error: 'SERIAL_PORT_USBVIRTUAL' was not declared in this scope
 #define LOG_PORT SERIAL_PORT_USBVIRTUAL 
                  ^
/home/nvidia/racecar-ws/src/razor_imu_9dof/src/Razor_AHRS/Razor_AHRS.ino:627:10: note: in expansion of macro 'LOG_PORT'
   return LOG_PORT.read();
          ^
/home/nvidia/racecar-ws/src/razor_imu_9dof/src/Razor_AHRS/Razor_AHRS.ino: In function 'void setup()':
Razor_AHRS:223:18: error: 'SERIAL_PORT_USBVIRTUAL' was not declared in this scope
 #define LOG_PORT SERIAL_PORT_USBVIRTUAL 
                  ^
/home/nvidia/racecar-ws/src/razor_imu_9dof/src/Razor_AHRS/Razor_AHRS.ino:633:3: note: in expansion of macro 'LOG_PORT'
   LOG_PORT.begin(OUTPUT__BAUD_RATE);
   ^
/home/nvidia/racecar-ws/src/razor_imu_9dof/src/Razor_AHRS/Razor_AHRS.ino: In function 'void loop()':
Razor_AHRS:223:18: error: 'SERIAL_PORT_USBVIRTUAL' was not declared in this scope
 #define LOG_PORT SERIAL_PORT_USBVIRTUAL 
                  ^
/home/nvidia/racecar-ws/src/razor_imu_9dof/src/Razor_AHRS/Razor_AHRS.ino:677:7: note: in expansion of macro 'LOG_PORT'
   if (LOG_PORT.available() >= 1)
       ^
/home/nvidia/racecar-ws/src/razor_imu_9dof/src/Razor_AHRS/Output.ino: In function 'void output_angles()':
Razor_AHRS:223:18: error: 'SERIAL_PORT_USBVIRTUAL' was not declared in this scope
 #define LOG_PORT SERIAL_PORT_USBVIRTUAL 
                  ^
/home/nvidia/racecar-ws/src/razor_imu_9dof/src/Razor_AHRS/Output.ino:12:5: note: in expansion of macro 'LOG_PORT'
     LOG_PORT.write((byte*) ypr, 12);  // No new-line
     ^
Razor_AHRS:223:18: error: 'SERIAL_PORT_USBVIRTUAL' was not declared in this scope
 #define LOG_PORT SERIAL_PORT_USBVIRTUAL 
                  ^
/home/nvidia/racecar-ws/src/razor_imu_9dof/src/Razor_AHRS/Output.ino:16:5: note: in expansion of macro 'LOG_PORT'
     LOG_PORT.print("#YPR=");
     ^
/home/nvidia/racecar-ws/src/razor_imu_9dof/src/Razor_AHRS/Output.ino: In function 'void output_calibration(int)':
Razor_AHRS:223:18: error: 'SERIAL_PORT_USBVIRTUAL' was not declared in this scope
 #define LOG_PORT SERIAL_PORT_USBVIRTUAL 
                  ^
/home/nvidia/racecar-ws/src/razor_imu_9dof/src/Razor_AHRS/Output.ino:28:5: note: in expansion of macro 'LOG_PORT'
     LOG_PORT.print("accel x,y,z (min/max) = ");
     ^
Razor_AHRS:223:18: error: 'SERIAL_PORT_USBVIRTUAL' was not declared in this scope
 #define LOG_PORT SERIAL_PORT_USBVIRTUAL 
                  ^
/home/nvidia/racecar-ws/src/razor_imu_9dof/src/Razor_AHRS/Output.ino:42:5: note: in expansion of macro 'LOG_PORT'
     LOG_PORT.print("magn x,y,z (min/max) = ");
     ^
Razor_AHRS:223:18: error: 'SERIAL_PORT_USBVIRTUAL' was not declared in this scope
 #define LOG_PORT SERIAL_PORT_USBVIRTUAL 
                  ^
/home/nvidia/racecar-ws/src/razor_imu_9dof/src/Razor_AHRS/Output.ino:61:5: note: in expansion of macro 'LOG_PORT'
     LOG_PORT.print("gyro x,y,z (current/average) = ");
     ^
/home/nvidia/racecar-ws/src/razor_imu_9dof/src/Razor_AHRS/Output.ino: In function 'void output_sensors_text(char)':
Razor_AHRS:223:18: error: 'SERIAL_PORT_USBVIRTUAL' was not declared in this scope
 #define LOG_PORT SERIAL_PORT_USBVIRTUAL 
                  ^
/home/nvidia/racecar-ws/src/razor_imu_9dof/src/Razor_AHRS/Output.ino:74:3: note: in expansion of macro 'LOG_PORT'
   LOG_PORT.print("#A-"); LOG_PORT.print(raw_or_calibrated); LOG_PORT.print('=');
   ^
/home/nvidia ...
(more)
edit retag flag offensive close merge delete

Comments

Please don't post screenshots of text in a terminal. Just copy-paste the text directly into your question.

gvdhoorn gravatar imagegvdhoorn ( 2018-10-25 01:24:27 -0500 )edit

Ok. I edited it

Driver gravatar imageDriver ( 2018-10-25 08:02:37 -0500 )edit

2 Answers

Sort by ยป oldest newest most voted
0

answered 2018-10-25 09:48:00 -0500

As described in the code, you have to update the code with the serial port you want the firmware to use:

// OUTPUT OPTIONS
/*****************************************************************/
// Set your serial port baud rate used to send out data here!
#define OUTPUT__BAUD_RATE 57600
#if HW__VERSION_CODE == 14001
// Set your port used to send out data here!
#define LOG_PORT SERIAL_PORT_USBVIRTUAL
#else
// Set your port used to send out data here!
#define LOG_PORT Serial
#endif // HW__VERSION_CODE

Try changing it to the default port Serial and see if that makes it compile Okay.

edit flag offensive delete link more

Comments

Can I use SerialUSB or port name and number eg: COM4 or /dev/ttyACM0 ?

Driver gravatar imageDriver ( 2018-10-25 13:10:45 -0500 )edit
0

answered 2019-04-07 21:19:50 -0500

PowerfulMing gravatar image

hey there! I just met the same problem and solved it. I think you didn't select your board correctly.

Tool -> Board -> SparkFun 9DoF Razor IMU M0

It should work! I followed this instrument.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2018-10-24 16:18:09 -0500

Seen: 337 times

Last updated: Apr 07