Trouble building ArduCopter code

I have been trying to get 2.9 to build so I can beta test and I cannot get it to compile. I have followed the Wiki and other instructions, but when I try to build I get a huge list of errors - most of which appear to be around variable declarations. It looks to me like it maybe it is not finding the libraries. This is the directory structure I have:

My Documents

     ArduPilot-Arduino-1.0.3-windows

     ardupilot-mega-9235ce36ede9

          ArducCopter

              all the source code

          libraries

              all the library files

 

I run Arduino (as Administrator, just in case), set the ardupilot-mega-9235ce36ede9 folder as the sketchbook folder and open Arducopter/ArduCopter.pde from there. This opens all the various files into tabs in the editor.

 

If I click the Verify button, I get several hundred errors (see below) - this feels like I am missing some simple step - but I am darned if I know what it might be. HELP!

Log:1190: error: 'data' was not declared in this scope
Log:1193: error: 'log_step' was not declared in this scope
Parameters.pde: In function 'void load_parameters()':
Parameters:672: error: 'micros' was not declared in this scope
commands.pde: In function 'void set_cmd_with_index(Location, int)':
commands:74: error: 'constrain' was not declared in this scope
commands.pde: In function 'int32_t get_RTL_alt()':
commands:111: error: 'min' was not declared in this scope
commands:113: error: 'min' was not declared in this scope
commands.pde: In function 'void set_next_WP(Location*)':
commands:156: error: 'max' was not declared in this scope
commands.pde: In function 'void init_home()':
commands:196: error: 'Log_Write_Cmd' was not declared in this scope
commands_logic.pde: In function 'void do_RTL()':
commands_logic:230: error: 'wp_control' was not declared in this scope
commands_logic.pde: In function 'void do_takeoff()':
commands_logic:246: error: 'wp_control' was not declared in this scope
commands_logic.pde: In function 'void do_nav_wp()':
commands_logic:264: error: 'wp_control' was not declared in this scope
commands_logic.pde: In function 'void do_land()':
commands_logic:293: error: 'wp_control' was not declared in this scope
commands_logic.pde: In function 'void do_loiter_unlimited()':
commands_logic:300: error: 'wp_control' was not declared in this scope
commands_logic.pde: In function 'void do_loiter_turns()':
commands_logic:315: error: 'wp_control' was not declared in this scope
commands_logic.pde: In function 'void do_loiter_time()':
commands_logic:342: error: 'wp_control' was not declared in this scope
commands_logic:343: error: 'millis' was not declared in this scope
commands_logic:346: error: 'wp_control' was not declared in this scope
commands_logic.pde: In function 'bool verify_nav_wp()':
commands_logic:395: error: 'millis' was not declared in this scope
commands_logic:405: error: 'wp_control' was not declared in this scope
commands_logic:407: error: 'millis' was not declared in this scope
commands_logic.pde: In function 'bool verify_loiter_unlimited()':
commands_logic:426: error: 'wp_control' was not declared in this scope
commands_logic.pde: In function 'bool verify_loiter_time()':
commands_logic:436: error: 'wp_control' was not declared in this scope
commands_logic:437: error: 'millis' was not declared in this scope
commands_logic:441: error: 'wp_control' was not declared in this scope
commands_logic:443: error: 'millis' was not declared in this scope
commands_logic.pde: In function 'bool verify_RTL()':
commands_logic:485: error: 'wp_control' was not declared in this scope
commands_logic:499: error: 'wp_control' was not declared in this scope
commands_logic:502: error: 'millis' was not declared in this scope
commands_logic:511: error: 'millis' was not declared in this scope
commands_logic:536: error: 'set_mode' was not declared in this scope
commands_logic.pde: In function 'void do_wait_delay()':
commands_logic:568: error: 'millis' was not declared in this scope
commands_logic.pde: In function 'void do_yaw()':
commands_logic:604: error: 'constrain' was not declared in this scope
commands_logic.pde: In function 'bool verify_wait_delay()':
commands_logic:622: error: 'millis' was not declared in this scope
commands_logic.pde: In function 'void do_repeat_servo()':
commands_logic:815: error: 'event_id' was not declared in this scope
commands_logic.pde: In function 'void do_repeat_relay()':
commands_logic:844: error: 'event_id' was not declared in this scope
commands_process.pde: In function 'void change_command(uint8_t)':
commands_process:9: error: 'min' was not declared in this scope
commands_process.pde: In function 'void execute_nav_command()':
commands_process:159: error: 'Log_Write_Cmd' was not declared in this scope
commands_process.pde: In function 'void exit_mission()':
commands_process:223: error: 'set_mode' was not declared in this scope
commands_process:225: error: 'set_mode' was not declared in this scope
control_modes.pde: In function 'void read_control_switch()':
control_modes:8: error: 'byte' was not declared in this scope
control_modes:8: error: expected `;' before 'switchPosition'
control_modes:10: error: 'oldSwitchPosition' was not declared in this scope
control_modes:10: error: 'switchPosition' was not declared in this scope
control_modes:18: error: 'set_mode' was not declared in this scope
control_modes.pde: At global scope:
control_modes:34: error: 'byte' does not name a type
control_modes.pde: In function 'void reset_control_switch()':
control_modes:47: error: 'oldSwitchPosition' was not declared in this scope
control_modes.pde: In function 'void read_trim_switch()':
control_modes:93: error: 'set_mode' was not declared in this scope
control_modes:116: error: 'set_mode' was not declared in this scope
control_modes:142: error: 'constrain' was not declared in this scope
control_modes.pde: In function 'void auto_trim()':
control_modes:187: error: 'led_mode' was not declared in this scope
events.pde: In function 'void failsafe_on_event()':
events:25: error: 'set_mode' was not declared in this scope
events:28: error: 'set_mode' was not declared in this scope
events:35: error: 'set_mode' was not declared in this scope
events:38: error: 'set_mode' was not declared in this scope
events:45: error: 'set_mode' was not declared in this scope
events:48: error: 'set_mode' was not declared in this scope
events.pde: In function 'void low_battery_event()':
events:76: error: 'set_mode' was not declared in this scope
events:81: error: 'set_mode' was not declared in this scope
events:84: error: 'set_mode' was not declared in this scope
events:88: error: 'set_mode' was not declared in this scope
events:101: error: 'bitRead' was not declared in this scope
events.pde: In function 'void update_events()':
events:110: error: 'millis' was not declared in this scope
events:114: error: 'millis' was not declared in this scope
events:116: error: 'event_id' was not declared in this scope
events:124: error: 'event_id' was not declared in this scope
failsafe.pde: In function 'void failsafe_enable()':
failsafe:20: error: 'micros' was not declared in this scope
leds.pde: In function 'void update_lights()':
leds:5: error: 'led_mode' was not declared in this scope
leds.pde: In function 'void update_GPS_light()':
leds:25: error: 'HIGH' was not declared in this scope
leds:25: error: 'bitWrite' was not declared in this scope
leds:25: error: 'bitWrite' was not declared in this scope
leds:25: error: 'digitalWrite' was not declared in this scope
leds:27: error: 'LOW' was not declared in this scope
leds:27: error: 'bitWrite' was not declared in this scope
leds:27: error: 'bitWrite' was not declared in this scope
leds:27: error: 'digitalWrite' was not declared in this scope
leds:35: error: 'LOW' was not declared in this scope
leds:35: error: 'bitWrite' was not declared in this scope
leds:35: error: 'bitWrite' was not declared in this scope
leds:35: error: 'digitalWrite' was not declared in this scope
leds:37: error: 'HIGH' was not declared in this scope
leds:37: error: 'bitWrite' was not declared in this scope
leds:37: error: 'bitWrite' was not declared in this scope
leds:37: error: 'digitalWrite' was not declared in this scope
leds:44: error: 'LOW' was not declared in this scope
leds:44: error: 'bitWrite' was not declared in this scope
leds:44: error: 'bitWrite' was not declared in this scope
leds:44: error: 'digitalWrite' was not declared in this scope
leds.pde: In function 'void update_motor_light()':
leds:56: error: 'HIGH' was not declared in this scope
leds:56: error: 'bitWrite' was not declared in this scope
leds:56: error: 'bitWrite' was not declared in this scope
leds:56: error: 'digitalWrite' was not declared in this scope
leds:58: error: 'LOW' was not declared in this scope
leds:58: error: 'bitWrite' was not declared in this scope
leds:58: error: 'bitWrite' was not declared in this scope
leds:58: error: 'digitalWrite' was not declared in this scope
leds:63: error: 'HIGH' was not declared in this scope
leds:63: error: 'bitWrite' was not declared in this scope
leds:63: error: 'bitWrite' was not declared in this scope
leds:63: error: 'digitalWrite' was not declared in this scope
leds.pde: In function 'void dancing_light()':
leds:70: error: 'byte' does not name a type
leds:72: error: 'step' was not declared in this scope
leds:75: error: 'step' was not declared in this scope
leds:78: error: 'LOW' was not declared in this scope
leds:78: error: 'bitWrite' was not declared in this scope
leds:78: error: 'bitWrite' was not declared in this scope
leds:78: error: 'digitalWrite' was not declared in this scope
leds:79: error: 'HIGH' was not declared in this scope
leds:79: error: 'bitWrite' was not declared in this scope
leds:79: error: 'bitWrite' was not declared in this scope
leds:79: error: 'digitalWrite' was not declared in this scope
leds:83: error: 'LOW' was not declared in this scope
leds:83: error: 'bitWrite' was not declared in this scope
leds:83: error: 'bitWrite' was not declared in this scope
leds:83: error: 'digitalWrite' was not declared in this scope
leds:84: error: 'HIGH' was not declared in this scope
leds:84: error: 'bitWrite' was not declared in this scope
leds:84: error: 'bitWrite' was not declared in this scope
leds:84: error: 'digitalWrite' was not declared in this scope
leds:88: error: 'LOW' was not declared in this scope
leds:88: error: 'bitWrite' was not declared in this scope
leds:88: error: 'bitWrite' was not declared in this scope
leds:88: error: 'digitalWrite' was not declared in this scope
leds:89: error: 'HIGH' was not declared in this scope
leds:89: error: 'bitWrite' was not declared in this scope
leds:89: error: 'bitWrite' was not declared in this scope
leds:89: error: 'digitalWrite' was not declared in this scope
leds.pde: In function 'void clear_leds()':
leds:95: error: 'LOW' was not declared in this scope
leds:95: error: 'bitWrite' was not declared in this scope
leds:95: error: 'bitWrite' was not declared in this scope
leds:95: error: 'digitalWrite' was not declared in this scope
leds:96: error: 'LOW' was not declared in this scope
leds:96: error: 'bitWrite' was not declared in this scope
leds:96: error: 'bitWrite' was not declared in this scope
leds:96: error: 'digitalWrite' was not declared in this scope
leds:97: error: 'LOW' was not declared in this scope
leds:97: error: 'bitWrite' was not declared in this scope
leds:97: error: 'bitWrite' was not declared in this scope
leds:97: error: 'digitalWrite' was not declared in this scope
leds:99: error: 'led_mode' was not declared in this scope
leds.pde: In function 'void update_copter_leds()':
leds:129: error: 'bitRead' was not declared in this scope
leds:151: error: 'bitRead' was not declared in this scope
leds:185: error: 'bitRead' was not declared in this scope
leds.pde: In function 'void copter_leds_reset()':
leds:196: error: 'LOW' was not declared in this scope
leds:196: error: 'bitWrite' was not declared in this scope
leds:196: error: 'bitWrite' was not declared in this scope
leds:196: error: 'digitalWrite' was not declared in this scope
leds:197: error: 'LOW' was not declared in this scope
leds:197: error: 'bitWrite' was not declared in this scope
leds:197: error: 'bitWrite' was not declared in this scope
leds:197: error: 'digitalWrite' was not declared in this scope
leds:198: error: 'LOW' was not declared in this scope
leds:198: error: 'bitWrite' was not declared in this scope
leds:198: error: 'bitWrite' was not declared in this scope
leds:198: error: 'digitalWrite' was not declared in this scope
leds:199: error: 'LOW' was not declared in this scope
leds:199: error: 'bitWrite' was not declared in this scope
leds:199: error: 'bitWrite' was not declared in this scope
leds:199: error: 'digitalWrite' was not declared in this scope
leds:200: error: 'LOW' was not declared in this scope
leds:200: error: 'bitWrite' was not declared in this scope
leds:200: error: 'bitWrite' was not declared in this scope
leds:200: error: 'digitalWrite' was not declared in this scope
leds:201: error: 'LOW' was not declared in this scope
leds:201: error: 'bitWrite' was not declared in this scope
leds:201: error: 'bitWrite' was not declared in this scope
leds:201: error: 'digitalWrite' was not declared in this scope
leds:202: error: 'LOW' was not declared in this scope
leds:202: error: 'bitWrite' was not declared in this scope
leds:202: error: 'bitWrite' was not declared in this scope
leds:202: error: 'digitalWrite' was not declared in this scope
leds:203: error: 'LOW' was not declared in this scope
leds:203: error: 'bitWrite' was not declared in this scope
leds:203: error: 'bitWrite' was not declared in this scope
leds:203: error: 'digitalWrite' was not declared in this scope
leds.pde: In function 'void copter_leds_on()':
leds:207: error: 'bitRead' was not declared in this scope
leds:208: error: 'HIGH' was not declared in this scope
leds:208: error: 'bitWrite' was not declared in this scope
leds:208: error: 'bitWrite' was not declared in this scope
leds:208: error: 'digitalWrite' was not declared in this scope
leds:215: error: 'HIGH' was not declared in this scope
leds:215: error: 'bitWrite' was not declared in this scope
leds:215: error: 'bitWrite' was not declared in this scope
leds:215: error: 'digitalWrite' was not declared in this scope
leds:217: error: 'bitRead' was not declared in this scope
leds:218: error: 'HIGH' was not declared in this scope
leds:218: error: 'bitWrite' was not declared in this scope
leds:218: error: 'bitWrite' was not declared in this scope
leds:218: error: 'digitalWrite' was not declared in this scope
leds:220: error: 'HIGH' was not declared in this scope
leds:220: error: 'bitWrite' was not declared in this scope
leds:220: error: 'bitWrite' was not declared in this scope
leds:220: error: 'digitalWrite' was not declared in this scope
leds:221: error: 'HIGH' was not declared in this scope
leds:221: error: 'bitWrite' was not declared in this scope
leds:221: error: 'bitWrite' was not declared in this scope
leds:221: error: 'digitalWrite' was not declared in this scope
leds:222: error: 'HIGH' was not declared in this scope
leds:222: error: 'bitWrite' was not declared in this scope
leds:222: error: 'bitWrite' was not declared in this scope
leds:222: error: 'digitalWrite' was not declared in this scope
leds:223: error: 'HIGH' was not declared in this scope
leds:223: error: 'bitWrite' was not declared in this scope
leds:223: error: 'bitWrite' was not declared in this scope
leds:223: error: 'digitalWrite' was not declared in this scope
leds:224: error: 'HIGH' was not declared in this scope
leds:224: error: 'bitWrite' was not declared in this scope
leds:224: error: 'bitWrite' was not declared in this scope
leds:224: error: 'digitalWrite' was not declared in this scope
leds.pde: In function 'void copter_leds_off()':
leds:228: error: 'bitRead' was not declared in this scope
leds:229: error: 'LOW' was not declared in this scope
leds:229: error: 'bitWrite' was not declared in this scope
leds:229: error: 'bitWrite' was not declared in this scope
leds:229: error: 'digitalWrite' was not declared in this scope
leds:236: error: 'LOW' was not declared in this scope
leds:236: error: 'bitWrite' was not declared in this scope
leds:236: error: 'bitWrite' was not declared in this scope
leds:236: error: 'digitalWrite' was not declared in this scope
leds:238: error: 'bitRead' was not declared in this scope
leds:239: error: 'LOW' was not declared in this scope
leds:239: error: 'bitWrite' was not declared in this scope
leds:239: error: 'bitWrite' was not declared in this scope
leds:239: error: 'digitalWrite' was not declared in this scope
leds:241: error: 'LOW' was not declared in this scope
leds:241: error: 'bitWrite' was not declared in this scope
leds:241: error: 'bitWrite' was not declared in this scope
leds:241: error: 'digitalWrite' was not declared in this scope
leds:242: error: 'LOW' was not declared in this scope
leds:242: error: 'bitWrite' was not declared in this scope
leds:242: error: 'bitWrite' was not declared in this scope
leds:242: error: 'digitalWrite' was not declared in this scope
leds:243: error: 'LOW' was not declared in this scope
leds:243: error: 'bitWrite' was not declared in this scope
leds:243: error: 'bitWrite' was not declared in this scope
leds:243: error: 'digitalWrite' was not declared in this scope
leds:244: error: 'LOW' was not declared in this scope
leds:244: error: 'bitWrite' was not declared in this scope
leds:244: error: 'bitWrite' was not declared in this scope
leds:244: error: 'digitalWrite' was not declared in this scope
leds:245: error: 'LOW' was not declared in this scope
leds:245: error: 'bitWrite' was not declared in this scope
leds:245: error: 'bitWrite' was not declared in this scope
leds:245: error: 'digitalWrite' was not declared in this scope
leds.pde: In function 'void copter_leds_slow_blink()':
leds:249: error: 'copter_leds_motor_blink' was not declared in this scope
leds:252: error: 'bitRead' was not declared in this scope
leds.pde: In function 'void copter_leds_fast_blink()':
leds:262: error: 'copter_leds_motor_blink' was not declared in this scope
leds.pde: In function 'void copter_leds_oscillate()':
leds:273: error: 'copter_leds_motor_blink' was not declared in this scope
leds:275: error: 'bitRead' was not declared in this scope
leds:276: error: 'HIGH' was not declared in this scope
leds:276: error: 'bitWrite' was not declared in this scope
leds:276: error: 'bitWrite' was not declared in this scope
leds:276: error: 'digitalWrite' was not declared in this scope
leds:283: error: 'HIGH' was not declared in this scope
leds:283: error: 'bitWrite' was not declared in this scope
leds:283: error: 'bitWrite' was not declared in this scope
leds:283: error: 'digitalWrite' was not declared in this scope
leds:285: error: 'bitRead' was not declared in this scope
leds:286: error: 'LOW' was not declared in this scope
leds:286: error: 'bitWrite' was not declared in this scope
leds:286: error: 'bitWrite' was not declared in this scope
leds:286: error: 'digitalWrite' was not declared in this scope
leds:288: error: 'LOW' was not declared in this scope
leds:288: error: 'bitWrite' was not declared in this scope
leds:288: error: 'bitWrite' was not declared in this scope
leds:288: error: 'digitalWrite' was not declared in this scope
leds:289: error: 'HIGH' was not declared in this scope
leds:289: error: 'bitWrite' was not declared in this scope
leds:289: error: 'bitWrite' was not declared in this scope
leds:289: error: 'digitalWrite' was not declared in this scope
leds:290: error: 'HIGH' was not declared in this scope
leds:290: error: 'bitWrite' was not declared in this scope
leds:290: error: 'bitWrite' was not declared in this scope
leds:290: error: 'digitalWrite' was not declared in this scope
leds:291: error: 'LOW' was not declared in this scope
leds:291: error: 'bitWrite' was not declared in this scope
leds:291: error: 'bitWrite' was not declared in this scope
leds:291: error: 'digitalWrite' was not declared in this scope
leds:292: error: 'LOW' was not declared in this scope
leds:292: error: 'bitWrite' was not declared in this scope
leds:292: error: 'bitWrite' was not declared in this scope
leds:292: error: 'digitalWrite' was not declared in this scope
leds:294: error: 'bitRead' was not declared in this scope
leds:295: error: 'LOW' was not declared in this scope
leds:295: error: 'bitWrite' was not declared in this scope
leds:295: error: 'bitWrite' was not declared in this scope
leds:295: error: 'digitalWrite' was not declared in this scope
leds:302: error: 'LOW' was not declared in this scope
leds:302: error: 'bitWrite' was not declared in this scope
leds:302: error: 'bitWrite' was not declared in this scope
leds:302: error: 'digitalWrite' was not declared in this scope
leds:304: error: 'bitRead' was not declared in this scope
leds:305: error: 'HIGH' was not declared in this scope
leds:305: error: 'bitWrite' was not declared in this scope
leds:305: error: 'bitWrite' was not declared in this scope
leds:305: error: 'digitalWrite' was not declared in this scope
leds:307: error: 'HIGH' was not declared in this scope
leds:307: error: 'bitWrite' was not declared in this scope
leds:307: error: 'bitWrite' was not declared in this scope
leds:307: error: 'digitalWrite' was not declared in this scope
leds:308: error: 'LOW' was not declared in this scope
leds:308: error: 'bitWrite' was not declared in this scope
leds:308: error: 'bitWrite' was not declared in this scope
leds:308: error: 'digitalWrite' was not declared in this scope
leds:309: error: 'LOW' was not declared in this scope
leds:309: error: 'bitWrite' was not declared in this scope
leds:309: error: 'bitWrite' was not declared in this scope
leds:309: error: 'digitalWrite' was not declared in this scope
leds:310: error: 'HIGH' was not declared in this scope
leds:310: error: 'bitWrite' was not declared in this scope
leds:310: error: 'bitWrite' was not declared in this scope
leds:310: error: 'digitalWrite' was not declared in this scope
leds:311: error: 'HIGH' was not declared in this scope
leds:311: error: 'bitWrite' was not declared in this scope
leds:311: error: 'bitWrite' was not declared in this scope
leds:311: error: 'digitalWrite' was not declared in this scope
leds.pde: In function 'void copter_leds_GPS_on()':
leds:319: error: 'HIGH' was not declared in this scope
leds:319: error: 'bitWrite' was not declared in this scope
leds:319: error: 'bitWrite' was not declared in this scope
leds:319: error: 'digitalWrite' was not declared in this scope
leds.pde: In function 'void copter_leds_GPS_off()':
leds:323: error: 'LOW' was not declared in this scope
leds:323: error: 'bitWrite' was not declared in this scope
leds:323: error: 'bitWrite' was not declared in this scope
leds:323: error: 'digitalWrite' was not declared in this scope
leds.pde: In function 'void copter_leds_GPS_slow_blink()':
leds:327: error: 'copter_leds_GPS_blink' was not declared in this scope
leds:330: error: 'bitRead' was not declared in this scope
leds.pde: In function 'void copter_leds_GPS_fast_blink()':
leds:340: error: 'copter_leds_GPS_blink' was not declared in this scope
leds.pde: In function 'void copter_leds_aux_off()':
leds:350: error: 'LOW' was not declared in this scope
leds:350: error: 'bitWrite' was not declared in this scope
leds:350: error: 'bitWrite' was not declared in this scope
leds:350: error: 'digitalWrite' was not declared in this scope
leds.pde: In function 'void copter_leds_aux_on()':
leds:354: error: 'HIGH' was not declared in this scope
leds:354: error: 'bitWrite' was not declared in this scope
leds:354: error: 'bitWrite' was not declared in this scope
leds:354: error: 'digitalWrite' was not declared in this scope
leds.pde: In function 'void piezo_on()':
leds:358: error: 'HIGH' was not declared in this scope
leds:358: error: 'bitWrite' was not declared in this scope
leds:358: error: 'bitWrite' was not declared in this scope
leds:358: error: 'digitalWrite' was not declared in this scope
leds.pde: In function 'void piezo_off()':
leds:362: error: 'LOW' was not declared in this scope
leds:362: error: 'bitWrite' was not declared in this scope
leds:362: error: 'bitWrite' was not declared in this scope
leds:362: error: 'digitalWrite' was not declared in this scope
leds.pde: In function 'void piezo_beep()':
leds:367: error: 'delay' was not declared in this scope
limits.pde: In function 'void limits_loop()':
limits:53: error: 'millis' was not declared in this scope
limits:129: error: 'millis' was not declared in this scope
limits:140: error: 'millis' was not declared in this scope
limits:173: error: 'millis' was not declared in this scope
limits:195: error: 'class AP_Limits' has no member named 'old_mode_switch'
limits:195: error: 'oldSwitchPosition' was not declared in this scope
limits:196: error: 'class AP_Limits' has no member named 'old_mode_switch'
limits:216: error: 'millis' was not declared in this scope
limits:229: error: 'class AP_Limits' has no member named 'old_mode_switch'
limits:229: error: 'oldSwitchPosition' was not declared in this scope
limits:259: error: 'set_mode' was not declared in this scope
limits:260: error: 'millis' was not declared in this scope
limits:286: error: 'millis' was not declared in this scope
limits:288: error: 'set_mode' was not declared in this scope
limits:297: error: 'millis' was not declared in this scope
limits:301: error: 'set_mode' was not declared in this scope
limits:324: error: 'millis' was not declared in this scope
limits:331: error: 'set_mode' was not declared in this scope
limits.pde: In function 'void limits_send_mavlink_status(mavlink_channel_t)':
limits:347: error: 'millis' was not declared in this scope
motors.pde: In function 'void init_arm_motors()':
motors:123: error: 'bitRead' was not declared in this scope
motors:125: error: 'delay' was not declared in this scope
motors:157: error: 'HIGH' was not declared in this scope
motors:157: error: 'digitalWrite' was not declared in this scope
motors.pde: In function 'void init_disarm_motors()':
motors:198: error: 'bitRead' was not declared in this scope
navigation.pde: In function 'void update_navigation()':
navigation:16: error: 'millis' was not declared in this scope
navigation:20: error: 'min' was not declared in this scope
navigation:66: error: 'millis' was not declared in this scope
navigation.pde: In function 'void run_navigation_contollers()':
navigation:184: error: 'set_mode' was not declared in this scope
navigation:242: error: 'wp_control' was not declared in this scope
navigation:253: error: 'wp_control' was not declared in this scope
navigation:268: error: 'wp_control' was not declared in this scope
navigation.pde: In function 'void update_nav_wp()':
navigation:297: error: 'wp_control' was not declared in this scope
navigation:360: error: 'constrain' was not declared in this scope
navigation.pde: In function 'void calc_loiter(int16_t, int16_t)':
navigation:480: error: 'constrain' was not declared in this scope
navigation.pde: In function 'void calc_nav_rate(int16_t)':
navigation:545: error: 'constrain' was not declared in this scope
navigation.pde: In function 'int16_t get_desired_speed(int16_t)':
navigation:616: error: 'min' was not declared in this scope
navigation:620: error: 'min' was not declared in this scope
navigation:621: error: 'max' was not declared in this scope
navigation.pde: In function 'int32_t get_yaw_slew(int32_t, int32_t, int16_t)':
navigation:735: error: 'constrain' was not declared in this scope
radio.pde: In function 'void init_rc_out()':
radio:71: error: 'byte' was not declared in this scope
radio:71: error: expected `;' before 'i'
radio:71: error: 'i' was not declared in this scope
radio:72: error: 'delay' was not declared in this scope
radio:95: error: 'delay' was not declared in this scope
radio.pde: In function 'void read_radio()':
radio:146: error: 'min' was not declared in this scope
radio:150: error: 'millis' was not declared in this scope
radio.pde: In function 'void trim_radio()':
radio:203: error: 'byte' was not declared in this scope
radio:203: error: expected `;' before 'i'
radio:203: error: 'i' was not declared in this scope
sensors.pde: In function 'void read_receiver_rssi()':
sensors:144: error: 'constrain' was not declared in this scope
setup.pde: In function 'int8_t setup_mode(uint8_t, const Menu::arg*)':
setup:72: error: 'delay' was not declared in this scope
setup.pde: In function 'int8_t setup_factory(uint8_t, const Menu::arg*)':
setup:133: error: 'delay' was not declared in this scope
setup.pde: In function 'int8_t setup_radio(uint8_t, const Menu::arg*)':
setup:151: error: 'delay' was not declared in this scope
setup:158: error: 'delay' was not declared in this scope
setup:194: error: 'delay' was not declared in this scope
setup.pde: In function 'int8_t setup_motors(uint8_t, const Menu::arg*)':
setup:237: error: 'delay' was not declared in this scope
setup.pde: In function 'int8_t setup_accel(uint8_t, const Menu::arg*)':
setup:252: error: 'delay' was not declared in this scope
setup.pde: In function 'void setup_printf_P(const prog_char_t*, ...)':
setup:267: error: invalid conversion from 'void*' to 'int'
setup:267: error: initializing argument 2 of 'void BetterStream::vprintf_P(const prog_char_t*, int)'
setup.pde: In function 'void setup_wait_key()':
setup:275: error: 'delay' was not declared in this scope
setup.pde: In function 'int8_t setup_accel_scale(uint8_t, const Menu::arg*)':
setup:290: error: 'delay' was not declared in this scope
setup.pde: In function 'int8_t setup_flightmodes(uint8_t, const Menu::arg*)':
setup:320: error: 'byte' was not declared in this scope
setup:320: error: expected `;' before '_switchPosition'
setup:321: error: expected `;' before '_oldSwitchPosition'
setup:328: error: 'delay' was not declared in this scope
setup:330: error: '_switchPosition' was not declared in this scope
setup:330: error: 'readSwitch' was not declared in this scope
setup:334: error: '_oldSwitchPosition' was not declared in this scope
setup:337: error: 'constrain' was not declared in this scope
setup:340: error: 'print_switch' was not declared in this scope
setup:356: error: 'print_switch' was not declared in this scope
setup:364: error: 'print_switch' was not declared in this scope
setup:372: error: 'print_switch' was not declared in this scope
setup.pde: In function 'int8_t setup_declination(uint8_t, const Menu::arg*)':
setup:392: error: 'radians' was not declared in this scope
setup.pde: At global scope:
setup:784: error: variable or field 'report_wp' declared void
setup:784: error: 'byte' was not declared in this scope
ArduCopter.pde:204: warning: 'int16_t get_heli_rate_roll(int32_t)' declared 'static' but never defined
ArduCopter.pde:206: warning: 'int16_t get_heli_rate_pitch(int32_t)' declared 'static' but never defined
ArduCopter.pde:208: warning: 'int16_t get_heli_rate_yaw(int32_t)' declared 'static' but never defined
ArduCopter.pde:258: warning: 'void send_simstate(mavlink_channel_t)' declared 'static' but never defined
GCS_Mavlink.pde:2107: warning: 'void gcs_send_text(gcs_severity, const char*)' defined but not used
Log.pde:873: warning: 'void Log_Write_Startup()' defined but not used
Log.pde:904: warning: 'void Log_Write_Data(uint8_t, float)' defined but not used
Log.pde:915: warning: 'void Log_Write_Data(uint8_t, int16_t)' defined but not used
Log.pde:1016: warning: 'void Log_Write_DMP()' defined but not used
Parameters.pde:633: warning: 'void load_parameters()' defined but not used
leds.pde:93: warning: 'void clear_leds()' defined but not used
navigation.pde:646: warning: 'void force_new_altitude(int32_t)' defined but not used
radio.pde:21: warning: 'void init_rc_in()' defined but not used
radio.pde:61: warning: 'void init_rc_out()' defined but not used
sensors.pde:6: warning: 'void ReadSCP1000()' defined but not used
sensors.pde:10: warning: 'void init_sonar()' defined but not used
ArduCopter.pde:498: warning: 'void report_sonar()' declared 'static' but never defined
ArduCopter.pde:499: warning: 'void report_frame()' declared 'static' but never defined
ArduCopter.pde:500: warning: 'void report_radio()' declared 'static' but never defined
ArduCopter.pde:501: warning: 'void report_ins()' declared 'static' but never defined
ArduCopter.pde:502: warning: 'void report_compass()' declared 'static' but never defined
ArduCopter.pde:503: warning: 'void report_flight_modes()' declared 'static' but never defined
ArduCopter.pde:505: warning: 'void report_heli()' declared 'static' but never defined
ArduCopter.pde:506: warning: 'void report_gyro()' declared 'static' but never defined
ArduCopter.pde:508: warning: 'void print_radio_values()' declared 'static' but never defined
ArduCopter.pde:512: warning: 'void print_done()' declared 'static' but never defined
ArduCopter.pde:513: warning: 'void zero_eeprom()' declared 'static' but never defined
ArduCopter.pde:515: warning: 'void print_accel_offsets_and_scaling()' declared 'static' but never defined
ArduCopter.pde:517: warning: 'void print_gyro_offsets()' declared 'static' but never defined
ArduCopter.pde:519: warning: 'RC_Channel* heli_get_servo(int16_t)' declared 'static' but never defined
ArduCopter.pde:520: warning: 'int16_t read_num_from_serial()' declared 'static' but never defined
ArduCopter.pde:522: warning: 'void print_blanks(int16_t)' declared 'static' but never defined
ArduCopter.pde:524: warning: 'void print_divider()' declared 'static' but never defined
ArduCopter.pde:525: warning: 'void print_enabled(bool)' declared 'static' but never defined
ArduCopter.pde:527: warning: 'void init_esc()' declared 'static' but never defined
ArduCopter.pde:528: warning: 'void print_wp(Location*, int)' declared 'static' but never defined
ArduCopter.pde:529: warning: 'void report_version()' declared 'static' but never defined
ArduCopter.pde:530: warning: 'void report_tuning()' declared 'static' but never defined
ArduCopter.pde:531: warning: 'void run_cli(FastSerial*)' declared 'static' but never defined
ArduCopter.pde:532: warning: 'void init_ardupilot()' declared 'static' but never defined
ArduCopter.pde:533: warning: 'void startup_ground()' declared 'static' but never defined
ArduCopter.pde:536: warning: 'void init_simple_bearing()' declared 'static' but never defined
ArduCopter.pde:539: warning: 'uint32_t map_baudrate(int8_t, uint32_t)' declared 'static' but never defined
ArduCopter.pde:540: warning: 'void check_usb_mux()' declared 'static' but never defined
ArduCopter.pde:543: warning: 'void reboot_apm()' declared 'static' but never defined
ArduCopter.pde:545: warning: 'void print_flight_mode(uint8_t)' declared 'static' but never defined
ArduCopter.pde:546: warning: 'void print_hit_enter()' declared 'static' but never defined
ArduCopter.pde:547: warning: 'void print_test_disabled()' declared 'static' but never defined
ArduCopter.pde:673: warning: 'climb_rate_actual' defined but not used
ArduCopter.pde:675: warning: 'climb_rate_error' defined but not used
ArduCopter.pde:688: warning: 'saved_toy_throttle' defined but not used
ArduCopter.pde:798: warning: 'yaw_timer' defined but not used
Log.pde:223: warning: 'int8_t process_logs(uint8_t, const Menu::arg*)' defined but not used
setup.pde:61: warning: 'int8_t setup_mode(uint8_t, const Menu::arg*)' defined but not used

You need to be a member of diydrones to add comments!

Join diydrones

Email me when people reply –

Replies

  • I get a lot of errors and I did all of the suggestions from this page but I couldn't solve the problem. Could you please help me?

  • I'm also having the same problem with apm version 3.2.1 but didn't get any solution to this problem........
  • Is there any resolution on this? I also get these errors when trying to compile with the Arduino.app from ArduPilot-Arduino-1.0.3-Mac.zip on the download site. I also suspected the Exclude Core directive, and I'm about to go downgrade to 1.0.2 to see if that works.

  • Admin

    Hi All,

    I have had no problems using the ArduPilot version of the Arduino IDE 1.0.3 to compile the latest ArduRover code from the Git. I did have to have the ArduPilot libraries and the ArduRover2 code in the same root directory as the ArduPilot IDE 1.0.3. Also, you need to restart ArduPilot IDE 1.0.3 after using the "Ardupilot" function in the IDE header to select the correct "HAL" configuration.

    Just a thought.

    Regards,

    TCIII

  • Got it. Was unable to compile anything with the version on the ArduPilot Mega repsoitory, but was able to get it all working using the regular version from the Arduino site. I believe there is some setting in the version form ArduPilot that is settign it to not find the core libraries,

  • OK - this might tell us something - Tried just building one of the sample files form the regular examples. Get s imilar set of errors - maybe this means somethign?

     

    Building for ArduPilot Mega 2.x
    Excluding arduino core from include paths
    C:\Program Files\ArduPilot-Arduino-1.0.3-windows\hardware\tools\avr\bin\avr-g++ -c -g -Os -Wall -fno-exceptions -ffunction-sections -fdata-sections -mmcu=atmega2560 -DF_CPU=16000000L -MMD -DUSB_VID=null -DUSB_PID=null -DARDUINO=103 -mcall-prologues -DCONFIG_HAL_BOARD=HAL_BOARD_APM2 -DEXCLUDECORE C:\Users\Scott\AppData\Local\Temp\build7167297065052772048.tmp\AnalogReadSerial.cpp -o C:\Users\Scott\AppData\Local\Temp\build7167297065052772048.tmp\AnalogReadSerial.cpp.o
    AnalogReadSerial.ino:10:21: error: Arduino.h: No such file or directory
    AnalogReadSerial.ino: In function 'void setup()':
    AnalogReadSerial:12: error: 'Serial' was not declared in this scope
    AnalogReadSerial.ino: In function 'void loop()':
    AnalogReadSerial:18: error: 'A0' was not declared in this scope
    AnalogReadSerial:18: error: 'analogRead' was not declared in this scope
    AnalogReadSerial:20: error: 'Serial' was not declared in this scope
    AnalogReadSerial:21: error: 'delay' was not declared in this scope

  • Just tried it on a different PC which had never had Arduino on it and then on a Mac. Got he same results on both so obviously I am screwing something up.

     

    Downloaded V1.03 of Arduino from the ArduPilot downloads area

    Unzipped it

    Downloaded RC4

    Unzipped it

    Set it up so that I have an Arducopter29 folder within which is Arducopter folder and Libraries Folder

    Run Arduino

    Set pref to see the Arducopter29 folder as the sketchbook folder

    Quit Arduino

    Run Arduino

    Set board to ArduPilot Mega 2.x

    Click Verify

    Boom.

     

     

  • I had given up on using the Arduino compiler for about 8 months because I had constant trouble with the libraries, the advances in the Mission planner features made compiling sketches unnecessary anyways, a tleast for 8 months....

    In fact the latest version still won't even compile Ardustation, I have gone back to the "Relax" version.

    A few months ago I resolved to make it work, I deleted everthing to do with Arduino from my computer.

    I re-read all the instructions & followed them to the letter as best as I can tell.

    After many fruitless attempts to get APM to compile, I tried the older "relax" version again, and I successfully compiled Ardustation. 

    So I then made a new set of folders where I copied all the library files and named the folder Ardustation.

    I have repeated this for APM 2.68  & APM 2.28.

    Now when I want to work on one of these sketches, I delete the current library files & drag'n drop the files from the required folder.  All the library collections that I have made include the set of default libraries that came with Arduino.

    This isn't the best way to do it, but it has ended the chaos.

    In fact I'm not even sure if it is possible to have libraries for all the different sketches actively available at the same time.

    I had thought, for a time , that I could just have a sub folder in the libraries directory with the library files for each of the sketches?

    The first time I used Arduino, APM was still beta, and everything worked perfectly, I guess that experience kept me from learning how to troubleshoot Arduino.

  • 3D Robotics

    Yes, it's not finding your libraries. Please follow the instructions here exactly, with the same directories, and you should be fine. 

    Also make sure you're selecting the right board (Arduino Mega 2560)

This reply was deleted.

Activity

Neville Rodrigues liked Neville Rodrigues's profile
Jun 30
Santiago Perez liked Santiago Perez's profile
Jun 21
More…