Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
88 commits
Select commit Hold shift + click to select a range
4fda8a9
update team member ready for 1.3.0
xwings Sep 25, 2021
7903e6b
Merge branch 'master' into dev_before_mcu
xwings Oct 10, 2021
71642f1
asfter master tag
xwings Sep 25, 2021
d10e51e
fix version conflict
xwings Sep 25, 2021
b5b17f3
Added free syscall to msvcrt
JannisKirschner Sep 25, 2021
7befad6
x86 eflags is always 32 bits
elicn Sep 30, 2021
fbb44d5
QlLoaderELF refactored
elicn Oct 4, 2021
db1b7c2
Offload aux vector data to a dedicated dict
elicn Oct 4, 2021
aca1f0b
Update registers dict according to UC2
wtdcode Oct 5, 2021
d54e14d
remove mcu from dev, xwings fault
xwings Oct 7, 2021
44f9d0d
EDL workaround
elicn Oct 9, 2021
dde4743
More appropriate handling of load_address
elicn Oct 9, 2021
5a1b0fd
remove test_mcu
xwings Oct 10, 2021
a5afe2c
force skip docker check
xwings Oct 10, 2021
63275cf
bump to unicorn2-rc3
xwings Oct 10, 2021
59fe9cc
docker test
xwings Oct 10, 2021
5499992
fix docker typo
xwings Oct 10, 2021
cad5b38
fix docker typo, add python check
xwings Oct 10, 2021
4ea83f6
fix docker typo, add python check
xwings Oct 10, 2021
a157d53
disable gancarb double run
xwings Oct 10, 2021
54e98ea
clean elf loader
xwings Oct 10, 2021
2f6e584
Remove MCU stuff
wtdcode Oct 10, 2021
91bacae
Remove ql.hw
wtdcode Oct 10, 2021
ab539e3
Remove QL_ARCH_HARDWARE to pass all tests
wtdcode Oct 11, 2021
32e7345
Fix Windows CI by de-allocate uc instances
wtdcode Oct 11, 2021
765f8d1
Use multiprocessing to split tests
wtdcode Oct 11, 2021
ea4b51a
Use multiprocess to pickle internal functions
wtdcode Oct 11, 2021
d456471
Leave out two tests
wtdcode Oct 11, 2021
ba66f2c
Fix two tests
wtdcode Oct 11, 2021
223fbad
Forget to return value
wtdcode Oct 11, 2021
beb5452
Merge pull request #939 from qilingframework/fix-windows-ci
xwings Oct 12, 2021
afaf708
Some comments about why we need multiprocess in test_pe
wtdcode Oct 12, 2021
7545365
Add hw component in qiling
cla7aye15I4nd Oct 12, 2021
41459c5
Introduce MMIO mechanism in memory
cla7aye15I4nd Oct 12, 2021
ab51ee6
Add support of Cortex-M
cla7aye15I4nd Oct 12, 2021
1483c71
Add MCU Loader
cla7aye15I4nd Oct 12, 2021
113ead0
Enable the MCU feature
cla7aye15I4nd Oct 12, 2021
9caf017
Add stm32f4 series profiles
cla7aye15I4nd Oct 12, 2021
e8f6976
Add MCU examples
cla7aye15I4nd Oct 12, 2021
7b519ed
Remove the self import
cla7aye15I4nd Oct 12, 2021
8663259
Add MCU testcase
cla7aye15I4nd Oct 12, 2021
af7f9a5
Enable the mcu test in script
cla7aye15I4nd Oct 12, 2021
296cb75
Fix bytes api misuse bug
SwordFaith Oct 15, 2021
a66ae1d
Fix 'ascii' not support 128~255 problem
SwordFaith Oct 15, 2021
75ca9cd
Add POSIX euid and egid properties
elicn Oct 15, 2021
8fd20f5
Move root property from core to OS
elicn Oct 15, 2021
71141ba
Implement root functionality for POSIX
elicn Oct 15, 2021
fbd4f6a
Implement POSIX uid / gid related syscalls
elicn Oct 15, 2021
04149c3
Refine add_to_str implementation
elicn Oct 15, 2021
486e14d
Pythonic defaults handling
elicn Oct 15, 2021
15d4efe
Refine auxv handling code
elicn Oct 15, 2021
b63810d
Misc cleanup
elicn Oct 15, 2021
cc37fea
Have EXECFN and HWCAP2 written to AUX vector
elicn Oct 15, 2021
98c9254
Fix debugger_setup defaults handling
elicn Oct 15, 2021
ba6683f
clean up credits
xwings Oct 16, 2021
5d8f5aa
Fix and adjust windows debugger test
elicn Oct 16, 2021
41a548e
Merge branch 'qilingframework:dev' into dev
cla7aye15I4nd Oct 17, 2021
96c2c6c
Import the code convention
cla7aye15I4nd Oct 17, 2021
5b86c25
Remove 'end' field in Qiling
cla7aye15I4nd Oct 17, 2021
b73ff54
Use the python3.8 feature to simplify code
cla7aye15I4nd Oct 17, 2021
a050927
Add type annotation for read/write function in hw
cla7aye15I4nd Oct 17, 2021
06a5063
Add docstring for Qlperipheral
cla7aye15I4nd Oct 17, 2021
e608872
fixed credits.txt
xwings Oct 17, 2021
6184baf
Add docstring in qlhwmanager
cla7aye15I4nd Oct 17, 2021
f7a6352
Fix typo in const.py
cla7aye15I4nd Oct 17, 2021
87fc7a4
Merge pull request #947 from elicn/gdb-improv
xwings Oct 17, 2021
7a81888
Merge branch 'qilingframework:dev' into dev
cla7aye15I4nd Oct 17, 2021
7b7a921
Update solution by `bytes([value])`
SwordFaith Oct 17, 2021
06f688c
use new approach for qdb to catch up UC2
ucgJhe Oct 18, 2021
6991b10
Merge pull request #946 from elicn/fix-root
xwings Oct 19, 2021
dff536b
Merge pull request #949 from ucgJhe/qdb
xwings Oct 19, 2021
187e0f3
Merge pull request #945 from SwordFaith/swordfaith-fix-setmem
xwings Oct 19, 2021
4a1418a
Merge branch 'qilingframework:dev' into dev
cla7aye15I4nd Oct 19, 2021
a117346
Add `set_ratio` in systick
cla7aye15I4nd Oct 19, 2021
b6cf49a
Merge pull request #940 from cla7aye15I4nd/dev
xwings Oct 19, 2021
cfac323
Add stm32f407 testcase
cla7aye15I4nd Oct 19, 2021
d4e0b0f
Merge branch 'qilingframework:dev' into dev
cla7aye15I4nd Oct 19, 2021
3c0c9fc
argv and env in elf loader should be able to accept bytes as argument
ucgJhe Oct 20, 2021
ac1e85e
slight adjust to prep debugger readyness for mcu
xwings Oct 20, 2021
6f0e6e6
add missing file
xwings Oct 20, 2021
0ffc68f
remove unwated example
xwings Oct 20, 2021
9ddceea
Merge branch 'qilingframework:dev' into dev
cla7aye15I4nd Oct 20, 2021
efb88c9
Merge pull request #953 from cla7aye15I4nd/dev
cla7aye15I4nd Oct 20, 2021
79347b2
Merge pull request #951 from ucgJhe/dev
xwings Oct 20, 2021
0921cb3
update change log for 1.4
xwings Oct 20, 2021
ef8c9e3
Merge branch 'dev' of github.com:qilingframework/qiling into dev
xwings Oct 20, 2021
79c2ded
get ready for 1.4
xwings Oct 20, 2021
c100ef4
better versioning for changelog
xwings Oct 20, 2021
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 6 additions & 18 deletions .github/workflows/build-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,21 +11,13 @@ jobs:
matrix:
#os: [windows-2019, macos-10.15, ubuntu-18.04, ubuntu-20.04]
os: [windows-2019, ubuntu-18.04, ubuntu-20.04]
python-version: [3.7, 3.8, 3.9]
python-version: [3.8, 3.9]
exclude:
- os: ubuntu-20.04
python-version: 3.7
- os: ubuntu-18.04
python-version: 3.7
- os: ubuntu-18.04
python-version: 3.9
- os: windows-2019
python-version: 3.7
# - os: macos-10.15
# python-version: 3.8
python-version: 3.9
include:
- os: ubuntu-20.04
python-version: 3.8
- os: ubuntu-18.04
python-version: 3.9
container: Docker

