Skip to content

Commit 9d99740

Browse files
committed
Large amount of changes and additions
The official name of this port is now 'MicroPython for K210' - all refferences to 'maixpy' are removed Build system - most port specific options can now be configured using menuconfig - added --menuconfig option to BUILD.sh - build on Mac OSX and arm platforms is now supported and toolchains provided Changed memory management support - if not using KPU, full 8 MB of memory can be used Updated 'kflash.py' with https://github.com/loboris/ktool - new flash tool name is 'ktool.py', but the old name 'fflash.py' can still be used FreeRTOS updated - many improvements - added 'mbedtls' library - added 'heap_5' support Using two MicroPython instances improved - better inter-instances communication SPI Flash support, including internal file system improved - SPI Flash speed can be changed from MicroPython - added methods for reading Flash chip JEDEC ID and unique ID MicroPython modules improved, some bugs fixed, new modules added - almost all modules improved - 'Display' module: - added support for ePaper displays - added support for hershey vector fonts - added PNG support - Network support improved - 'machine' module: - added functions 'state', 'sramread', 'addrof', 'k210_id', 'flash_serial', 'flash_speed' - added 'camera' module with full support for OV2640 and OV5640 - added 'ulab' module
1 parent 1abe503 commit 9d99740

File tree

343 files changed

+158316
-3700
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

343 files changed

+158316
-3700
lines changed

.cproject

Lines changed: 27 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,8 @@
5151

5252
<listOptionValue builtIn="false" value="&quot;${PWD}/k210-freertos/platform/sdk/kendryte-freertos-sdk/lib/freertos/include&quot;"/>
5353

54+
<listOptionValue builtIn="false" value="&quot;${PWD}/k210-freertos/platform/sdk/kendryte-freertos-sdk/lib/utils/include&quot;"/>
55+
5456
<listOptionValue builtIn="false" value="&quot;${PWD}/k210-freertos/platform/sdk/kendryte-freertos-sdk/lib/drivers/include&quot;"/>
5557

5658
<listOptionValue builtIn="false" value="&quot;${PWD}/k210-freertos/platform/sdk/kendryte-freertos-sdk/third_party/fatfs/source&quot;"/>
@@ -70,6 +72,8 @@
7072
<listOptionValue builtIn="false" value="&quot;${PWD}/kendryte-toolchain/riscv64-unknown-elf/include&quot;"/>
7173

7274
<listOptionValue builtIn="false" value="&quot;${PWD}/kendryte-toolchain/lib/gcc/riscv64-unknown-elf/8.2.0/include&quot;"/>
75+
76+
<listOptionValue builtIn="false" value="&quot;${PWD}/kendryte-toolchain/lib/gcc/riscv64-unknown-elf/8.3.0/include&quot;"/>
7377

7478
</option>
7579

@@ -122,6 +126,8 @@
122126
<listOptionValue builtIn="false" value="&quot;${PWD}/kendryte-toolchain/riscv64-unknown-elf/include&quot;"/>
123127

124128
<listOptionValue builtIn="false" value="&quot;${PWD}/kendryte-toolchain/lib/gcc/riscv64-unknown-elf/8.2.0/include&quot;"/>
129+
130+
<listOptionValue builtIn="false" value="&quot;${PWD}/kendryte-toolchain/lib/gcc/riscv64-unknown-elf/8.3.0/include&quot;"/>
125131

126132
</option>
127133

@@ -231,8 +237,6 @@
231237

232238
<buildCommand>${PWD}/k210-freertos/BUILD.sh</buildCommand>
233239

234-
<buildArguments/>
235-
236240
<stopOnError>true</stopOnError>
237241

238242
<useDefaultCommand>false</useDefaultCommand>
@@ -245,6 +249,8 @@
245249

246250
<buildCommand>${PWD}/k210-freertos/CLEAN.sh</buildCommand>
247251

252+
<buildArguments/>
253+
248254
<stopOnError>true</stopOnError>
249255

250256
<useDefaultCommand>false</useDefaultCommand>
@@ -271,7 +277,9 @@
271277

272278
<buildCommand>${PWD}/k210-freertos/BUILD.sh</buildCommand>
273279

274-
<buildArguments>-j8</buildArguments>
280+
<buildArguments>-j16</buildArguments>
281+
282+
<buildTarget/>
275283

276284
<stopOnError>true</stopOnError>
277285

@@ -285,7 +293,9 @@
285293

286294
<buildCommand>${PWD}/k210-freertos/BUILD.sh</buildCommand>
287295

288-
<buildArguments>-v -j8</buildArguments>
296+
<buildArguments>-v -j16</buildArguments>
297+
298+
<buildTarget/>
289299

290300
<stopOnError>true</stopOnError>
291301

@@ -301,7 +311,19 @@
301311

302312
<buildArguments>-d -j8</buildArguments>
303313

