What to do when compiling/building/deploying? [closed]
What to do when there is a task in the code-compile-debug cycle during which only the computer is working? With embedded development such task is Downloading the hex to flash, also compiling. It takes somewhat less than a minute, but feels extremely boring when you have to do it several times in half an hour. How to spend the time so that I wouldn't loose the problem/program from my head, but also wouldn't feel bo开发者_JS百科red waiting?
Multitask. Either start working on the next module of code while testing the last, or answer emails, read datasheets, etc. If you get the opportunity to work on team developing a chip you can easily end up with 30-45 minute simulations. Sometimes you spend that time wading through the waveforms from the prior sim, but sometimes the thing you were looking for in the prior sim takes only a few minutes and you realize what you have to do for the next sim.
Basically be able to multitask, work two or three problems or modules of code at the same time, while waiting for one to execute a test, be coding the other one or few.
Another answer may depend on where this embedded code is going, usually embedded code needs/wants to be more robust, more reliable, than normal applications. So you could spend that time carefully verifying that your code is doing exactly what it is supposed to, even though you are pretty sure you know where all the bits are in a register, go back to the datasheet for that peripheral and verify you have put the correct bits in the correct place, and the datasheet doesnt have comments like you must leave this bit as found (in this example a read-modify-write is required instead of a simple write).
精彩评论