|
Eating some bugs ...
Bugs1
We found the bugs above:
- The file context.h has a space after last backslash.
- Enum definition of PORTS on file avr8.h has the wrong value. It was added the memaddress offset of 0x20, instructions in and out use direct IO port address.
- Enabling interrupts on SREG was the wrong value, the correct is 0x80
- On timer.h, the order of operands in out intruction was inverted
- ** On file handler.cc is missing the reti instruction on general impl. of vectors.
- On file my_handle.cc, the handlers of interruptions is calling ret instruction. The correct is reti.
- On file handler.h is missing the extern "C" statement for avoid C++ name mangling.
- On file system.cc the counter var is reseting on every interrupt handling.
- Must compile the interrupt functions with -fomit-frame-pointer
- The for loop on main.cc is not closed (cause the system be constantly reinitialized)
** This in fact is not a bug, since the vectors jumps to the __bad_interrupt function that has de reti instruction. The bug that was not discover (masked by this false bug =P ) is the comments on avr8.h file, but since the main program is using direct in/out instructions, this comments don't affect the execution of the program.
Bugs2
We found the bugs above:
- Watchdog timer was enabled, causing MCU reset constantly.
- Missing ; after main while infinity loop.
- Declaration of __vector_1 is missing on extern "C" statement ( __vector_0 is declared, but not used. )
- Wrong interruption vector declared to handle timer1 overflow. ( declared 5, must be 6 ).
Warning: Undefined array key "PATH_TRANSLATED" in /home/intranet/teaching/esl/ine5349-2004-1/work/g7/index.php on line 25
Warning: opendir(/bugs): Failed to open directory: No such file or directory in /home/intranet/teaching/esl/ine5349-2004-1/work/g7/index.php on line 26
|