sh_bios.h 605 B

123456789101112131415161718192021222324252627282930
  1. /* eCos HAL interface header */
  2. #ifndef SH_BIOS_H
  3. #define SH_BIOS_H
  4. #define HAL_IF_VECTOR_TABLE 0xfffe20
  5. #define CALL_IF_SET_CONSOLE_COMM 13
  6. #define QUERY_CURRENT -1
  7. #define MANGLER -3
  8. /* Checking for GDB stub active */
  9. /* suggestion Jonathan Larmour */
  10. static int sh_bios_in_gdb_mode(void)
  11. {
  12. static int gdb_active = -1;
  13. if (gdb_active == -1) {
  14. int (*set_console_comm)(int);
  15. set_console_comm = ((void **)HAL_IF_VECTOR_TABLE)[CALL_IF_SET_CONSOLE_COMM];
  16. gdb_active = (set_console_comm(QUERY_CURRENT) == MANGLER);
  17. }
  18. return gdb_active;
  19. }
  20. static void sh_bios_gdb_detach(void)
  21. {
  22. }
  23. #endif