Menu

#127 Depencies of CM on Terminal

open
nobody
btnut (45)
5
2007-03-08
2007-01-10
No

The terminal command implementations for the Connection Manager are placed in the cm/ implementation.
This should not be. If the Connection Manager and MHOP is
used without a terminal, this results in increased code size.

The terminal must not be necessary for the Connection Manager.

In con_event_buffer_init, a terminal command is even registered. In the mhop_blink example, the terminal is actually initialized after the connection manager is
initialzed.

On unix this results in a bus error.
On the BTnode no crash is observed, but for sure somethin bad happens which might cause a secondary bug somewhere else.

A normal code review of mhop_blink would not reveal this bug, as one does assume that the terminal is not needed to init the connection manager.

Discussion

  • Matthias Ringwald

    • labels: --> btnut
     
  • Matthias Ringwald

    • assigned_to: nobody --> kevmarti
     
  • Jan Beutel

    Jan Beutel - 2007-03-08
    • assigned_to: kevmarti --> nobody
     
  • Mustafa Yuecel

    Mustafa Yuecel - 2007-03-20

    Logged In: YES
    user_id=749518
    Originator: NO

    Here are all involved files:

    bt/bt_semaphore.c: btn_terminal_register_cmd("sema", _bt_semaphore_cmd);
    cdist/hexfile.c: btn_terminal_register_cmd("loadhex", _loadhex_cmd);
    cm/cm_abstract.c: btn_terminal_register_cmd("cm", _cm_cmds_cm_cmd);
    cm/cm_local.c: btn_terminal_register_cmd("cpm", _cm_local_register_cmds);
    cm/cm_tree.c: btn_terminal_register_cmd("cm", _cm_cmds_cm_cmd);
    cm/cm_xtc_debug.c: btn_terminal_register_cmd("cm", _cm_cmds_cm_cmd);
    cm/con_event_buffer.c: btn_terminal_register_cmd("con_buf", _con_buf);
    mhop/bt_gui.c: btn_terminal_register_cmd("addr", _bt_gui_addr_cmd);
    mhop/mhop_blink.c: btn_terminal_register_cmd("mblink", _mhop_blink_cmd);
    mhop/mhop_con_info.c: btn_terminal_register_cmd("coninfo", _mhop_con_info_parser);
    mhop/mhop_reset.c: btn_terminal_register_cmd("mreset", _mhop_reset_cmd);

     
  • Mustafa Yuecel

    Mustafa Yuecel - 2007-03-20

    Logged In: YES
    user_id=749518
    Originator: NO

    Moved the terminal commands of bt/bt_semaphore.c cm/con_event_buffer.c to terminal/bt-extra-cmds.c