[LOG] RT 4.0 and NIL 2.0

This forum is dedicated to feedback, discussions about ongoing or future developments, ideas and suggestions regarding the ChibiOS projects are welcome. This forum is NOT for support.
crispus
Posts: 24
Joined: Sat Aug 27, 2016 10:14 am
Has thanked: 4 times
Been thanked: 3 times

Re: [LOG] RT 4.0 and NIL 2.0

Postby crispus » Sun Sep 18, 2016 5:24 pm

Thanks for your prompt reply.

One more thing :)

Code: Select all

void chSysHalt(const char *reason) {

  port_disable();

  /* Halt hook code, usually empty.*/
  CH_CFG_SYSTEM_HALT_HOOK(reason);

  /* Logging the event.*/
  _trace_halt(reason);

  /* Pointing to the passed message.*/
  ch.dbg.panic_msg = reason;

  /* Harmless infinite loop.*/
  while (true) {
  }
}

Can you move the system halt hook just before the infinite loop? In this way, I can stop the execution in the hook, and the event will still be logged.
I don't know if this would be interesting for everyone, but it's worth a try :)

Thanks again

User avatar
Giovanni
Site Admin
Posts: 14455
Joined: Wed May 27, 2009 8:48 am
Location: Salerno, Italy
Has thanked: 1076 times
Been thanked: 922 times
Contact:

Re: [LOG] RT 4.0 and NIL 2.0

Postby Giovanni » Sun Sep 25, 2016 7:38 am

Hi,

Bug fixed and modified chSysHalt() as suggested.

Giovanni

crispus
Posts: 24
Joined: Sat Aug 27, 2016 10:14 am
Has thanked: 4 times
Been thanked: 3 times

Re: [LOG] RT 4.0 and NIL 2.0

Postby crispus » Sun Sep 25, 2016 9:50 am

Thank you so much.

Thargon
Posts: 135
Joined: Wed Feb 04, 2015 5:03 pm
Location: CITEC, Bielefeld University, germany
Has thanked: 15 times
Been thanked: 24 times
Contact:

Re: [LOG] RT 4.0 and NIL 2.0

Postby Thargon » Mon Feb 20, 2017 2:07 pm

I have a suggestion regarding the C++ wrappers:

Several classes already inherit others (e.g. BaseStaticThread inherits BaseThread inherits ThreadReference), which may lead to the diamond problem when creating new custom classes. To solve this, all classes in the ChibiOS C++ wrapper should use the keyword "virtual" for inheritance (unless virtual is explicitly unsafe in a particular case).

Thomas


Return to “Development and Feedback”

Who is online

Users browsing this forum: No registered users and 12 guests