Browse Source

Use PlatformIO 4 default dir structure (#14879)

Chris Pepper 5 years ago
parent
commit
2971b48a12

+ 1
- 1
Marlin/src/HAL/HAL_LPC1768/upload_extra_script.py View File

17
     print('\nUnable to find destination disk (' + e + ')\n' \
17
     print('\nUnable to find destination disk (' + e + ')\n' \
18
           'Please select it in platformio.ini using the upload_port keyword ' \
18
           'Please select it in platformio.ini using the upload_port keyword ' \
19
           '(https://docs.platformio.org/en/latest/projectconf/section_env_upload.html) ' \
19
           '(https://docs.platformio.org/en/latest/projectconf/section_env_upload.html) ' \
20
-          'or copy the firmware (.pioenvs/' + env.get('PIOENV') + '/firmware.bin) manually to the appropriate disk\n')
20
+          'or copy the firmware (.pio/build/' + env.get('PIOENV') + '/firmware.bin) manually to the appropriate disk\n')
21
 
21
 
22
 try:
22
 try:
23
     if current_OS == 'Windows':
23
     if current_OS == 'Windows':

+ 1
- 0
buildroot/bin/env_clean View File

3
 rm -rf .pioenvs
3
 rm -rf .pioenvs
4
 rm -rf .piolibdeps
4
 rm -rf .piolibdeps
5
 rm -rf .piolib
5
 rm -rf .piolib
6
+rm -rf .pio
6
 
7
 
7
 if [[ $1 = "--deep" ]]; then
8
 if [[ $1 = "--deep" ]]; then
8
   rm -rf ~/.platformio/packages/*
9
   rm -rf ~/.platformio/packages/*

+ 4
- 4
buildroot/share/atom/auto_build.py View File

421
 def get_build_last():
421
 def get_build_last():
422
       env_last = ''
422
       env_last = ''
423
       DIR_PWD = os.listdir('.')
423
       DIR_PWD = os.listdir('.')
424
-      if '.pioenvs' in DIR_PWD:
424
+      if '.pio' in DIR_PWD:
425
         date_last = 0.0
425
         date_last = 0.0
426
-        DIR__pioenvs = os.listdir('.pioenvs')
426
+        DIR__pioenvs = os.listdir('.pio')
427
         for name in DIR__pioenvs:
427
         for name in DIR__pioenvs:
428
           if 0 <= name.find('.') or 0 <= name.find('-'):   # skip files in listing
428
           if 0 <= name.find('.') or 0 <= name.find('-'):   # skip files in listing
429
             continue
429
             continue
430
-          DIR_temp = os.listdir('.pioenvs/' + name)
430
+          DIR_temp = os.listdir('.pio/build/' + name)
431
           for names_temp in DIR_temp:
431
           for names_temp in DIR_temp:
432
 
432
 
433
             if 0 == names_temp.find('firmware.'):
433
             if 0 == names_temp.find('firmware.'):
434
-              date_temp = os.path.getmtime('.pioenvs/' + name + '/' + names_temp)
434
+              date_temp = os.path.getmtime('.pio/build/' + name + '/' + names_temp)
435
               if date_temp > date_last:
435
               if date_temp > date_last:
436
                 date_last = date_temp
436
                 date_last = date_temp
437
                 env_last = name
437
                 env_last = name

+ 3
- 3
buildroot/share/atom/create_custom_upload_command_CDC.py View File

97
       avrdude_exe_path =  'buildroot\\share\\atom\\avrdude_5.10.exe'
97
       avrdude_exe_path =  'buildroot\\share\\atom\\avrdude_5.10.exe'
98
 
98
 
99
   #    source_path = env.get("PROJECTBUILD_DIR") + '\\' + env.get("PIOENV") + '\\firmware.hex'
99
   #    source_path = env.get("PROJECTBUILD_DIR") + '\\' + env.get("PIOENV") + '\\firmware.hex'
100
-      source_path =  '.pioenvs\\' + env.get("PIOENV") + '\\firmware.hex'
100
+      source_path =  '.pio\\build\\' + env.get("PIOENV") + '\\firmware.hex'
101
 
101
 
102
       upload_string = avrdude_exe_path + ' -p usb1286 -c avr109 -P ' + com_CDC + ' -U flash:w:' + source_path + ':i'
102
       upload_string = avrdude_exe_path + ' -p usb1286 -c avr109 -P ' + com_CDC + ' -U flash:w:' + source_path + ':i'
103
 
103
 
113
       avrdude_exe_path =  'buildroot/share/atom/avrdude_5.10_macOS'
113
       avrdude_exe_path =  'buildroot/share/atom/avrdude_5.10_macOS'
114
 
114
 
115
 #      source_path = env.get("PROJECTBUILD_DIR") + '/' + env.get("PIOENV") + '/firmware.hex'
115
 #      source_path = env.get("PROJECTBUILD_DIR") + '/' + env.get("PIOENV") + '/firmware.hex'
116
-      source_path = '.pioenvs/' + env.get("PIOENV") + '/firmware.hex'
116
+      source_path = '.pio/build/' + env.get("PIOENV") + '/firmware.hex'
117
 
117
 
118
 
118
 
119
 #      upload_string = 'avrdude -p usb1286 -c avr109 -P ' + com_CDC + ' -U flash:w:' + source_path + ':i'
119
 #      upload_string = 'avrdude -p usb1286 -c avr109 -P ' + com_CDC + ' -U flash:w:' + source_path + ':i'
132
 
132
 
133
       avrdude_exe_path =  'buildroot/share/atom/avrdude_5.10_linux'
133
       avrdude_exe_path =  'buildroot/share/atom/avrdude_5.10_linux'
134
 #      source_path = env.get("PROJECTBUILD_DIR") + '/' + env.get("PIOENV") + '/firmware.hex'
134
 #      source_path = env.get("PROJECTBUILD_DIR") + '/' + env.get("PIOENV") + '/firmware.hex'
135
-      source_path = '.pioenvs/' + env.get("PIOENV") + '/firmware.hex'
135
+      source_path = '.pio/build/' + env.get("PIOENV") + '/firmware.hex'
136
 
136
 
137
 #      upload_string = 'avrdude -p usb1286 -c avr109 -P ' + com_CDC + ' -U flash:w:' + source_path + ':i'
137
 #      upload_string = 'avrdude -p usb1286 -c avr109 -P ' + com_CDC + ' -U flash:w:' + source_path + ':i'
138
       upload_string = avrdude_exe_path + ' -p usb1286 -c avr109 -P ' + com_CDC + ' -C ' + avrdude_conf_path  + ' -U flash:w:' + source_path + ':i'
138
       upload_string = avrdude_exe_path + ' -p usb1286 -c avr109 -P ' + com_CDC + ' -C ' + avrdude_conf_path  + ' -U flash:w:' + source_path + ':i'

+ 0
- 3
platformio.ini View File

17
 
17
 
18
 [platformio]
18
 [platformio]
19
 src_dir      = Marlin
19
 src_dir      = Marlin
20
-build_dir    = .pioenvs
21
-lib_dir      = .piolib
22
-libdeps_dir  = .piolibdeps
23
 boards_dir   = buildroot/share/PlatformIO/boards
20
 boards_dir   = buildroot/share/PlatformIO/boards
24
 default_envs = megaatmega2560
21
 default_envs = megaatmega2560
25
 
22
 

Loading…
Cancel
Save