I am creating a very basic operating system in the ARMV6 assembly for Raspberry P. We have gone through the change of the OK LED via the GPIO controller, which has to take a nap using the system timer, it snaps according to the pattern seen by the bitmap stored in a I bowed and finally downloaded the actual solution, compiled it and installed it in my pie. It displays the same broken behavior as its own solution. That is, the LED is turned on, but just stays on. I think the program has crashed, or the Solution like this: Now I know Does something go wrong due to the above logic? Edit | Actually, the solution for both mines and tutors is: I really thought that the first blink was just a bootloader operating, but if I start a deliberately accident at the beginning of my program, the LED never comes at all . It does not have to do anything with code and in fact there is a configuration setting on Raspberry P . /config.txt Required .int value is. This final solution does not appear to work before I thought I would have to solve the problem incorrectly, but there is no matter how I check my solution with functional solutions, I do not see a significant difference. can.
and directive is not doing what a tutor wants to do.
bitmap .req r4 seq .req r5 ldr bitmap, = pattern ldr bitmap, [bitmap] mov seq, # 0 / * zero button Start at * / loop $: mov r0, # 16 / * set GPIO pin 16: OK LED * / mov r1, # 1 / * bitmask 1 * / lsl r1, seq / * right bit * / and r1, bitmap / * Mask varies according to pattern * / bl setgpio / * set state with LED (r1 zero = off, non-zero = on) * / bl wait / * Wait for a short interval * / add CEC , # 1 / * Sequence Counter * / and Seak, # 0b11111 / * Reset Seek 0 0 * 011111111101010100010001000101010
wait / code> and
SetGpio functions work correctly, Because the previous lesson was turning on and off the LED at the set interval, which I was doing with a 1 or 0 by
EOR with 1
loop $ Operations The only new important concept presented here is bitmap for representing the SOS pattern. I am comfortable with bitmap and bitmask, Because I use them regularly in high level languages, so I think the logic is OK, but something else is wrong, how can it be stored in
.int / Padded?
SetGpio has the contract:
Wait function looks
/ * * Wait: Push {lr} ldr r0, = 500bl Sleep FORDDALE pop {PC}
kernel_old = 1 .
No comments:
Post a Comment