steps:
Expand Down Expand Up @@ -93,12 +85,8 @@ jobs:
cd ../../../../
pip3 install -e .[evm]

if [ ${{ matrix.python-version }} == '3.9' ]; then
rm -rf tests/test_evm.py
fi

if [ ${{ matrix.os }} == 'ubuntu-20.04' ]; then
docker run -it --rm -v ${GITHUB_WORKSPACE}:/qiling qilingframework/qiling:dev bash -c "rm -rf tests/test_evm.py && cd tests && ./test_onlinux.sh"
if [ ${{ matrix.os }} == 'ubuntu-18.04' ] and [ ${{ matrix.python-version }} == '3.9' ]; then
docker run -it --rm -v ${GITHUB_WORKSPACE}:/qiling qilingframework/qiling:dev bash -c "cd tests && ./test_onlinux.sh"
else
pip3 install setuptools wheel
cd tests && ./test_onlinux.sh
Expand Down
19 changes: 10 additions & 9 deletions CREDITS.TXT
Original file line number Diff line number Diff line change
Expand Up @@ -11,20 +11,22 @@ Advisor
NGUYEN Anh Quynh <aquynh@gmail.com>


Travis, Website and Documentations
==================================
FOO Kevin (chfl4gs) <chfl4gs@qiling.io>


