Skip to content

Commit d0d15b4

Browse files
authored
Merge pull request #1 from qilingframework/dev
Dev fix evm
2 parents 94bf7a3 + dd31fd6 commit d0d15b4

File tree

111 files changed

+8575
-2864
lines changed

Some content is hidden

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

111 files changed

+8575
-2864
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,4 +36,5 @@ test.file
3636
core
3737
*.perf
3838
tests/output.txt
39+
tests/testtest_*
3940

AUTHORS.TXT

Lines changed: 0 additions & 9 deletions
This file was deleted.

CREDITS.TXT

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,16 +14,20 @@ NGUYEN Anh Quynh <[email protected]>
1414
Core Developers Crew
1515
====================
1616
Earl MARCUS (klks84) [email protected]
17-
DING tianze (D1iv3) <[email protected]>
18-
SUN bowen (w1tcher) <[email protected]>
19-
CHEN huitao (null) <[email protected]>
20-
YU tong (sp1ke) <[email protected]>
2117
WU chenxu (kabeor) <[email protected]>
2218
KONG ziqiao (lazymio) <[email protected]>
2319
YU zheng (dataisland) <[email protected]>
2420
Eli Cohen Nehemia (elicn) <[email protected]>
2521

2622

23+
Legacy Core Developers
24+
======================
25+
DING tianze (D1iv3) <[email protected]>
26+
SUN bowen (w1tcher) <[email protected]>
27+
CHEN huitao (null) <[email protected]>
28+
YU tong (sp1ke) <[email protected]>
29+
30+
2731
Travis, Website and Documentations
2832
==================================
2933
FOO Kevin (chfl4gs) <[email protected]>

ChangeLog

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,22 @@
11
This file details the changelog of Qiling Framework.
22

3+
------------------------------------
4+
[Version 1.4.1]: Nov Xth, 2021
5+
6+
New features:
7+
- Introduced riscv, both 32 and 64 (#980)
8+
9+
Improvements:
10+
- Refactored core hooks (#966)
11+
- update ql.os.posix.const_mapping with more os/arch match (#973)
12+
- Minor refactor on ql.interpreter and ql.baremetal (#975)
13+
- More update in MCU modules (#971)
14+
- Fix getpeername and getsockname syscalls (#986)
15+
16+
317
------------------------------------
418
[Version 1.4.0]: Oct 20th, 2021
19+
520
- Added MCU Engine
621
- Bug fix for qdb
722
- Bug fix for debugger

Dockerfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ FROM python:3.8-slim AS builder
33
LABEL maintainer="Kevin Foo <[email protected]>"
44

55
ENV DEBIAN_FRONTEND=noninteractive
6+
ENV AM_I_IN_A_DOCKER_CONTAINER Yes
67

78
RUN apt-get update \
89
&& apt-get -y upgrade \
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ def stm32f411_dma():
99
ql = Qiling(["../rootfs/mcu/stm32f411/dma-clock.hex"],
1010
archtype="cortex_m", profile="stm32f411", verbose=QL_VERBOSE.DEBUG)
1111

12-
ql.hw.create('usart2')
13-
ql.hw.create('dma1')
12+
ql.hw.create('usart2').watch()
13+
ql.hw.create('dma1').watch()
1414
ql.hw.create('rcc')
1515

1616
ql.run(count=200000)
Lines changed: 4 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -9,21 +9,12 @@ def stm32f411_freertos():
99
ql = Qiling(["../rootfs/mcu/stm32f411/os-demo.hex"],
1010
archtype="cortex_m", profile="stm32f411", verbose=QL_VERBOSE.DEBUG)
1111

12-
ql.hw.create('usart2')
13-
ql.hw.create('rcc')
14-
ql.hw.create('gpioa')
15-
16-
count = 0
17-
def counter():
18-
nonlocal count
19-
count += 1
20-
21-
ql.hw.gpioa.hook_set(5, counter)
12+
ql.hw.create('usart2').watch()
13+
ql.hw.create('gpioa').watch()
14+
ql.hw.create('rcc')
2215

16+
ql.hw.systick.set_ratio(100)
2317
ql.run(count=200000)
2418

25-
print(count >= 5)
26-
print(ql.hw.usart2.recv())
27-
2819
if __name__ == "__main__":
2920
stm32f411_freertos()
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,9 @@ def test_mcu_gpio_stm32f411():
99
ql = Qiling(["../../examples/rootfs/mcu/stm32f411/hello_gpioA.hex"],
1010
archtype="cortex_m", profile="stm32f411", verbose=QL_VERBOSE.DEBUG)
1111

12-
ql.hw.create('usart2')
13-
ql.hw.create('rcc')
14-
ql.hw.create('gpioa')
12+
ql.hw.create('usart2').watch()
13+
ql.hw.create('rcc').watch()
14+
ql.hw.create('gpioa').watch()
1515

1616

1717
ql.hw.gpioa.hook_set(5, lambda: print('LED light up'))

examples/mcu/stm32f411_i2c_lcd.py

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
import sys
2+
3+
sys.path.append("../..")
4+
5+
from qiling.core import Qiling
6+
from qiling.const import QL_VERBOSE
7+
from qiling.hw.external_device.lcd.lcd1602 import PyGameLCD1602
8+
9+
10+
def create(path, lcd):
11+
ql = Qiling([path], archtype="cortex_m", profile="stm32f411", verbose=QL_VERBOSE.DEBUG)
12+
13+
ql.hw.create('i2c1')
14+
ql.hw.create('rcc')
15+
ql.hw.create('gpioa')
16+
ql.hw.create('gpiob')
17+
18+
ql.hw.i2c1.watch()
19+
ql.hw.i2c1.connect(lcd)
20+
21+
ql.hw.systick.set_ratio(100)
22+
23+
return ql
24+
25+
if __name__ == "__main__":
26+
lcd = PyGameLCD1602()
27+
28+
create("../rootfs/mcu/stm32f411/i2c-lcd.hex", lcd).run(count=50000)
29+
create("../rootfs/mcu/stm32f411/lcd-plus.hex", lcd).run(count=100000)
30+
31+
lcd.quit()

0 commit comments

Comments
 (0)