Search found 11 matches
- Mon Sep 21, 2026 11:02 am
- Forum: ChibiStudio
- Topic: openocd -rtos "chibios"
- Replies: 3
- Views: 35194
Re: openocd -rtos "chibios"
OpenOCD support is not yet updated to the latest ChibiOS versions.
Is there any chance this happening? I tried changing `ch` to `ch_system` in `src/rtos/chibios.c` but didn't do the trick alone. Here's what I get now:
[stm32f1x.cpu] halted due to debug-request, current mode: Thread
xPSR ...
- Fri May 07, 2021 7:49 pm
- Forum: General Support
- Topic: Overriding _unhandled_exception doesn't work
- Replies: 8
- Views: 7211
Re: Overriding _unhandled_exception doesn't work
Actually I have a main.cpp. I tried putting it there making sure it has C-style linkage, but that didn't help, either.
Do you think it has something to do with messing around with the vector table? I partitioned my flash, the first 128kB is for the bootloader, the main app starts after that. So for ...
Do you think it has something to do with messing around with the vector table? I partitioned my flash, the first 128kB is for the bootloader, the main app starts after that. So for ...
- Fri May 07, 2021 1:00 pm
- Forum: General Support
- Topic: Overriding _unhandled_exception doesn't work
- Replies: 8
- Views: 7211
Re: Overriding _unhandled_exception doesn't work
I'm using the most recent version of GCC included with ChibiStudio:
I tried it with 10-2020-q4-major, but got the same results.
Code: Select all
arm-none-eabi-gcc (GNU Tools for Arm Embedded Processors 9-2019-q4-major) 9.2.1 20191025 (release) [ARM/arm-9-branch revision 277599]
I tried it with 10-2020-q4-major, but got the same results.
- Thu May 06, 2021 11:53 pm
- Forum: General Support
- Topic: Overriding _unhandled_exception doesn't work
- Replies: 8
- Views: 7211
Re: Overriding _unhandled_exception doesn't work
Here's my linker command:
arm-none-eabi-g++ <all object files> -mcpu=cortex-m4 -O0 -ggdb3 -fomit-frame-pointer -falign-functions=16 -Wall -ffunction-sections -fdata-sections -fno-common -nostartfiles -Lboard/ -Wl,-Map=build/firmware.map,--cref,--no-warn-mismatch,--library-path=ChibiOS/os ...
arm-none-eabi-g++ <all object files> -mcpu=cortex-m4 -O0 -ggdb3 -fomit-frame-pointer -falign-functions=16 -Wall -ffunction-sections -fdata-sections -fno-common -nostartfiles -Lboard/ -Wl,-Map=build/firmware.map,--cref,--no-warn-mismatch,--library-path=ChibiOS/os ...
- Thu May 06, 2021 11:28 pm
- Forum: General Support
- Topic: Overriding _unhandled_exception doesn't work
- Replies: 8
- Views: 7211
Re: Overriding _unhandled_exception doesn't work
Thanks @Giovanni. I checked the map file, and my symbol appears under "Discarded Input Sections". I guess the linker dumps it before it has a chance to override the weak version. But I was unable to keep it in even by marking it with __attribute__((used)) .
There are two more ...
There are two more ...
- Thu May 06, 2021 7:03 pm
- Forum: General Support
- Topic: Overriding _unhandled_exception doesn't work
- Replies: 8
- Views: 7211
Overriding _unhandled_exception doesn't work
Hi,
I want to override the default exception handler. I see it's a weak symbol so all it should take is to create a function with the same name and signature, right? So I created a file called handlers.c with the following content:
#include <stdbool.h>
void _unhandled_exception(void ...
I want to override the default exception handler. I see it's a weak symbol so all it should take is to create a function with the same name and signature, right? So I created a file called handlers.c with the following content:
#include <stdbool.h>
void _unhandled_exception(void ...
- 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: 4524
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).
- 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: 4524
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 ...
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 ...
- Tue Jan 30, 2018 8:37 pm
- Forum: Development and Feedback
- Topic: C++ wrappers
- Replies: 84
- Views: 77019
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 ...
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 ...
- Sat Jan 20, 2018 12:08 am
- Forum: ChibiOS/RT
- Topic: Inserting a semaphore into ch_thread
- Replies: 2
- Views: 3105
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 ...