Skip to content

Commit d43eba1

Browse files
committed
boot.py
1 parent 92f6cee commit d43eba1

5 files changed

Lines changed: 21 additions & 5 deletions

File tree

.github/workflows/build.yml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,12 @@
11
name: build_mpy
2-
on: [push]
2+
on:
3+
push
4+
workflow_dispatch:
5+
6+
# Allows external webhook trigger
7+
repository_dispatch:
8+
types:
9+
- webhook
310

411
jobs:
512
build:

bs_python_boards/raspberrypi/boardsouce_lulu/mpconfigboard.mk

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,9 @@ CHIP_FAMILY = rp2
99
EXTERNAL_FLASH_DEVICES = "W25Q16JVxQ"
1010

1111
FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_NeoPixel
12-
FROZEN_MPY_DIRS += $(TOP)/frozen/kmk
12+
FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_Display_Text
13+
FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_DisplayIO_SSD1306
14+
FROZEN_MPY_DIRS += $(TOP)/frozen/peg_kmk_firmware/src
1315

1416

1517
# CIRCUITPY__EVE = 1

bs_python_boards/raspberrypi/boardsource_blok_full/mpconfigboard.mk

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ EXTERNAL_FLASH_DEVICES = "W25Q16JVxQ"
1111
FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_NeoPixel
1212
FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_Display_Text
1313
FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_DisplayIO_SSD1306
14-
# FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_PIOASM
1514
FROZEN_MPY_DIRS += $(TOP)/frozen/peg_kmk_firmware/src
1615

1716
# CIRCUITPY__EVE = 1

cpy_git.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
KMK_REPO_URL = "https://github.com/boardsource/peg_kmk_firmware.git"
88
BRANCH = "8.0.x"
99
FROZEN_REPO_LIST = ["https://github.com/adafruit/Adafruit_CircuitPython_DisplayIO_SSD1306.git",
10-
"https://github.com/adafruit/Adafruit_CircuitPython_PIOASM.git",
1110
"https://github.com/boardsource/peg_kmk_firmware.git"
1211
]
1312

misc_file_changes.py

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,23 @@ def find_and_replace_in_file(path,find,replace):
99
file.write(filedata)
1010
print(f'replacing "{find}" with "{replace}" in {path}')
1111

12+
def replace_line(file_name, line_num, text):
13+
lines = open(file_name, 'r').readlines()
14+
lines[line_num] = text
15+
out = open(file_name, 'w')
16+
out.writelines(lines)
17+
out.close()
18+
1219
def supervisor_file():
1320
file_path = "./cpy/circuitpython/supervisor/supervisor.mk"
1421
find_and_replace_in_file(file_path,"CircuitPython","BsPython")
1522
find_and_replace_in_file(file_path,"circuitpython.org","github.com/boardsource/bs-python")
1623
def filesystem_file():
1724
file_path = "./cpy/circuitpython/supervisor/shared/filesystem.c"
1825
find_and_replace_in_file(file_path,'"CIRCUITPY")','"BSPYTHON")')
19-
find_and_replace_in_file(file_path,"print(\"Hello World!\")\n","from kmk.json_keymap import JsonMap\nkeyboard = JsonMap(\"layout.json\").return_keyboard()\nif __name__ == \"__main__\":\n keyboard.go()\n")
26+
find_and_replace_in_file(file_path,'const byte buffer[] = "print(\\"Hello World!\\")\\n";','const byte buffer[] = "from kmk.json_keymap import JsonMap\\nkeyboard = JsonMap(\\"layout.json\\").return_keyboard()\\nif __name__ == \\"__main__\\":\\n keyboard.go()\\n";')
27+
find_and_replace_in_file(file_path,'// Create or modify existing code.py file','const byte buffer2[] = "print(\\"Hello World!\\")\\n";\n f_open(fatfs, &fs, "/boot.py", FA_WRITE | FA_CREATE_ALWAYS);\n f_write(&fs, buffer2, sizeof(buffer2) - 1, &char_written);\n f_close(&fs);\n')
28+
2029
def do_all_the_changes():
2130
supervisor_file()
2231
filesystem_file()

0 commit comments

Comments
 (0)