304-
<buildTarget/>
314+
<stopOnError>true</stopOnError>
315+
316+
<useDefaultCommand>false</useDefaultCommand>
317+
318+
<runAllBuilders>true</runAllBuilders>
319+
320+
</target>
321+
322+
<target name="Menuconfig" path="" targetID="org.eclipse.cdt.build.MakeTargetBuilder">
323+
324+
<buildCommand>mate-terminal</buildCommand>
325+
326+
<buildArguments>--working-directory="${PWD}k210-freertos" -e "./BUILD.sh --menuconfig" &amp;</buildArguments>
305327

306328
<stopOnError>true</stopOnError>
307329

.project

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<projectDescription>
3-
<name>MaixPy-FreeRTOS</name>
3+
<name>MicroPython_K210_LoBo</name>
44
<comment></comment>
55
<projects>
66
</projects>

.settings/language.settings.xml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@
99

1010
<provider-reference id="org.eclipse.cdt.core.ReferencedProjectsLanguageSettingsProvider" ref="shared-provider"/>
1111

12+
<provider copy-of="extension" id="org.eclipse.cdt.managedbuilder.core.GCCBuildCommandParser"/>
13+
1214
<provider-reference id="org.eclipse.cdt.managedbuilder.core.MBSLanguageSettingsProvider" ref="shared-provider"/>
1315

1416
</extension>

firmware/MPyTerm.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ def __init__(self, baudrate=115200, device='/dev/ttyUSB0', rst=0, clr=False):
5858
self.DEVICE = device
5959
self.BAUDRATE = baudrate
6060
self.ESCAPECHAR = "\033"
61-
self.VERSION = "5.1.3"
61+
self.VERSION = "5.1.4"
6262
self.ShutdownReceiver = False
6363
self.ReceiverToStdout = True
6464
self.DefaultTimeout = 0.1
@@ -102,6 +102,10 @@ def __init__(self, baudrate=115200, device='/dev/ttyUSB0', rst=0, clr=False):
102102
self.uart.dtr = True
103103
else:
104104
self.uart.write(b'\r\n')
105+
time.sleep(0.1)
106+
#self.uart.dtr = False
107+
#self.uart.rts = False
108+
#time.sleep(0.1)
105109

106110
except Exception as e:
107111
raise Exception(self.TCLR['RED']+"Accessing "+self.TCLR['WHITE'] + self.DEVICE + " "+self.TCLR['RED']+"failed\r\n"+self.TCLR['WHITE']+"PyTerm exit"+self.TCLR['NORMAL']+"\r\n")

firmware/MaixPy.bin

-1.42 MB
Binary file not shown.

firmware/MaixPy.kfpkg

-1.46 MB
Binary file not shown.

firmware/MaixPy_firmware.zip

-8.46 MB
Binary file not shown.

firmware/MaixPy_sqlite.bin

-1.83 MB
Binary file not shown.

firmware/MaixPy_sqlite.kfpkg

-1.71 MB
Binary file not shown.

firmware/MicroPython.bin

1.71 MB
Binary file not shown.

firmware/MicroPython.kfpkg

1.62 MB
Binary file not shown.

firmware/MicroPython_firmwares.zip

12.1 MB
Binary file not shown.

firmware/README.md

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,21 @@
11
# MicroPython for Kendryte K210
22

33

4+
Three prebuilt firmwares are provided:
5+
6+
* `default` default configuration, no sqlite module, one MicroPython task; in this directory
7+
* `sqlite` default configuration, sqlite module included, one MicroPython task; in `sqlite` directory
8+
* `twotasks` no KPU (8 MB SRAM used), sqlite module included, two MicroPython task; in `twotasks` directory
9+
410
To flash the pre-built firmware to your K210 board, run (in this directory):
511

612
```
7-
./kflash.py -p /dev/ttyUSB0 -b 2000000 -t MaixPy.bin
13+
./kflash.py -p /dev/ttyUSB0 -b 2000000 -t MicroPython.bin
814
```
915

1016
Change */dev/ttyUSB0* to the port used to connect to the board if needed.<br>
11-
`MaixPy.bin` is the default firmware name. Other firmware names can be used.
12-
13-
Two firmwares are provided, one with sqlite3 compiled and one without it.<br>
17+
You can replace `MicroPython.bin` with `sqlite/MicroPython.bin` or `twotasks/MicroPython.bin` to flash another firmware.
1418

15-
`MaixPy.kfpkg` is also provided which contains prebuilt LittleFS internal file system.<br>
16-
To flash it, just replace `MaixPy.bin` with `MaixPy.fpkg`.
19+
`MicroPython.kfpkg` is also provided which contains prebuilt LittleFS internal file system.<br>
20+
To flash it, just replace `MicroPython.bin` with `MicroPython.kfpkg`.
1721

firmware/kflash.py

Lines changed: 973 additions & 518 deletions
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)