1
1
#! groovy
2
2
def buildArduino (config , String buildFlags , String sketch , String key ) {
3
- def root = ' /opt/arduino-1.8.2 /'
3
+ def root = ' /opt/arduino-1.8.5 /'
4
4
if (config. nightly_arduino_ide)
5
5
{
6
6
root = ' /opt/arduino-nightly/'
7
7
}
8
- def esp8266_tools = ' /opt/arduino-nightly/hardware/esp8266com/esp8266/tools'
8
+ // def esp8266_tools = '/opt/arduino-nightly/hardware/esp8266com/esp8266/tools'
9
9
def jenkins_root = ' /var/lib/jenkins/'
10
10
def builder = root+ ' arduino-builder'
11
- def standard_args = ' -warnings=" all" ' // -verbose=true
11
+ def standard_args = ' -warnings=all' // -verbose=true
12
12
def builder_specifics = ' -hardware ' + root+ ' hardware -tools ' + root+ ' hardware/tools/avr -tools ' +
13
- root+ ' tools-builder -tools ' + esp8266_tools + ' - built-in-libraries ' + root+ ' libraries'
13
+ root+ ' tools-builder -built-in-libraries ' + root+ ' libraries'
14
14
def jenkins_packages = jenkins_root+ ' .arduino15/packages'
15
15
def site_specifics = ' -hardware ' + jenkins_packages+ ' -tools ' + jenkins_packages
16
16
def repo_specifics = ' -hardware hardware -libraries . '
@@ -41,7 +41,7 @@ def parseWarnings(String key) {
41
41
}
42
42
43
43
def buildMySensorsMicro (config , sketches , String key ) {
44
- def fqbn = ' -fqbn MySensors:avr:MysensorsMicro -prefs build.f_cpu=1000000 -prefs build.mcu=atmega328p '
44
+ def fqbn = ' -fqbn= MySensors:avr:MysensorsMicro:cpu=1Mhz '
45
45
config. pr. setBuildStatus(config, ' PENDING' , ' Toll gate (MySensorsMicro - ' + key+ ' )' , ' Building...' , ' ${BUILD_URL}flowGraphTable/' )
46
46
try {
47
47
for (sketch = 0 ; sketch < sketches. size(); sketch++ ) {
@@ -75,7 +75,7 @@ def buildMySensorsMicro(config, sketches, String key) {
75
75
}
76
76
77
77
def buildMySensorsGw (config , sketches , String key ) {
78
- def fqbn = ' -fqbn MySensors:samd:mysensors_gw_native -prefs build.f_cpu=48000000 -prefs build.mcu=cortex-m0plus '
78
+ def fqbn = ' -fqbn MySensors:samd:mysensors_gw_native'
79
79
config. pr. setBuildStatus(config, ' PENDING' , ' Toll gate (MySensorsGW - ' + key+ ' )' , ' Building...' , ' ${BUILD_URL}flowGraphTable/' )
80
80
try {
81
81
for (sketch = 0 ; sketch < sketches. size(); sketch++ ) {
@@ -88,15 +88,15 @@ def buildMySensorsGw(config, sketches, String key) {
88
88
sketches[sketch]. path != config. library_root+ ' examples/GatewayESP32MQTTClient/GatewayESP32MQTTClient.ino' &&
89
89
sketches[sketch]. path != config. library_root+ ' examples/GatewaySerialRS485/GatewaySerialRS485.ino' &&
90
90
sketches[sketch]. path != config. library_root+ ' examples/MotionSensorRS485/MotionSensorRS485.ino' ) {
91
- buildArduino(config, fqbn, sketches[sketch]. path, key+ ' _MySensorsGw ' )
91
+ buildArduino(config, fqbn, sketches[sketch]. path, key+ ' _MySensorsGW ' )
92
92
}
93
93
}
94
94
} catch (ex) {
95
95
echo " Build failed with: " + ex. toString()
96
96
config. pr. setBuildStatus(config, ' FAILURE' , ' Toll gate (MySensorsGW - ' + key+ ' )' , ' Build error' , ' ${BUILD_URL}' )
97
97
throw ex
98
98
} finally {
99
- parseWarnings(key+ ' _MySensorsGw ' )
99
+ parseWarnings(key+ ' _MySensorsGW ' )
100
100
}
101
101
if (currentBuild. currentResult == ' UNSTABLE' ) {
102
102
config. pr. setBuildStatus(config, ' ERROR' , ' Toll gate (MySensorsGW - ' + key+ ' )' , ' Warnings found' , ' ${BUILD_URL}warnings2Result/new' )
@@ -111,7 +111,7 @@ def buildMySensorsGw(config, sketches, String key) {
111
111
}
112
112
113
113
def buildArduinoUno (config , sketches , String key ) {
114
- def fqbn = ' -fqbn arduino:avr:uno -prefs build.f_cpu=16000000 -prefs build.mcu=atmega328p '
114
+ def fqbn = ' -fqbn arduino:avr:uno'
115
115
config. pr. setBuildStatus(config, ' PENDING' , ' Toll gate (Arduino Uno - ' + key+ ' )' , ' Building...' , ' ${BUILD_URL}flowGraphTable/' )
116
116
try {
117
117
for (sketch = 0 ; sketch < sketches. size(); sketch++ ) {
@@ -144,7 +144,7 @@ def buildArduinoUno(config, sketches, String key) {
144
144
}
145
145
146
146
def buildArduinoMega (config , sketches , String key ) {
147
- def fqbn = ' -fqbn arduino:avr:mega -prefs build.f_cpu=16000000 -prefs build.mcu =atmega2560'
147
+ def fqbn = ' -fqbn arduino:avr:mega:cpu =atmega2560'
148
148
config. pr. setBuildStatus(config, ' PENDING' , ' Toll gate (Arduino Mega - ' + key+ ' )' , ' Building...' , ' ${BUILD_URL}flowGraphTable/' )
149
149
try {
150
150
for (sketch = 0 ; sketch < sketches. size(); sketch++ ) {
@@ -209,7 +209,7 @@ def buildSTM32F1(config, sketches, String key) {
209
209
}
210
210
}
211
211
212
- def buildEsp8266 (config , sketches , String key ) {
212
+ def buildESP8266 (config , sketches , String key ) {
213
213
def fqbn = ' -fqbn=esp8266:esp8266:generic:CpuFrequency=80,ResetMethod=ck,CrystalFreq=26,FlashFreq=40,FlashMode=qio,FlashSize=512K0,led=2,LwIPVariant=v2mss536,Debug=Disabled,DebugLevel=None____,FlashErase=none,UploadSpeed=115200'
214
214
config. pr. setBuildStatus(config, ' PENDING' , ' Toll gate (ESP8266 - ' + key+ ' )' , ' Building...' , ' ${BUILD_URL}flowGraphTable/' )
215
215
try {
@@ -226,15 +226,15 @@ def buildEsp8266(config, sketches, String key) {
226
226
sketches[sketch]. path != config. library_root+ ' examples/MotionSensorRS485/MotionSensorRS485.ino' &&
227
227
sketches[sketch]. path != config. library_root+ ' examples/SensebenderGatewaySerial/SensebenderGatewaySerial.ino' &&
228
228
sketches[sketch]. path != config. library_root+ ' examples/SoilMoistSensor/SoilMoistSensor.ino' ) {
229
- buildArduino(config, fqbn, sketches[sketch]. path, key+ ' _Esp8266 ' )
229
+ buildArduino(config, fqbn, sketches[sketch]. path, key+ ' _ESP8266 ' )
230
230
}
231
231
}
232
232
} catch (ex) {
233
233
echo " Build failed with: " + ex. toString()
234
234
config. pr. setBuildStatus(config, ' FAILURE' , ' Toll gate (ESP8266 - ' + key+ ' )' , ' Build error' , ' ${BUILD_URL}' )
235
235
throw ex
236
236
} finally {
237
- parseWarnings(key+ ' _Esp8266 ' )
237
+ parseWarnings(key+ ' _ESP8266 ' )
238
238
}
239
239
if (currentBuild. currentResult == ' UNSTABLE' ) {
240
240
config. pr. setBuildStatus(config, ' ERROR' , ' Toll gate (ESP8266 - ' + key+ ' )' , ' Warnings found' , ' ${BUILD_URL}warnings2Result/new' )
@@ -248,8 +248,8 @@ def buildEsp8266(config, sketches, String key) {
248
248
}
249
249
}
250
250
251
- def buildEsp32 (config , sketches , String key ) {
252
- def fqbn = ' -fqbn espressif:esp32:node32s -warnings =default -prefs build.f_cpu=80000000 -prefs build.mcu=esp32 '
251
+ def buildESP32 (config , sketches , String key ) {
252
+ def fqbn = ' -fqbn espressif:esp32:esp32:PartitionScheme =default,FlashMode=qio,FlashFreq=80,FlashSize=4M,UploadSpeed=921600,DebugLevel=none -warnings=default '
253
253
config. pr. setBuildStatus(config, ' PENDING' , ' Toll gate (ESP32 - ' + key+ ' )' , ' Building...' , ' ${BUILD_URL}flowGraphTable/' )
254
254
try {
255
255
for (sketch = 0 ; sketch < sketches. size(); sketch++ ) {
@@ -274,15 +274,15 @@ def buildEsp32(config, sketches, String key) {
274
274
sketches[sketch]. path != config. library_root+ ' examples/SensebenderGatewaySerial/SensebenderGatewaySerial.ino' &&
275
275
sketches[sketch]. path != config. library_root+ ' examples/MotionSensorRS485/MotionSensorRS485.ino' &&
276
276
sketches[sketch]. path != config. library_root+ ' examples/SoilMoistSensor/SoilMoistSensor.ino' ) {
277
- buildArduino(config, ' -prefs build.flash_freq=80m -prefs build.flash_size=4MB ' + fqbn, sketches[sketch]. path, key+ ' _Esp32 ' )
277
+ buildArduino(config, fqbn, sketches[sketch]. path, key+ ' _ESP32 ' )
278
278
}
279
279
}
280
280
} catch (ex) {
281
281
echo " Build failed with: " + ex. toString()
282
282
config. pr. setBuildStatus(config, ' FAILURE' , ' Toll gate (ESP32 - ' + key+ ' )' , ' Build error' , ' ${BUILD_URL}' )
283
283
throw ex
284
284
} finally {
285
- parseWarnings(key+ ' _Esp32 ' )
285
+ parseWarnings(key+ ' _ESP32 ' )
286
286
}
287
287
if (currentBuild. currentResult == ' UNSTABLE' ) {
288
288
config. pr. setBuildStatus(config, ' ERROR' , ' Toll gate (ESP32 - ' + key+ ' )' , ' Warnings found' , ' ${BUILD_URL}warnings2Result/new' )
@@ -297,7 +297,7 @@ def buildEsp32(config, sketches, String key) {
297
297
}
298
298
299
299
def buildnRF5 (config , sketches , String key ) {
300
- def fqbn = ' -fqbn sandeepmistry:nRF5:Generic_nRF52832 -prefs build.f_cpu=16000000 -prefs build.mcu=cortex-m4 '
300
+ def fqbn = ' -fqbn sandeepmistry:nRF5:Generic_nRF52832:softdevice=none,lfclk=lfxo '
301
301
config. pr. setBuildStatus(config, ' PENDING' , ' Toll gate (nRF5 - ' + key+ ' )' , ' Building...' , ' ${BUILD_URL}flowGraphTable/' )
302
302
try {
303
303
for (sketch = 0 ; sketch < sketches. size(); sketch++ ) {
@@ -338,7 +338,7 @@ def buildnRF5(config, sketches, String key) {
338
338
}
339
339
340
340
def buildnRF52832 (config , sketches , String key ) {
341
- def fqbn = ' -fqbn=MySensors:nRF5:MyBoard_nRF52832:bootcode=none,lfclk=lfxo,reset=notenable -prefs build.f_cpu=16000000 -prefs build.mcu=cortex-m4 '
341
+ def fqbn = ' -fqbn=MySensors:nRF5:MyBoard_nRF52832:bootcode=none,lfclk=lfxo,reset=notenable'
342
342
config. pr. setBuildStatus(config, ' PENDING' , ' Toll gate (nRF52832 - ' + key+ ' )' , ' Building...' , ' ${BUILD_URL}flowGraphTable/' )
343
343
try {
344
344
buildArduino(config, fqbn, ' hardware/MySensors/nRF5/libraries/MyBoardNRF5/examples/MyBoardNRF5/MyBoardNRF5.ino' , key+ ' _nRF52832' )
@@ -362,7 +362,7 @@ def buildnRF52832(config, sketches, String key) {
362
362
}
363
363
364
364
def buildnRF51822 (config , sketches , String key ) {
365
- def fqbn = ' -fqbn=MySensors:nRF5:MyBoard_nRF51822:chip=xxaa,bootcode=none,lfclk=lfxo -prefs build.f_cpu=16000000 -prefs build.mcu=cortex-m0 '
365
+ def fqbn = ' -fqbn=MySensors:nRF5:MyBoard_nRF51822:chip=xxaa,bootcode=none,lfclk=lfxo'
366
366
config. pr. setBuildStatus(config, ' PENDING' , ' Toll gate (nRF51822 - ' + key+ ' )' , ' Building...' , ' ${BUILD_URL}flowGraphTable/' )
367
367
try {
368
368
buildArduino(config, fqbn, ' hardware/MySensors/nRF5/libraries/MyBoardNRF5/examples/MyBoardNRF5/MyBoardNRF5.ino' , key+ ' _nRF51822' )
0 commit comments