Search found 13517 matches

by Giovanni
Thu May 06, 2021 5:27 am
Forum: Bug Reports
Topic: context switch observed inside S-locked state Topic is solved
Replies: 26
Views: 1720

Re: context switch observed inside S-locked state Topic is solved

Absolutely, it is a good description.

IRQ "tail" processing is a very tricky part of the Cortex-M ports. It has to deal with the stacked interruptions and make sure that switch happens when the exceptions stack had been emptied.

Giovanni
by Giovanni
Wed May 05, 2021 7:48 am
Forum: Bug Reports
Topic: context switch observed inside S-locked state Topic is solved
Replies: 26
Views: 1720

Re: context switch observed inside S-locked state Topic is solved

Coming back to the topic, m,y confusion stems from the fact that chThdSuspendS() would unlock the system when it reschedules. This is not apparent nor mentioned anywhere in the documentation (I may have missed something though), do we agree to that? S functions DO NOT unlock the system but DO perfo...
by Giovanni
Tue May 04, 2021 12:52 pm
Forum: Bug Reports
Topic: Stack overflow check improvements
Replies: 9
Views: 425

Re: Stack overflow check improvements

dismirlian wrote:Yes, but what if wabase is set to tdp->wbase + PORT_GUARD_PAGE_SIZE?

Would this have any unwanted side-effect?


Yes, several actually, dynamic treads for example.

Giovanni
by Giovanni
Tue May 04, 2021 6:36 am
Forum: Bug Reports
Topic: context switch observed inside S-locked state Topic is solved
Replies: 26
Views: 1720

Re: context switch observed inside S-locked state Topic is solved

Those are critical sections, it is just that you are calling functions that perform context switch inside and other threads exit the critical section. The critical section is global, it is not per-thread. The critical section is in effect non-stop from lock until unlock, don't call S-class functions...
by Giovanni
Tue May 04, 2021 6:09 am
Forum: Bug Reports
Topic: context switch observed inside S-locked state Topic is solved
Replies: 26
Views: 1720

Re: context switch observed inside S-locked state Topic is solved

I know it is a bit non-obvious, the whole RTOS has been designed around that lock-switch-unlock concept, lock/unlock are not about disabling interrupts, there are enable/suspend/disable for that. In SMP mode lock/unlock also manage the kernel spinlock because kernel structures are accessed by multip...
by Giovanni
Tue May 04, 2021 6:02 am
Forum: Bug Reports
Topic: Stack overflow check improvements
Replies: 9
Views: 425

Re: Stack overflow check improvements

As a minor related problem, the ChibiOS eclipse plugin incorrectly reports free stack if PORT_ENABLE_GUARD_PAGES is enabled (it counts the guard bytes as "available"). Yes, currently there is no way, for the debugger plugin, to know that the MPU is in use. The plugin is not CPU-architectu...
by Giovanni
Tue May 04, 2021 6:00 am
Forum: Development and Feedback
Topic: Debug startup code
Replies: 3
Views: 86

Re: Debug startup code

Hi,

Place it in crt0_v7m.S right at beginning.

Giovanni
by Giovanni
Mon May 03, 2021 6:13 pm
Forum: Development and Feedback
Topic: Debug startup code
Replies: 3
Views: 86

Re: Debug startup code

You may launch the application, keep it running and place a breakpoint in the startup code, press reset.

Giovanni
by Giovanni
Sun May 02, 2021 7:51 am
Forum: General Support
Topic: Crash on USB Disconnect when using Shell over USB (Only with optimisation on) Topic is solved
Replies: 3
Views: 85

Re: Crash on USB Disconnect when using Shell over USB (Only with optimisation on) Topic is solved

Be careful because used stack varies with compiler options, better optimize stacks at the very end.

Giovanni

Go to advanced search