Core Developers
===============
Core Developers Crew
====================
Earl MARCUS (klks84) klks84@gmail.com
DING tianze (D1iv3) <dddliv3@gmail.com>
SUN bowen (w1tcher) <w1tcher.bupt@gmail.com>
CHEN huitao (null) <null@qiling.io>
YU tong (sp1ke) <spikeinhouse@gmail.com>
Earl MARCUS (klks84) klks84@gmail.com
WU chenxu (kabeor) <kabeor@qiling.io>
KONG ziqiao (lazymio) <mio@lazym.io>
YU zheng (dataisland) <dataisland@outlook.com>
Eli Cohen Nehemia (elicn) <elichn@gmail.com>


Travis, Website and Documentations
==================================
FOO Kevin (chfl4gs) <chfl4gs@qiling.io>


Key Contributors (in no particular order)
Expand All @@ -36,7 +38,6 @@ ucgJhe
jhumble
Mark Jansen (learn-more)
cq674350529
elicn
bkerler (viperbjk)


Expand Down
11 changes: 10 additions & 1 deletion ChangeLog
Original file line number Diff line number Diff line change
@@ -1,7 +1,16 @@
This file details the changelog of Qiling Framework.

------------------------------------
[Version 1.3]: Sept 25th, 2021
[Version 1.4.0]: Oct 20th, 2021
- Added MCU Engine
- Bug fix for qdb
- Bug fix for debugger
- Bug fix for ql.mem
- Bump to Unicorn 2


------------------------------------
[Version 1.3.0]: Sept 25th, 2021

