File tree Expand file tree Collapse file tree 2 files changed +17
-2
lines changed Expand file tree Collapse file tree 2 files changed +17
-2
lines changed Original file line number Diff line number Diff line change @@ -16,8 +16,15 @@ if (config_h_lines)
16
16
set (ARDUINO_AVR_MEGA_MENU_CPU_ATMEGA2560 TRUE )
17
17
else (config_h_lines)
18
18
set (ARDUINO_BOARD "Arduino Nano [avr.nano]" )
19
- set (ARDUINO_AVR_NANO_MENU_CPU_ATMEGA328 TRUE )
19
+
20
+ option (OLD_BOOTLOADER "Arduino Nano uses old bootloader (57600 baud)" OFF )
21
+ if (OLD_BOOTLOADER)
22
+ set (ARDUINO_AVR_NANO_MENU_CPU_ATMEGA328OLD TRUE )
23
+ else (OLD_BOOTLOADER)
24
+ set (ARDUINO_AVR_NANO_MENU_CPU_ATMEGA328 TRUE )
25
+ endif (OLD_BOOTLOADER)
20
26
endif (config_h_lines)
27
+ set (ARDUINO_PROGRAMMER "Arduino as ISP [avr.arduinoasisp]" )
21
28
22
29
cmake_minimum_required (VERSION 3.7.0)
23
30
project (Pedelec_Controller C CXX)
Original file line number Diff line number Diff line change @@ -12,6 +12,14 @@ Note: Linux only for now. Windows support is untested.
12
12
cd build
13
13
cmake ../
14
14
15
+ Most likely you will have to give the Arduino install path:
16
+ cmake -DARDUINO_INSTALL_PATH=/tmp ../
17
+
18
+ If you have a FC before 2.x and the Arduino Nano uses
19
+ the old bootloader (57600 baud), use this option:
20
+
21
+ cmake cmake -DARDUINO_INSTALL_PATH=/tmp -DOLD_BOOTLOADER=ON ../
22
+
15
23
2. Compile
16
24
17
25
cd build
@@ -20,4 +28,4 @@ Note: Linux only for now. Windows support is untested.
20
28
3. Upload
21
29
22
30
cd build
23
- make pcontroller- upload
31
+ make upload-pcontroller SERIAL_PORT=/dev/ttyUSB0
You can’t perform that action at this time.
0 commit comments