Search found 5 matches

by szekelyisz
Tue Apr 06, 2021 3:17 pm
Forum: General Support
Topic: Does optimization for GDB work at all in GCC 9.2.1?
Replies: 3
Views: 102

Re: Does optimization for GDB work at all in GCC 9.2.1?

Thanks. That makes sense, but it still doesn't explain why -Og code is smaller than -O0. As far as I understand -Og disables at least all those optimizations as -O0 (and maybe more).
by szekelyisz
Tue Apr 06, 2021 2:59 pm
Forum: General Support
Topic: Does optimization for GDB work at all in GCC 9.2.1?
Replies: 3
Views: 102

Does optimization for GDB work at all in GCC 9.2.1?

Hi, I'm using ChibiStudio with included GCC 9.2.1. I noticed that when I compile my code with -O0 I get a binary size of around 70 kB. But when I wanted to add more debugging information with -Og -ggdb, the compiled binary size dropped to 47kB and the debugging experience is like with -O2 or -O3 (st...
by szekelyisz
Tue Jan 30, 2018 8:37 pm
Forum: Development and Feedback
Topic: C++ wrappers
Replies: 84
Views: 23471

Re: C++ wrappers

Korken, What's the reason for declaring most of the classes final? IMHO it takes out the elegancy from interfacing ChibiOS with C++. For example, with the old wrapper you could derive a class from BaseStaticThread, define a main() member function and call any thread-related function implicitly again...
by szekelyisz
Sat Jan 20, 2018 12:08 am
Forum: ChibiOS/RT
Topic: Inserting a semaphore into ch_thread
Replies: 2
Views: 1020

Re: Inserting a semaphore into ch_thread

Thanks Giovanni, but I found my way around this. LWIP provides the LWIP_NETCONN_THREAD_SEM_ALLOC() and LWIP_NETCONN_THREAD_SEM_FREE() macros which are called if the thread semaphore is invalid (as defined by the sys_sem_valid() function in sys_arch.c) or not needed anymore, respectively. This enable...
by szekelyisz
Fri Jan 12, 2018 12:28 am
Forum: ChibiOS/RT
Topic: Inserting a semaphore into ch_thread
Replies: 2
Views: 1020

Inserting a semaphore into ch_thread

Hi, full-duplex socket operation in LWIP 2.0 requires a dedicated semaphore per thread. I found the CH_CFG_THREAD_EXTRA_FIELDS macro which enables additional fields in the thread structure with CH_CFG_THREAD_INIT_HOOK and CH_CFG_THREAD_EXIT_HOOK to initialize and finalize them. So far so good. But i...

Go to advanced search