- Added QNX
- Aded Dynamically executed QNX
Expand Down
32 changes: 3 additions & 29 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -218,35 +218,9 @@ Contact us at email info@qiling.io, or via Twitter [@qiling_io](https://twitter.

---

#### Core developers

- LAU kaijern (xwings) <kj@qiling.io>
- NGUYEN Anh Quynh <aquynh@gmail.com>
- DING tianZe (D1iv3) <dddliv3@gmail.com>
- SUN bowen (w1tcher) <w1tcher.bupt@gmail.com>
- CHEN huitao (null) <null@qiling.io>
- YU tong (sp1ke) <spikeinhouse@gmail.com>
- Earl Marcus (klks84) klks84@gmail.com
- WU chenxu (kabeor) <kabeor@qiling.io>
- KONG ziqiao (lazymio) <mio@lazym.io>

#### Travis-CI, Docker, Website and Documentation

- FOO Kevin (chfl4gs) <chfl4gs@qiling.io>

#### Key Contributors (in no particular order)

- 0ssigeno
- liba2k
- assafcarlsbad
- ucgJhe
- jhumble
- Mark Jansen (learn-more)
- cq674350529
- elicn
- bkerler (viperbjk)
- madprogrammer
- danielmoos
#### Core developers, Key Contributors and etc

Please refer to [CREDITS.TXT](https://github.com/qilingframework/qiling/blob/master/CREDITS.TXT)

---

Expand Down
2 changes: 1 addition & 1 deletion TODO
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,4 @@ Release
14. Update version and add in dev
__version__ = "X.X.X" + "-dev"
15. Update changelog and add section for next Update
16. commit and push
16. commit and push
145 changes: 145 additions & 0 deletions examples/mcu/LCD1602A.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,145 @@
-------------------------------------------------------------------------------------------------
| | | | ### | ### |#### | # | | | | | | | | | |
| | | |# #|# #|# #| # | | | | | | ####| ### | # #|# ## |
| | | |# ##| #|# #| # |#### | | | | | # #| |# # #|## #|
| | | |# # #| ## #|#### | |# #| | | |#####|# # #| ### |# # |# #|
| | | |## #|# # #|# | |#### | | | | | ##| | ## #|#### |
| | | |# #|# # #|# | |# | | | | | # | ### | |# |
| | | | ### | ### |# | |# | | | | | ## | #| |# |
| | | | | | | | | | | | | | | | |
-------------------------------------------------------------------------------------------------
| | | # | # | ### | ### | | | | | |#####| # | | # # | |
| | | # | ## |# #|# #| | | | | | #|### | # | ### | ## #|
| | | # | # |# #|# #| ### | ## #| | | | # #| # | # | #|# ##|
| | | # | # |# #|# #| #|# ##| | | | ## |#####|# | ####|# #|
| | | | # |#####|# # #| ####| ####| | |### | # | # |# #|# #| ####|
| | | | # |# #|# # |# #| #| | |# # | # | # |#####| ####| #|
| | | # | ### |# #| ## #| ####| #| | |### | # | # | #| | #|
| | | | | | | | | | | | | | | | |
-------------------------------------------------------------------------------------------------
| | | # # | ### |#### |#### |# | | | | ###| #| | | ### | ### |
| | | # # |# #|# #|# #|# | | | | # | # |# # #| #|# #|# #|
| | | # # | #|# #|# #|#### |# ## | | | # | # |# # #| #|#### |#####|
| | | | # |#### |#### |# #|## #| | | # | ## |# # #| # # |# #|# #|
| | | | # |# #|# # |# #|# | | | |# # | #| # |#### |# #|
| | | | # |# #|# # |# #|# | | | | # | # | # # |# | ### |
| | | |#####|#### |# #|#### |# | | | | # | # |# |# | |
| | | | | | | | | | | | | | |# | |
-------------------------------------------------------------------------------------------------
| | | # # |#####| ### | ####| | | | | | # | ### | | | |
| | | # # | # |# #|# | | | | | |#####| |#####| ### | |
| | |#####| # |# |# | ### | ### | | | |# #|#####| # |# | # ##|
| | | # # | # |# | ### |# |# | | | # |# #| # |#####| ## |# # #|
| | |#####| #|# | #|# | ### | | | # | #| # | # |# #|## # |
| | | # # |# #|# #| #|# #| #| | | # | # | # | # | ### | |
| | | # # | ### | ### |#### | ### |#### | | |### | # | # | ###| | |
| | | | | | | | | | | | | | | | |
-------------------------------------------------------------------------------------------------
| | | # | # |### |#####| #| # | | | | | # | # | | |
| | | ####| ## |# # | # | #| # | | | |#####| # | # |# #| ### |
| | |# # | # # |# #| # | ## #|### | | | | # | # |#####|# #|# #|
| | | ### |# # |# #| # |# ##| # | | | | # | ## | # #|# #|# #|
| | | # #|#####|# #| # |# #| # | | |# | # | # # | # # |### #| # # |
| | |#### | # |# # | # |# #| # #| | | # | # | # | # |# |## ##|
| | | # | # |### | # | ####| ## | | | # |#####| # | # |# | |
| | | | | | | | | | | | | | | | |
-------------------------------------------------------------------------------------------------
| | |## |#####|#####|# #| | | | | | # | # | | | # # |
| | |## #|# |# |# #| | | | | |#####| # | ### | ####|# #|
| | | # |#### |# |# #| ### |# #| | | | # |#####| # |# # |# #|
| | | # | #|#### |# #|# #|# #| | | ## | ## | # | # |# # |# ##|
| | | # | #|# |# #|#####|# #| | | ## | # # | # | # | ### | ## #|
| | |# ##|# #|# |# #|# |# ##| | | |# # | # | # | | |
| | | ##| ### |#####| ### | ### | ## #| | | | # |# |#####| | |
| | | | | | | | | | | | | | | | |
-------------------------------------------------------------------------------------------------
| | | ## | ## |#####|# #| ## | | | | | # | | | |#####|
| | |# # | # |# |# #| # #| | | |#####|#####| ### |#####| ## | # |
| | |# # |# |# |# #| # |# #| | | #| # #| | #| # #| # |
| | | # |#### |#### |# #|### |# #| | |#####| # #| |#####|# #| # |
| | |# # |# #|# |# #| # |# #| | | #| # #| | #|#### |#####|
| | |# # |# #|# | # # | # | # # | | | # | # #| | #|# | |
| | | ## #| ### |# | # | # | # | | | # |# # |#####|#####|# | |
| | | | | | | | | | | | | | | | |
-------------------------------------------------------------------------------------------------
| | | ## |#####| ### |# #| | | | | | # | | ### | | |
| | | # | #|# #|# #| ####| | | | |#####|#####| | ### |#####|
| | | # | # |# |# #|# #|# #| | |#####| # | #|#####|# #| # # |
| | | | # |# ###|# #|# #|# #| | | #|#####| # # | #|# #| # # |
| | | | # |# #|# # #| ####|# #| | | # | # | # | #| ####|# ##|
| | | | # |# #|# # #| #|# # #| | | # | # | # # | # | #| |
| | | | # | ### | ### | ### | # # | | | # | # |# | # | #| |
| | | | | | | | | | | | | | | ### | |
-------------------------------------------------------------------------------------------------
| | | # | ### |# #|# #|# | | | | | | # |# # | |#####|
| | | # |# #|# #|# #|# | | | | | ####|#####|# # | ###|# #|
| | | # |# #|# #| # # |# ## |# #| | | # | # #| # |# # | # | # # |
| | | # | ### |#####| # |## #| # # | | | # |# #| # |# # | # | # |
| | | # |# #|# #| # # |# #| # | | | ## | #| ### | # | # |# #|
| | | # |# #|# #|# #|# #| # # | | |# # | # |# # #| # | | |
| | | # | ### |# #|# #|# #|# #| | | # | ## | # | # | | |
| | | | | | | | | | | | | | | | |
-------------------------------------------------------------------------------------------------
| | | # | ### | ### |# #| # | | | | | # | # | | | |
| | | # |# #| # |# #| | | | | | ####| # | # |## # |# #|
| | | # |# #| # |# #| ## |# #| | | # |# # | # |# # | # |# #|
| | | # | ####| # | # # | # |# #| | |#####| # | # |# # | |# #|
| | | # | #| # | # | # | ####| | |# #| # | # |# # #| | ####|
| | | # | # | # | # | # | #| | | #| # | # |# # #| | #|
| | | # | ## | ### | # | ### | ### | | | ## | # | # |# ## | | ### |
| | | | | | | | | | | | | | | | |
-------------------------------------------------------------------------------------------------
| | | | | ###|#####| # | | | | | | | | # | #|
| | | # | ## | # | #| | | | | |#####| # |# | |#### |
| | |# # #| ## | # | # | ## |#####| | | | #| # |# | ## | # |
| | | ### | | # | # | # | # | | |#####| #|# #|# #| # |#####|
| | |# # #| ## | # | # | # | # | | | # | #|# #|# # | # | # |
| | | # | ## |# # |# |# # | # | | | # | #|# #|# # | # | |
| | | | | ## |#####| ## |#####| | |#####|#####|# #|## |# # | |
| | | | | | | | | | | | | | | ## | |
-------------------------------------------------------------------------------------------------
| | | | |# #| ### |# | # | | | | # # |# | |# # | |
| | | # | ## |# # | # |# | # | | | |#####|# |#####| # |#####|
| | | # | ## |# # | # |# # | # | | | # | # # |#####|# #|# # | # |
| | |#####| |## | # |# # | # | | |#####| # # |# |# #| | ####|
| | | # | ## |# # | # |## | # | | | ## | # |# |# #| | # #|
| | | # | # |# # | # |# # | # | | | # # | # |# |# #| |# #|
| | | | # |# #| ### |# # | # | | |# # | # | ####|#####| | |
| | | | | | | | | | | | | | | | |
-------------------------------------------------------------------------------------------------
| | | | # |# |# #| ## | # | | | | | | | # | |
| | | | # |# | # # | # | # | | | |## |#####|#####| ### |#####|
| | | | # |# |#####| # | # | | | # | #| #|# #|# # |# # #|
| | | |# |# | # | # | # | | |#####|## #| #|# #|# # #|#####|
| | | ## | # |# |#####| # | # | | | # #| #| #| #| ### |# #|
| | | # | # |# | # | # | # | | | # # | # | # | # | # |# #|
| | | # | # |#####| # | ### | # | | | # |### | ## | # | | |
| | | | | | | | | | | | | | | | |
-------------------------------------------------------------------------------------------------
| | | | |# #| ### | | # | | | | | | | # | |
| | | | |## ##| # | | # | | | |#####| # |## |### | # |
| | | |#####|# # #| # |## # | # | | | | #|# # | | # |#####|
| | |#####| |# # #| # |# # #| # | | | ### | # | # | #|### | # |
| | | |#####|# #| # |# # #| # | | | # | # | #| #| # | |
| | | | |# #| # |# #| # | | | # | # # | #| # | ####| |
| | | | |# #| ### |# #| # | | |#####|# #| |### | | |
| | | | | | | | | | | | | | | | |
-------------------------------------------------------------------------------------------------
| | | | # |# #| # | | | | | | # | # | # | ### | |
| | | | # |# #| # # | | # | | | |#####|#####|# # |# ## | |
| | | | # |## #|# #|# ## | # | | |#### | # #| # | # |## #| |
| | | | #|# # #| |## #|#####| | | # | # # | # | |# #| |
| | | | # |# ##| |# #| # | | |#### | # |# # #| |# #| |
| | | ## | # |# #| |# #| # | | | # | # |# # #| | | |
| | | ## | # |# #| |# #| | | |#### | ###| # | | | |
| | | | | | | | | | | | | | | | |
-------------------------------------------------------------------------------------------------
| | | | ### | ### | | | | | | | | |### | # # |#####|
| | | #|# #|# #| | | # | | | |# #|#####|# # | ### |#####|
| | | # | #|# #| | ### | # | | | |# #| #|### |# #|#####|
| | | # | # |# #| |# #|#####| | |# # #| # #| #| |# #|#####|
| | | # | # |# #| |# #| # | | |# # #| #| # # | | ### |#####|
| | |# | |# #| |# #| # | | | #| # | # | | |#####|
| | | | # | ### |#####| ### | | | | ## | ## | # | | |#####|
| | | | | | | | | | | | | | | |#####|
-------------------------------------------------------------------------------------------------
25 changes: 25 additions & 0 deletions examples/mcu/stm32f4_dma.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
import sys
sys.path.append("../..")

from qiling.core import Qiling
from qiling.const import QL_VERBOSE


def stm32f411_dma():
ql = Qiling(["../rootfs/mcu/stm32f411/dma-clock.hex"],
archtype="cortex_m", profile="stm32f411", verbose=QL_VERBOSE.DEBUG)

ql.hw.create('usart2')
ql.hw.create('dma1')
ql.hw.create('rcc')

ql.run(count=200000)
buf = ql.hw.usart2.recv()

## check timestamp
tick = [int(x) for x in buf.split()]
for i in range(1, len(tick)):
assert(4 <= tick[i] - tick[i - 1] <= 6)

if __name__ == "__main__":
stm32f411_dma()
29 changes: 29 additions & 0 deletions examples/mcu/stm32f4_freertos.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
import sys
sys.path.append("../..")

from qiling.core import Qiling
from qiling.const import QL_VERBOSE


def stm32f411_freertos():
ql = Qiling(["../rootfs/mcu/stm32f411/os-demo.hex"],
archtype="cortex_m", profile="stm32f411", verbose=QL_VERBOSE.DEBUG)

ql.hw.create('usart2')
ql.hw.create('rcc')
ql.hw.create('gpioa')

count = 0
def counter():
nonlocal count
count += 1

ql.hw.gpioa.hook_set(5, counter)

ql.run(count=200000)

print(count >= 5)
print(ql.hw.usart2.recv())

if __name__ == "__main__":
stm32f411_freertos()
Loading