BrianSidebotham/arm-tutorial-rpi

Can I use a sub-function to control led in bare metal code?

Closed this issue · 1 comments

JIAZM commented

Hello ! I followed the instructions in the document BMC Part 1-Getting Started to write a bare metal code to apply to my Raspi zero w. When I write all code in the main function, everything is normal, but when I control the LED as a sub-function and call the form in main(), after the board is powered on, the LED only lights up once and then goes out forever. At present, I have not found any grammatical problems in my program. I really want to know the reasons for this phenomenon. If you can answer me, I would be very grateful!

@JIAZM Yes you can - but not at the end of part-1. You need to progress further until the end of part-2 and then you should find you have enough of a c-environment set up in order to expand a bit further.