Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit6f0d0fe

Browse files
committed
fixes build for custom boards
1 parentb52ced5 commit6f0d0fe

File tree

4 files changed

+27
-28
lines changed

4 files changed

+27
-28
lines changed

‎builder/esp32.py‎

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1484,8 +1484,9 @@ def compile(*args): # NOQA
14841484

14851485
build_name=f'build-{board}'
14861486

1487-
ifboard_variant:
1488-
build_name+=f'-{board_variant}'
1487+
ifcustom_board_pathisNone:
1488+
ifboard_variant:
1489+
build_name+=f'-{board_variant}'
14891490

14901491
full_file_path= (
14911492
f'{SCRIPT_DIR}/lib/micropython/ports/esp32/{build_name}'
@@ -1504,9 +1505,12 @@ def compile(*args): # NOQA
15041505

15051506
scrub_build_folder()
15061507

1507-
build_bin_file=f'build/lvgl_micropy_{build_name[6:]}-{flash_size}'
1508-
ifoct_flash:
1509-
build_bin_file+='_OCTFLASH'
1508+
ifcustom_board_pathisNone:
1509+
build_bin_file=f'build/lvgl_micropy_{build_name[6:]}-{flash_size}'
1510+
ifoct_flash:
1511+
build_bin_file+='_OCTFLASH'
1512+
else:
1513+
build_bin_file=f'build/lvgl_micropy_{build_name[6:]}'
15101514

15111515
build_bin_file+='.bin'
15121516
build_bin_file=os.path.abspath(build_bin_file)

‎display_configs/LilyGo-TDeck/LilyGo-TDeck.toml‎

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,4 @@
11
[MCU.esp32]
2-
BOARD ="ESP32_GENERIC_S3"
3-
BOARD_VARIANT ="SPIRAM_OCT"
4-
flash_size =16
5-
octal_flash =true
6-
enable_cdc_repl ="y"
7-
enable_jtag_repl ="n"
8-
enable_uart_repl ="n"
92
FROZEN_MANIFEST ="display_configs/LilyGo-TDeck/manifest.py"
103

114
[SPI.Bus.spi_bus]
@@ -50,11 +43,10 @@ reg_bits = 8
5043
data_bus ="display_bus"
5144
display_width =320
5245
display_height =240
53-
power_pin =42
5446
backlight_pin =42
5547
backlight_on_state ="st7789.STATE_PWM"
5648
color_space ="lv.COLOR_FORMAT.RGB565"
57-
color_byte_order ="ili9341.BYTE_ORDER_BGR"
49+
color_byte_order ="st7789.BYTE_ORDER_BGR"
5850
rgb565_byte_swap =true
5951

6052
[display.set_power]
@@ -69,7 +61,7 @@ device = "touch_device"
6961
[keyboard_s3.Keyboard.keyboard]
7062
device ="keyboard_device"
7163

72-
[trackball.TrackBall.trackball]
64+
[trackball.TrackBall.tball]
7365
up_pin =3
7466
down_pin =2
7567
left_pin =15

‎display_configs/LilyGo-TDeck/power.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
importtime
55

66

7-
classPowerButton:
7+
classButton:
88

99
def__init__(self,pin):
1010
self._pin=machine.Pin(pin,machine.Pin.IN)

‎make.py‎

Lines changed: 15 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -188,18 +188,6 @@
188188
raiseRuntimeError('Frozen manifest does not exist.')
189189

190190

191-
ifcustom_board_pathisnotNone:
192-
board_name=os.path.split(custom_board_path)[-1]
193-
dst_path=f'lib/micropython/ports/{target}/boards/{board_name}'
194-
ifos.path.exists(dst_path):
195-
shutil.rmtree(dst_path)
196-
197-
shutil.copytree(custom_board_path,dst_path)
198-
199-
ifboardisNoneorboard!=board_name:
200-
board=board_name
201-
202-
203191
iflv_cflagsisNone:
204192
lv_cflags=''
205193

@@ -217,10 +205,12 @@ def get_submodules():
217205
os.path.join(SCRIPT_DIR,'lib/micropython/mpy-cross')
218206
):
219207
builder.get_micropython()
208+
220209
ifnotos.path.exists(
221210
os.path.join(SCRIPT_DIR,'lib/lvgl/lvgl.h')
222211
):
223212
builder.get_lvgl()
213+
224214
ifnotos.path.exists(os.path.join(
225215
SCRIPT_DIR,'lib/pycparser/pycparser')
226216
):
@@ -273,6 +263,19 @@ def create_lvgl_header():
273263

274264
get_submodules()
275265

266+
ifcustom_board_pathisnotNone:
267+
board_name=os.path.split(custom_board_path)[-1]
268+
dst_path=f'lib/micropython/ports/{target}/boards/{board_name}'
269+
ifos.path.exists(dst_path):
270+
shutil.rmtree(dst_path)
271+
272+
shutil.copytree(custom_board_path,dst_path)
273+
274+
ifboardisNoneorboard!=board_name:
275+
board=board_name
276+
277+
mod.custom_board_path=custom_board_path
278+
276279
extra_args,lv_cflags,board=mod.parse_args(extra_args,lv_cflags,board)
277280
extra_args=mod.build_commands(
278281
target,extra_args,SCRIPT_DIR,lv_cflags,board)

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp