We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ac1e85e commit 6f0e6e6Copy full SHA for 6f0e6e6
examples/mcu/stm32f4_hello_gpio.py
@@ -0,0 +1,23 @@
1
+import sys
2
+sys.path.append("../..")
3
+
4
+from qiling.core import Qiling
5
+from qiling.const import QL_VERBOSE
6
7
8
+def test_mcu_gpio_stm32f411():
9
+ ql = Qiling(["../../examples/rootfs/mcu/stm32f411/hello_gpioA.hex"],
10
+ archtype="cortex_m", profile="stm32f411", verbose=QL_VERBOSE.DEBUG)
11
12
+ ql.hw.create('usart2')
13
+ ql.hw.create('rcc')
14
+ ql.hw.create('gpioa')
15
16
17
+ ql.hw.gpioa.hook_set(5, lambda: print('LED light up'))
18
+ ql.hw.gpioa.hook_reset(5, lambda: print('LED light off'))
19
20
+ ql.run(count=10000)
21
22
+if __name__ == "__main__":
23
+ test_mcu_gpio_stm32f411()
0 commit comments