embox icon indicating copy to clipboard operation
embox copied to clipboard

Input does not work on stm32f103 bluepill board

Open anton-bondarev opened this issue 2 years ago • 5 comments

#3029

anton-bondarev avatar Oct 30 '23 09:10 anton-bondarev

This might be related to https://github.com/embox/embox/pull/3047

AlexVoyt avatar Nov 03 '23 02:11 AlexVoyt

This might be related to #3047

Nope, this didn't worked

rai044der avatar Nov 03 '23 16:11 rai044der

Input does work though with the same elf file if its started not on hardware but with Qiling started with python script below

import time
import threading

import sys
sys.path.append("../..")

from qiling.core import Qiling
from qiling.const import QL_ARCH, QL_OS, QL_VERBOSE
from qiling.extensions.mcu.stm32f1 import stm32f103


ql = Qiling(["/home/rai044der/embox_fuzzing/embox/build/base/bin/embox"],
            archtype=QL_ARCH.CORTEX_M, ostype=QL_OS.MCU, env=stm32f103, verbose=QL_VERBOSE.OFF)

ql.hw.create('usart1')
ql.hw.create('rcc')

threading.Thread(target=lambda : ql.run(count=-1)).start()

while True:
    message = input('>> ').encode()

    ql.hw.usart1.send(message + b'\n')

    time.sleep(0.8)
    print(ql.hw.usart1.recv())

rai044der avatar Nov 13 '23 08:11 rai044der

Input does work though with the same elf file if its started not on hardware but with Qiling started with python script below

Thanks! Do you mean that it works on the simulator?

anton-bondarev avatar Nov 13 '23 08:11 anton-bondarev

Thanks! Do you mean that it works on the simulator?

Yes, it does work on the simulator. I've tried to load echo example to my board and this worked fine, so hardware is also fine.

rai044der avatar Nov 13 '23 09:11 rai044der